Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2007 23:36:58 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 125248 for review
Message-ID:  <200708162336.l7GNawXC039055@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125248

Change 125248 by zec@zec_tpx32 on 2007/08/16 23:35:59

	Rename macro IS_VNET_0() to IS_DEFAULT_VNET().
	Suggested by: jhb@

Affected files ...

.. //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#11 edit
.. //depot/projects/vimage/src/sys/net/if.c#20 edit
.. //depot/projects/vimage/src/sys/net/if_loop.c#17 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_ether.c#10 edit
.. //depot/projects/vimage/src/sys/netinet/igmp.c#10 edit
.. //depot/projects/vimage/src/sys/netinet/ip_input.c#22 edit
.. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#15 edit
.. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#26 edit
.. //depot/projects/vimage/src/sys/netinet/tcp_timewait.c#9 edit
.. //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#17 edit
.. //depot/projects/vimage/src/sys/netinet6/frag6.c#8 edit
.. //depot/projects/vimage/src/sys/netinet6/in6_src.c#11 edit
.. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#18 edit
.. //depot/projects/vimage/src/sys/netinet6/scope6.c#10 edit
.. //depot/projects/vimage/src/sys/netipsec/key.c#14 edit
.. //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#11 edit
.. //depot/projects/vimage/src/sys/sys/vimage.h#35 edit

Differences ...

==== //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#11 (text+ko) ====

@@ -1654,7 +1654,7 @@
 {
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 	unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL,

==== //depot/projects/vimage/src/sys/net/if.c#20 (text+ko) ====

@@ -326,7 +326,7 @@
 #endif
 	IFNET_LOCK_INIT();
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 	INIT_VNET_NET(curvnet);
 #endif
 	ifdev_byindex(0) = make_dev(&net_cdevsw, 0,
@@ -397,7 +397,7 @@
 	int s;
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		panic("if_check() called for a non-default vimage!?!");
 #endif
 
@@ -565,7 +565,7 @@
 #endif
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw,
 	    unit2minor(ifp->if_index),
@@ -632,7 +632,7 @@
 
 	EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp);
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet))
+	if (IS_DEFAULT_VNET(curvnet))
 #endif
 	devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL);
 
@@ -821,7 +821,7 @@
 	 */
 	ifp->if_addr = NULL;
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	destroy_dev(ifdev_byindex(ifp->if_index));
 #ifdef VIMAGE
@@ -854,7 +854,7 @@
 	rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
 	EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet))
+	if (IS_DEFAULT_VNET(curvnet))
 #endif
 	devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
 
@@ -1519,7 +1519,7 @@
 	}
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet))
+	if (IS_DEFAULT_VNET(curvnet))
 #endif
 	devctl_notify("IFNET", ifp->if_xname,
 	    (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL);

==== //depot/projects/vimage/src/sys/net/if_loop.c#17 (text+ko) ====

@@ -190,7 +190,7 @@
 
 	LIST_INIT(&V_lo_list);
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet))
+	if (IS_DEFAULT_VNET(curvnet))
 		if_clone_attach(&lo_cloner);
 	else
 		lo_cloner.ifc_attach(&lo_cloner);

==== //depot/projects/vimage/src/sys/netgraph/ng_ether.c#10 (text+ko) ====

@@ -786,7 +786,7 @@
 	struct ifnet *ifp;
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)){
+	if (IS_DEFAULT_VNET(curvnet)){
 #endif
 	/* Register function hooks */
 	if (ng_ether_attach_p != NULL)
@@ -824,7 +824,7 @@
 	 */
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return(0);
 #endif
 

==== //depot/projects/vimage/src/sys/netinet/igmp.c#10 (text+ko) ====

@@ -125,7 +125,7 @@
 	struct ipoption *ra;
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	/*
 	 * To avoid byte-swapping the same value over and over again.

==== //depot/projects/vimage/src/sys/netinet/ip_input.c#22 (text+ko) ====

@@ -280,7 +280,7 @@
 
 #ifdef VIMAGE
 	/* Skip initialization of globals for non-default instances. */
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#15 (text+ko) ====

@@ -223,7 +223,7 @@
 	uma_zone_set_max(V_tcp_hostcache.zone, V_tcp_hostcache.cache_limit);
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet/tcp_subr.c#26 (text+ko) ====

@@ -273,7 +273,7 @@
 	INIT_VNET_INET(curvnet);
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	tcp_ipi_zone = uma_zcreate("inpcb", sizeof(struct inpcb),
 	    NULL, NULL, tcp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
@@ -370,7 +370,7 @@
 	tcp_hc_init();
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet/tcp_timewait.c#9 (text+ko) ====

@@ -170,7 +170,7 @@
 	TAILQ_INIT(&V_twq_2msl);
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#17 (text+ko) ====

@@ -174,7 +174,7 @@
 	INIT_VNET_INET(curvnet);
 
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	udp_ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL,
 	    NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);

==== //depot/projects/vimage/src/sys/netinet6/frag6.c#8 (text+ko) ====

@@ -108,7 +108,7 @@
 	V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q;
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 	ip6_maxfragpackets = nmbclusters / 4;

==== //depot/projects/vimage/src/sys/netinet6/in6_src.c#11 (text+ko) ====

@@ -855,7 +855,7 @@
 	V_defaultaddrpolicy.label = ADDR_LABEL_NOTAPP;
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet6/ip6_input.c#18 (text+ko) ====

@@ -175,7 +175,7 @@
 
 #ifdef VIMAGE
 	/* Skip global initialization stuff for non-default instances. */
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netinet6/scope6.c#10 (text+ko) ====

@@ -82,7 +82,7 @@
 	bzero(&V_sid_default, sizeof(V_sid_default));
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netipsec/key.c#14 (text+ko) ====

@@ -7196,7 +7196,7 @@
 	V_ipsec_esp_auth = 0;
 	V_ipsec_ah_keymin = 128;
 #ifdef VIMAGE
-	if (IS_VNET_0(curvnet)) {
+	if (IS_DEFAULT_VNET(curvnet)) {
 #endif
 	SPTREE_LOCK_INIT();
 	REGTREE_LOCK_INIT();
@@ -7222,7 +7222,7 @@
 	V_ip4_def_policy.refcnt++;	/*never reclaim this*/
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return;
 #endif
 

==== //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#11 (text+ko) ====

@@ -702,7 +702,7 @@
 	V_ipip_allow = 0;
 
 #ifdef VIMAGE
-	if (!IS_VNET_0(curvnet))
+	if (!IS_DEFAULT_VNET(curvnet))
 		return 0;
 #endif
 

==== //depot/projects/vimage/src/sys/sys/vimage.h#35 (text+ko) ====

@@ -340,7 +340,7 @@
 	mtx_unlock(&vnet_list_refc_mtx);				\
 	cv_signal(&vnet_list_condvar);
 
-#define IS_VNET_0(arg)		((arg) == &vnet_0 ? 1 : 0)
+#define IS_DEFAULT_VNET(arg)		((arg) == &vnet_0 ? 1 : 0)
 
 /*
  * XXX The stuff bellow needs a major cleanup / rewrite from scratch.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708162336.l7GNawXC039055>