Date: Wed, 18 Feb 2009 17:54:23 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 157897 for review Message-ID: <200902181754.n1IHsNM5094839@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=157897 Change 157897 by zec@zec_tpx32 on 2009/02/18 17:54:09 Remove the rest of unnecessary #ifdef / #ifndef lines, now that IS_DEFAULT_VNET() is always defined. s/arh/arg/ typo in vimage.h. Affected files ... .. //depot/projects/vimage/src/sys/netinet6/frag6.c#26 edit .. //depot/projects/vimage/src/sys/netinet6/in6_src.c#36 edit .. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#48 edit .. //depot/projects/vimage/src/sys/netinet6/scope6.c#22 edit .. //depot/projects/vimage/src/sys/netipsec/key.c#35 edit .. //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#24 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#79 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet6/frag6.c#26 (text+ko) ==== @@ -112,10 +112,10 @@ V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q; V_ip6_maxfragpackets = nmbclusters / 4; V_ip6_maxfrags = nmbclusters / 4; -#ifdef VIMAGE + if (!IS_DEFAULT_VNET(curvnet)) return; -#endif + EVENTHANDLER_REGISTER(nmbclusters_change, frag6_change, NULL, EVENTHANDLER_PRI_ANY); ==== //depot/projects/vimage/src/sys/netinet6/in6_src.c#36 (text+ko) ==== @@ -930,10 +930,8 @@ bzero(&V_defaultaddrpolicy, sizeof(V_defaultaddrpolicy)); V_defaultaddrpolicy.label = ADDR_LABEL_NOTAPP; -#ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return; -#endif ADDRSEL_LOCK_INIT(); ADDRSEL_SXLOCK_INIT(); ==== //depot/projects/vimage/src/sys/netinet6/ip6_input.c#48 (text+ko) ==== @@ -252,11 +252,11 @@ nd6_init(); frag6_init(); -#ifdef VIMAGE + V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; + /* Skip global initialization stuff for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; -#endif #ifdef DIAGNOSTIC if (sizeof(struct protosw) != sizeof(struct ip6protosw)) @@ -292,7 +292,6 @@ ip6intrq.ifq_maxlen = V_ip6qmaxlen; mtx_init(&ip6intrq.ifq_mtx, "ip6_inq", NULL, MTX_DEF); netisr_register(NETISR_IPV6, ip6_input, &ip6intrq, 0); - V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; } #ifdef VIMAGE ==== //depot/projects/vimage/src/sys/netinet6/scope6.c#22 (text+ko) ==== @@ -84,10 +84,8 @@ bzero(&V_sid_default, sizeof(V_sid_default)); -#ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return; -#endif SCOPE6_LOCK_INIT(); } ==== //depot/projects/vimage/src/sys/netipsec/key.c#35 (text+ko) ==== @@ -7190,17 +7190,6 @@ V_ipsec_esp_auth = 0; V_ipsec_ah_keymin = 128; -#ifdef VIMAGE - if (IS_DEFAULT_VNET(curvnet)) { -#endif - SPTREE_LOCK_INIT(); - REGTREE_LOCK_INIT(); - SAHTREE_LOCK_INIT(); - ACQ_LOCK_INIT(); - SPACQ_LOCK_INIT(); -#ifdef VIMAGE - } -#endif for (i = 0; i < IPSEC_DIR_MAX; i++) LIST_INIT(&V_sptree[i]); @@ -7216,10 +7205,14 @@ V_ip4_def_policy.policy = IPSEC_POLICY_NONE; V_ip4_def_policy.refcnt++; /*never reclaim this*/ -#ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return; -#endif + + SPTREE_LOCK_INIT(); + REGTREE_LOCK_INIT(); + SAHTREE_LOCK_INIT(); + ACQ_LOCK_INIT(); + SPACQ_LOCK_INIT(); #ifndef IPSEC_DEBUG2 timeout((void *)key_timehandler, (void *)0, hz); ==== //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#24 (text+ko) ==== @@ -708,10 +708,8 @@ V_ipip_allow = 0; -#ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return 0; -#endif xform_register(&ipe4_xformsw); /* attach to encapsulation framework */ ==== //depot/projects/vimage/src/sys/sys/vimage.h#79 (text+ko) ==== @@ -311,7 +311,7 @@ #else /* !VIMAGE */ /* Non-VIMAGE null-macros */ -#define IS_DEFAULT_VNET(arh) 1 +#define IS_DEFAULT_VNET(arg) 1 #define CURVNET_SET(arg) #define CURVNET_SET_QUIET(arg) #define CURVNET_RESTORE()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902181754.n1IHsNM5094839>