PERFORCE change 163427 for review

Marko Zec zec at FreeBSD.org
Wed Jun 3 16:55:28 UTC 2009


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

Change 163427 by zec at zec_amdx4 on 2009/06/03 16:55:04

	Unbreak GENERIC and VIMAGE builds, hopefully LINT and VLINT
	as well.
	
	While here, trim down a few unnecessary diffs against head.

Affected files ...

.. //depot/projects/vimage/src/sys/net/netisr.h#9 edit
.. //depot/projects/vimage/src/sys/net/route.c#51 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_iface.c#24 edit
.. //depot/projects/vimage/src/sys/netinet/igmp.c#42 edit
.. //depot/projects/vimage/src/sys/netinet/in_rmx.c#36 edit
.. //depot/projects/vimage/src/sys/netinet/ip_fw2.c#78 edit
.. //depot/projects/vimage/src/sys/netinet6/nd6.c#52 edit
.. //depot/projects/vimage/src/sys/netipsec/ipsec.c#48 edit
.. //depot/projects/vimage/src/sys/netipsec/xform_esp.c#26 edit
.. //depot/projects/vimage/src/sys/nlm/nlm_advlock.c#9 edit
.. //depot/projects/vimage/src/sys/rpc/rpc.h#6 edit
.. //depot/projects/vimage/src/sys/sys/sysctl.h#37 edit
.. //depot/projects/vimage/src/sys/sys/ucred.h#11 edit

Differences ...

==== //depot/projects/vimage/src/sys/net/netisr.h#9 (text+ko) ====

@@ -50,6 +50,7 @@
 #define	NETISR_ETHER	9		/* ethernet input */
 #define	NETISR_IPV6	10
 #define	NETISR_NATM	11
+#define	NETISR_EPAIR	12
 
 /*-
  * Protocols express ordering constraints and affinity preferences by

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

@@ -249,7 +249,7 @@
 	int table;
 	int fam;
 	struct domain *dom;
-	INIT_VNET_NET(curvnet);
+	struct radix_node_head **rnh;
 
 	for (dom = domains; dom; dom = dom->dom_next) {
 		if (dom->dom_rtdetach)  {
@@ -257,8 +257,10 @@
 				if ( (fam = dom->dom_family) == AF_INET ||
 				    table == 0) {
  					/* for now only AF_INET has > 1 table */
-					dom->dom_rtdetach(
-				    	    (void **)&V_rt_tables[table][fam],
+					rnh = rt_tables_get_rnh_ptr(table, fam);
+					if (rnh == NULL)
+						panic("%s: rnh NULL", __func__);
+					dom->dom_rtdetach((void **)rnh,
 				    	    dom->dom_rtoffset);
 				} else {
 					break;

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

@@ -123,10 +123,6 @@
 static int	ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
 static int	ng_iface_output(struct ifnet *ifp, struct mbuf *m0,
     			struct sockaddr *dst, struct route *ro);
-#ifdef VIMAGE
-static void	ng_iface_reassign(struct ifnet *ifp, struct vnet *vnet,
-			char *dname);
-#endif
 static void	ng_iface_bpftap(struct ifnet *ifp,
 			struct mbuf *m, sa_family_t family);
 static int	ng_iface_send(struct ifnet *ifp, struct mbuf *m,
@@ -582,9 +578,6 @@
 	ifp->if_output = ng_iface_output;
 	ifp->if_start = ng_iface_start;
 	ifp->if_ioctl = ng_iface_ioctl;
-#ifdef VIMAGE
-	ifp->if_reassign = ng_iface_reassign;
-#endif
 	ifp->if_watchdog = NULL;
 	ifp->if_mtu = NG_IFACE_MTU_DEFAULT;
 	ifp->if_flags = (IFF_SIMPLEX|IFF_POINTOPOINT|IFF_NOARP|IFF_MULTICAST);
@@ -609,24 +602,6 @@
 	return (0);
 }
 
-#ifdef VIMAGE
-static void
-ng_iface_reassign(struct ifnet *ifp, struct vnet *vnet, char *dname)
-{
-	bpfdetach(ifp);
-	if_detach(ifp);
-	ifp->if_bpf = NULL;
-	if_reassign_common(ifp, vnet, "ser");
-	if (dname)
-		snprintf(ifp->if_xname, IFNAMSIZ, "%s", dname);
- 
-	CURVNET_SET_QUIET(vnet);
-	if_attach(ifp);
-	bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));
-	CURVNET_RESTORE();
-}
-#endif
-
 /*
  * Give our ok for a hook to be added
  */

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

