PERFORCE change 150158 for review
Marko Zec
zec at FreeBSD.org
Sat Sep 20 09:51:04 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150158
Change 150158 by zec at zec_tpx32 on 2008/09/20 09:50:06
IFC @ 150154
Affected files ...
.. //depot/projects/vimage/src/sys/net/route.c#25 integrate
.. //depot/projects/vimage/src/sys/net/route.h#5 integrate
Differences ...
==== //depot/projects/vimage/src/sys/net/route.c#25 (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" *
@@ -64,26 +64,6 @@
#include <vm/uma.h>
-#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"
- #else
- #if ROUTETABLES == 0
- #define RT_NUMFIBS 1
- #else
- #define RT_NUMFIBS ROUTETABLES
- #endif
- #endif
-#endif
-
u_int rt_numfibs = RT_NUMFIBS;
SYSCTL_INT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, "");
/*
==== //depot/projects/vimage/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,6 +82,27 @@
#define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */
#define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ))
+/* MRT compile-time constants */
+#ifdef _KERNEL
+ #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"
+ #else
+ #if ROUTETABLES == 0
+ #define RT_NUMFIBS 1
+ #else
+ #define RT_NUMFIBS ROUTETABLES
+ #endif
+ #endif
+ #endif
+#endif
+
extern u_int rt_numfibs; /* number fo usable routing tables */
extern u_int tunnel_fib; /* tunnels use these */
extern u_int fwd_fib; /* packets being forwarded use these routes */
More information about the p4-projects
mailing list