PERFORCE change 127644 for review

Marko Zec zec at FreeBSD.org
Wed Oct 17 17:20:40 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=127644

Change 127644 by zec at zec_tpx32 on 2007/10/18 00:20:05

	Cosmetic change: v_vnet -> v_net

Affected files ...

.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#48 edit
.. //depot/projects/vimage/src/sys/sys/vimage.h#45 edit

Differences ...

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

@@ -252,7 +252,7 @@
 	struct vimage *vip;
 
 	LIST_FOREACH(vip, &vimage_head, vi_le)
-		if (vip->v_vnet == vnet)
+		if (vip->v_net == vnet)
 			return(vip);
 
 	panic("vnet2vimage");	/* must never happen */
@@ -300,13 +300,13 @@
 	if (vi_req == NULL || strcmp(vi_req->vi_name, "-") == 0) {
 		if (IS_DEFAULT_VIMAGE(vip))
 			return (ENXIO);
-		new_vnet = vip->vi_parent->v_vnet;
+		new_vnet = vip->vi_parent->v_net;
 	} else
 		LIST_FOREACH(new_vip, &vimage_head, vi_le) {
 			if (!vi_child_of(vip, new_vip))
 				continue;
 			if (strcmp(vi_req->vi_name, new_vip->vi_name) == 0) {
-				new_vnet = new_vip->v_vnet;
+				new_vnet = new_vip->v_net;
 				break;
 			}
 		}
@@ -502,8 +502,8 @@
 		bcopy(&vip_r->v_procg->_averunnable, &vi_req->averunnable,
 		    sizeof (vi_req->averunnable));
 		vi_req->vi_proc_count = vip_r->v_procg->nprocs;
-		vi_req->vi_if_count = vip_r->v_vnet->ifccnt;
-		vi_req->vi_sock_count = vip_r->v_vnet->sockcnt;
+		vi_req->vi_if_count = vip_r->v_net->ifccnt;
+		vi_req->vi_sock_count = vip_r->v_net->sockcnt;
 		vi_req->cp_time_avg = vip_r->v_cpu->_avg2_fixp;
 		break;
 
@@ -614,7 +614,7 @@
 	vnet = vi_malloc(sizeof(struct vnet), M_VNET, M_NOWAIT | M_ZERO);
 	if (vnet == NULL)
 		panic("vi_alloc: malloc failed for vnet \"%s\"\n", name);
-	vip->v_vnet = vnet;
+	vip->v_net = vnet;
 	vnet->vnet_id = last_vnet_id++;
 	vnet->vnet_magic_n = VNET_MAGIC_N;
 
@@ -669,7 +669,7 @@
 static int
 vi_destroy(struct vimage *vip)
 {
-	struct vnet *vnet = vip->v_vnet;
+	struct vnet *vnet = vip->v_net;
 	struct vprocg *vprocg = vip->v_procg;
 	struct vcpu *vcpu = vip->v_cpu;
 	struct ifnet *ifp, *nifp;

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

@@ -276,11 +276,11 @@
 #define INIT_VCPU(arg)		struct vcpu *vcpu = (arg);
 
 #define TD_TO_VIMAGE(td)	(td)->td_ucred->cr_vimage
-#define TD_TO_VNET(td)		(td)->td_ucred->cr_vimage->v_vnet
+#define TD_TO_VNET(td)		(td)->td_ucred->cr_vimage->v_net
 #define TD_TO_VPROCG(td)	(td)->td_ucred->cr_vimage->v_procg
 #define TD_TO_VCPU(td)		(td)->td_ucred->cr_vimage->v_cpu
 #define P_TO_VIMAGE(p)		(p)->p_ucred->cr_vimage
-#define P_TO_VNET(p)		(p)->p_ucred->cr_vimage->v_vnet
+#define P_TO_VNET(p)		(p)->p_ucred->cr_vimage->v_net
 #define P_TO_VPROCG(p)		(p)->p_ucred->cr_vimage->v_procg
 #define P_TO_VCPU(p)		(p)->p_ucred->cr_vimage->v_cpu
 
@@ -388,7 +388,7 @@
 
 	struct	vprocg *v_procg;
 	struct	vcpu *v_cpu;
-	struct	vnet *v_vnet;
+	struct	vnet *v_net;
 };
 
 struct vprocg {


More information about the p4-projects mailing list