summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-04-29 11:52:42 +0000
committerbz <bz@FreeBSD.org>2010-04-29 11:52:42 +0000
commit0a90ef17283bc848eee90c3bdd5bec3fcc1bc879 (patch)
treee6f9695e24617b291f2a8f0b1f388eda2e605549 /sys/net/if.c
parent043deeb56455e1129861bf93ec57f03b90200344 (diff)
downloadFreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.zip
FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.tar.gz
MFP4: @176978-176982, 176984, 176990-176994, 177441
"Whitspace" churn after the VIMAGE/VNET whirls. Remove the need for some "init" functions within the network stack, like pim6_init(), icmp_init() or significantly shorten others like ip6_init() and nd6_init(), using static initialization again where possible and formerly missed. Move (most) variables back to the place they used to be before the container structs and VIMAGE_GLOABLS (before r185088) and try to reduce the diff to stable/7 and earlier as good as possible, to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9. This also removes some header file pollution for putatively static global variables. Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are no longer needed. Reviewed by: jhb Discussed with: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH MFC after: 6 days
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 98c8afa..1acfb24 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -163,9 +163,11 @@ static void if_detach_internal(struct ifnet *, int);
extern void nd6_setmtu(struct ifnet *);
#endif
+VNET_DEFINE(int, if_index);
+int ifqmaxlen = IFQ_MAXLEN;
VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */
VNET_DEFINE(struct ifgrouphead, ifg_head);
-VNET_DEFINE(int, if_index);
+
static VNET_DEFINE(int, if_indexlim) = 8;
/* Table of ifnet by index. */
@@ -174,8 +176,6 @@ static VNET_DEFINE(struct ifindex_entry *, ifindex_table);
#define V_if_indexlim VNET(if_indexlim)
#define V_ifindex_table VNET(ifindex_table)
-int ifqmaxlen = IFQ_MAXLEN;
-
/*
* The global network interface list (V_ifnet) and related state (such as
* if_index, if_indexlim, and ifindex_table) are protected by an sxlock and
OpenPOWER on IntegriCloud