@@ -1993,7 +1993,6 @@
 static void
 igmp_v3_cancel_link_timers(struct igmp_ifinfo *igi)
 {
-	INIT_VNET_INET(curvnet);
 	struct ifmultiaddr	*ifma;
 	struct ifnet		*ifp;
 	struct in_multi		*inm;

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

@@ -64,9 +64,9 @@
 #include <netinet/ip_var.h>
 #include <netinet/vinet.h>
 
-int	in_inithead(void **head, int off);
+extern int	in_inithead(void **head, int off);
 #ifdef VIMAGE
-int	in_detachhead(void **head, int off);
+extern int	in_detachhead(void **head, int off);
 #endif
 
 #define RTPRF_OURS		RTF_PROTO3	/* set on routes we manage */
@@ -248,6 +248,8 @@
 static struct callout rtq_timer;
 #endif
 
+static void in_rtqtimo_one(void *rock);
+
 static void
 in_rtqtimo(void *rock)
 {
@@ -272,6 +274,7 @@
 in_rtqtimo_one(void *rock)
 {
 	INIT_VNET_INET(curvnet);
+	struct radix_node_head *rnh = rock;
 	struct rtqk_arg arg;
 	static time_t last_adjusted_timeout = 0;
 
@@ -310,26 +313,7 @@
 		rnh->rnh_walktree(rnh, in_rtqkill, &arg);
 		RADIX_NODE_HEAD_UNLOCK(rnh);
 	}
-}
-
-static void
-in_rtqtimo(void *rock)
-{
-	int fibnum;
-	void *newrock;
-	CURVNET_SET_QUIET((struct vnet *) rock);
-	INIT_VNET_NET((struct vnet *) rock);
-	INIT_VNET_INET((struct vnet *) rock);
-	struct timeval atv;
 
-	for (fibnum = 0; fibnum < rt_numfibs; fibnum++) {
-		if ((newrock = V_rt_tables[fibnum][AF_INET]) != NULL)
-			in_rtqtimo_one(newrock);
-	}
-	atv.tv_usec = 0;
-	atv.tv_sec = V_rtq_timeout;
-	callout_reset(&V_rtq_timer, tvtohz(&atv), in_rtqtimo, rock);
-	CURVNET_RESTORE();
 }
 
 void

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

@@ -141,14 +141,15 @@
 static int fw_verbose;
 static struct callout ipfw_timeout;
 static int verbose_limit;
+static uma_zone_t ipfw_dyn_rule_zone;
+struct ip_fw_chain layer3_chain;
+#endif
+
 #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
 static int default_to_accept = 1;
 #else
 static int default_to_accept;
 #endif
-static uma_zone_t ipfw_dyn_rule_zone;
-struct ip_fw_chain layer3_chain;
-#endif
 
 MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's");
 MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables");

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

@@ -196,6 +196,7 @@
 nd6_destroy()
 {
 	INIT_VNET_INET6(curvnet);
+
 	callout_drain(&V_nd6_slowtimo_ch);
 	callout_drain(&V_nd6_timer_ch);
 }

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

@@ -1800,7 +1800,7 @@
 }
 
 static int
-ipsec_iattach(const void *unused)
+ipsec_iattach(const void *unused __unused)
 {
 	INIT_VNET_IPSEC(curvnet);
 
@@ -1816,6 +1816,7 @@
 ipsec_idetach(unused)
 	const void *unused;
 {
+
 	return (0);
 }
 #endif

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

@@ -90,7 +90,6 @@
 
 static int esp_input_cb(struct cryptop *op);
 static int esp_output_cb(struct cryptop *crp);
-
 static int esp_iattach(const void *);
 
 #ifndef VIMAGE_GLOBALS
@@ -998,6 +997,18 @@
 	esp_output
 };
 
+static void
+esp_attach(void)
+{
+
+	xform_register(&esp_xformsw);
+#ifndef VIMAGE_GLOBALS
+	vnet_mod_register(&vnet_esp_modinfo);
+#else
+	esp_iattach(NULL);
+#endif
+}
+
 static int
 esp_iattach(const void *unused __unused)
 {
@@ -1018,21 +1029,8 @@
 	MAXIV(enc_xform_skipjack);	/* SADB_X_EALG_SKIPJACK */
 	MAXIV(enc_xform_null);		/* SADB_EALG_NULL */
 	MAXIV(enc_xform_camellia);	/* SADB_X_EALG_CAMELLIACBC */
-
 #undef MAXIV
 
 	return (0);
 }
-
-static void
-esp_attach(void)
-{
-
-#ifndef VIMAGE_GLOBALS
-	vnet_mod_register(&vnet_esp_modinfo);
-#else
-	esp_iattach(NULL);
-#endif
-	xform_register(&esp_xformsw);
-}
 SYSINIT(esp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, esp_attach, NULL);

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

@@ -44,7 +44,6 @@
 #include <sys/systm.h>
 #include <sys/unistd.h>
 #include <sys/vnode.h>
-#include <sys/vimage.h>
 
 #include <nfs/nfsproto.h>
 #include <nfsclient/nfs.h>

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

@@ -42,7 +42,6 @@
 #ifndef _RPC_RPC_H
 #define _RPC_RPC_H
 
-#include <sys/param.h>
 #include <rpc/types.h>		/* some typedefs */
 #include <sys/socket.h>
 #include <netinet/in.h>

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

@@ -448,7 +448,7 @@
  * Resolve void *arg1 in a proper virtualization container.
  */
 #ifdef VIMAGE
-#define	SYSCTL_RESOLVE_V_ARG1() do {					\
+#define SYSCTL_RESOLVE_V_ARG1() do {					\
 	char *cp;							\
 	switch (oidp->oid_v_subs) {					\
 	case V_GLOBAL:							\

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

@@ -35,8 +35,6 @@
 
 #include <bsm/audit.h>
 
-struct vimage;
-
 /*
  * Credentials.
  *


More information about the p4-projects mailing list