diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-07-20 13:55:33 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-07-20 13:55:33 +0000 |
commit | d32e9e9901044568408ca4ef06315cfca9176870 (patch) | |
tree | 231030d22abc459d39df8da66a6762eaed12da1f /sys/netinet/ip_input.c | |
parent | d1ac98198b3b8168b7cd32bf3434b7dfdacb6f44 (diff) | |
download | FreeBSD-src-d32e9e9901044568408ca4ef06315cfca9176870.zip FreeBSD-src-d32e9e9901044568408ca4ef06315cfca9176870.tar.gz |
Garbage collect vnet module registrations that have neither constructors
nor destructors, as there's no actual work to do.
In most cases, the constructors weren't needed because of the existing
protocol initialization functions run by net_init_domain() as part of
VNET_MOD_NET, or they were eliminated when support for static
initialization of virtualized globals was added.
Garbage collect dependency references to modules without constructors or
destructors, notably VNET_MOD_INET and VNET_MOD_INET6.
Reviewed by: bz
Approved by: re (vimage blanket)
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 61fc835..01a0b31 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -236,24 +236,6 @@ VNET_DEFINE(int, fw_one_pass) = 1; static void ip_freef(struct ipqhead *, struct ipq *); -#ifdef VIMAGE -/* XXX only has to stay for .vmi_dependson elsewhere. */ -static void vnet_inet_register(void); - -static const vnet_modinfo_t vnet_inet_modinfo = { - .vmi_id = VNET_MOD_INET, - .vmi_name = "inet", -}; - -static void vnet_inet_register() -{ - - vnet_mod_register(&vnet_inet_modinfo); -} - -SYSINIT(inet, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, vnet_inet_register, 0); -#endif - static int sysctl_netinet_intr_queue_maxlen(SYSCTL_HANDLER_ARGS) { @@ -302,8 +284,6 @@ ip_init(void) struct protosw *pr; int i; - V_ip_id = time_second & 0xffff; - TAILQ_INIT(&V_in_ifaddrhead); V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); @@ -362,6 +342,7 @@ ip_init(void) NULL, EVENTHANDLER_PRI_ANY); /* Initialize various other remaining things. */ + V_ip_id = time_second & 0xffff; IPQ_LOCK_INIT(); netisr_register(&ip_nh); } |