Date: Thu, 4 Jun 2009 07:32:47 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 163477 for review Message-ID: <200906040732.n547Wliw025622@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163477 Change 163477 by zec@zec_amdx4 on 2009/06/04 07:32:16 Reduce diff against head, mostly WS. Affected files ... .. //depot/projects/vimage/src/sys/net/if_loop.c#49 edit .. //depot/projects/vimage/src/sys/net/route.c#52 edit .. //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#26 edit .. //depot/projects/vimage/src/sys/netgraph/ng_base.c#58 edit .. //depot/projects/vimage/src/sys/netgraph/ng_ether.c#24 edit .. //depot/projects/vimage/src/sys/netgraph/ng_iface.c#25 edit .. //depot/projects/vimage/src/sys/netinet/ip_divert.c#33 edit .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#85 edit .. //depot/projects/vimage/src/sys/netinet6/nd6.c#53 edit .. //depot/projects/vimage/src/sys/nfsclient/bootp_subr.c#20 edit .. //depot/projects/vimage/src/sys/nfsclient/nfs_vnops.c#36 edit Differences ... ==== //depot/projects/vimage/src/sys/net/if_loop.c#49 (text+ko) ==== @@ -138,7 +138,7 @@ #ifdef INVARIANTS INIT_VNET_NET(ifp->if_vnet); #endif - + /* XXX: destroying lo0 will lead to panics. */ KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); ==== //depot/projects/vimage/src/sys/net/route.c#52 (text+ko) ==== @@ -186,7 +186,7 @@ route_init(void) { - /* whack the tunable ints into line. */ + /* whack the tunable ints into line. */ if (rt_numfibs > RT_MAXFIBS) rt_numfibs = RT_MAXFIBS; if (rt_numfibs == 0) @@ -219,7 +219,7 @@ for (table = 0; table < rt_numfibs; table++) { if ( (fam = dom->dom_family) == AF_INET || table == 0) { - /* for now only AF_INET has > 1 table */ + /* for now only AF_INET has > 1 table */ /* XXX MRT * rtattach will be also called * from vfs_export.c but the ==== //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#26 (text+ko) ==== @@ -159,7 +159,6 @@ break; } - /* XXX to lock or not to lock the vnet list - we are in DDB here? */ VNET_FOREACH(vnet_iter) { INIT_VNET_NET(vnet_iter); TAILQ_FOREACH(ifp, &V_ifnet, if_list) ==== //depot/projects/vimage/src/sys/netgraph/ng_base.c#58 (text+ko) ==== @@ -84,6 +84,11 @@ /* Mutex to protect topology events. */ static struct mtx ng_topo_mtx; +static vnet_attach_fn vnet_netgraph_iattach; +#ifdef VIMAGE +static vnet_detach_fn vnet_netgraph_idetach; +#endif + #ifdef NETGRAPH_DEBUG static struct mtx ng_nodelist_mtx; /* protects global node/hook lists */ static struct mtx ngq_mtx; /* protects the queue item list */ @@ -138,10 +143,10 @@ 1, /* refs */ NULL, /* vnet */ #ifdef NETGRAPH_DEBUG - .nd_magic = ND_MAGIC, - .lastfile = __FILE__, - .lastline = __LINE__, - .nd_all = {NULL} + ND_MAGIC, + __FILE__, + __LINE__, + {NULL} #endif /* NETGRAPH_DEBUG */ }; @@ -267,11 +272,6 @@ #define NG_WORKLIST_WAKEUP() \ wakeup_one(&ng_worklist) -static vnet_attach_fn vnet_netgraph_iattach; -#ifdef VIMAGE -static vnet_detach_fn vnet_netgraph_idetach; -#endif /* VIMAGE */ - #ifdef NETGRAPH_DEBUG /*----------------------------------------------*/ /* * In debug mode: @@ -3077,7 +3077,7 @@ } #ifndef VIMAGE_GLOBALS -static vnet_modinfo_t vnet_netgraph_modinfo = { +static const vnet_modinfo_t vnet_netgraph_modinfo = { .vmi_id = VNET_MOD_NETGRAPH, .vmi_name = "netgraph", .vmi_size = sizeof(struct vnet_netgraph), @@ -3089,6 +3089,41 @@ }; #endif +static int vnet_netgraph_iattach(const void *unused) +{ + INIT_VNET_NETGRAPH(curvnet); + + V_nextID = 1; + + return 0; +} + +#ifdef VIMAGE +static int vnet_netgraph_idetach(const void *unused) +{ + INIT_VNET_NETGRAPH(curvnet); + node_p node, last_killed = NULL; + + while ((node = LIST_FIRST(&V_ng_nodelist)) != NULL) { + if (node == last_killed) { + /* This should never happen */ + node->nd_flags |= NGF_REALLY_DIE; + printf("netgraph node %s needs NGF_REALLY_DIE\n", + node->nd_name); + ng_rmnode(node, NULL, NULL, 0); + /* This must never happen */ + if (node == LIST_FIRST(&V_ng_nodelist)) + panic("netgraph node %s won't die", + node->nd_name); + } + ng_rmnode(node, NULL, NULL, 0); + last_killed = node; + } + + return 0; +} +#endif /* VIMAGE */ + /* * Handle loading and unloading for this code. * The only thing we need to link into is the NETISR strucure. @@ -3153,44 +3188,6 @@ return (error); } -static int vnet_netgraph_iattach(const void *unused) -{ - INIT_VNET_NETGRAPH(curvnet); - -#ifdef VIMAGE - LIST_INIT(&V_ng_nodelist); /* XXX should go away */ -#endif - V_nextID = 1; - - return 0; -} - -#ifdef VIMAGE -static int vnet_netgraph_idetach(const void *unused) -{ - INIT_VNET_NETGRAPH(curvnet); - node_p node, last_killed = NULL; - - while ((node = LIST_FIRST(&V_ng_nodelist)) != NULL) { - if (node == last_killed) { - /* This should never happen */ - node->nd_flags |= NGF_REALLY_DIE; - printf("netgraph node %s needs NGF_REALLY_DIE\n", - node->nd_name); - ng_rmnode(node, NULL, NULL, 0); - /* This must never happen */ - if (node == LIST_FIRST(&V_ng_nodelist)) - panic("netgraph node %s won't die", - node->nd_name); - } - ng_rmnode(node, NULL, NULL, 0); - last_killed = node; - } - - return 0; -} -#endif /* VIMAGE */ - static moduledata_t netgraph_mod = { "netgraph", ngb_mod_event, ==== //depot/projects/vimage/src/sys/netgraph/ng_ether.c#24 (text+ko) ==== @@ -782,6 +782,7 @@ ng_ether_input_p = ng_ether_input; ng_ether_input_orphan_p = ng_ether_input_orphan; ng_ether_link_state_p = ng_ether_link_state; + #ifndef VIMAGE_GLOBALS vnet_mod_register(&vnet_ng_ether_modinfo); #else ==== //depot/projects/vimage/src/sys/netgraph/ng_iface.c#25 (text+ko) ==== @@ -908,6 +908,6 @@ #endif delete_unrhdr(V_ng_iface_unit); - + return (0); } ==== //depot/projects/vimage/src/sys/netinet/ip_divert.c#33 (text+ko) ==== @@ -131,7 +131,6 @@ { INIT_VNET_INET(curvnet); - V_divcbinfo.ipi_vnet = curvnet; INP_INFO_LOCK_INIT(&V_divcbinfo, "div"); LIST_INIT(&V_divcb); V_divcbinfo.ipi_listhead = &V_divcb; ==== //depot/projects/vimage/src/sys/netinet/tcp_subr.c#85 (text+ko) ==== @@ -346,6 +346,8 @@ V_tcp_autosndbuf_inc = 8*1024; V_tcp_autosndbuf_max = 256*1024; + V_nolocaltimewait = 0; + V_tcp_do_sack = 1; V_tcp_sack_maxholes = 128; V_tcp_sack_globalmaxholes = 65536; ==== //depot/projects/vimage/src/sys/netinet6/nd6.c#53 (text+ko) ==== @@ -1157,6 +1157,7 @@ LLE_WUNLOCK(ln); } + int nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) { ==== //depot/projects/vimage/src/sys/nfsclient/bootp_subr.c#20 (text+ko) ==== @@ -386,7 +386,6 @@ printf("\n"); } -/* XXX we are only going to look at interfaces in the base vimage */ void bootpboot_p_iflist(void) { ==== //depot/projects/vimage/src/sys/nfsclient/nfs_vnops.c#36 (text+ko) ==== @@ -53,7 +53,7 @@ #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/namei.h> -#include <sys/socketvar.h> +#include <sys/socket.h> #include <sys/vnode.h> #include <sys/dirent.h> #include <sys/fcntl.h> @@ -1520,7 +1520,6 @@ if (v3) { tl = nfsm_build(u_int32_t *, NFSX_UNSIGNED); if (fmode & O_EXCL) { - CURVNET_SET(P_TO_VNET(&proc0)); /* XXX revisit! */ *tl = txdr_unsigned(NFSV3CREATE_EXCLUSIVE); tl = nfsm_build(u_int32_t *, NFSX_V3CREATEVERF); #ifdef INET
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906040732.n547Wliw025622>