PERFORCE change 150157 for review
Marko Zec
zec at FreeBSD.org
Sat Sep 20 09:50:03 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150157
Change 150157 by zec at zec_tpx32 on 2008/09/20 09:49:07
IFC @ 150154
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/net/route.c#12 integrate
.. //depot/projects/vimage-commit2/src/sys/net/route.h#5 integrate
Differences ...
==== //depot/projects/vimage-commit2/src/sys/net/route.c#12 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.3.1.1 (Berkeley) 2/23/95
- * $FreeBSD: src/sys/net/route.c,v 1.138 2008/09/15 07:23:56 julian Exp $
+ * $FreeBSD: src/sys/net/route.c,v 1.139 2008/09/20 09:09:25 zec Exp $
*/
/************************************************************************
* Note: In this file a 'fib' is a "forwarding information base" *
==== //depot/projects/vimage-commit2/src/sys/net/route.h#5 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)route.h 8.4 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/net/route.h,v 1.74 2008/09/14 10:22:37 julian Exp $
+ * $FreeBSD: src/sys/net/route.h,v 1.75 2008/09/20 09:09:25 zec Exp $
*/
#ifndef _NET_ROUTE_H_
@@ -82,20 +82,23 @@
#define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */
#define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ))
-#ifndef ROUTETABLES
- #define RT_NUMFIBS 1
- #define RT_MAXFIBS 1
-#else
- /* while we use 4 bits in the mbuf flags, we are limited to 16 */
- #define RT_MAXFIBS 16
- #if ROUTETABLES > RT_MAXFIBS
- #define RT_NUMFIBS RT_MAXFIBS
- #error "ROUTETABLES defined too big"
+/* MRT compile-time constants */
+#ifdef _KERNEL
+ #ifndef ROUTETABLES
+ #define RT_NUMFIBS 1
+ #define RT_MAXFIBS 1
#else
- #if ROUTETABLES == 0
- #define RT_NUMFIBS 1
+ /* while we use 4 bits in the mbuf flags, we are limited to 16 */
+ #define RT_MAXFIBS 16
+ #if ROUTETABLES > RT_MAXFIBS
+ #define RT_NUMFIBS RT_MAXFIBS
+ #error "ROUTETABLES defined too big"
#else
- #define RT_NUMFIBS ROUTETABLES
+ #if ROUTETABLES == 0
+ #define RT_NUMFIBS 1
+ #else
+ #define RT_NUMFIBS ROUTETABLES
+ #endif
#endif
#endif
#endif
More information about the p4-projects
mailing list