diff options
author | zec <zec@FreeBSD.org> | 2009-04-06 22:29:41 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2009-04-06 22:29:41 +0000 |
commit | c85551e0bc714ce0e1634c2d308b1616c8dd88ca (patch) | |
tree | 1b479c98f577a974d301743e3161bc32e49c0e64 /sys/netinet/vinet.h | |
parent | f28ea657e983e90686b8309747fd1c6ad718135c (diff) | |
download | FreeBSD-src-c85551e0bc714ce0e1634c2d308b1616c8dd88ca.zip FreeBSD-src-c85551e0bc714ce0e1634c2d308b1616c8dd88ca.tar.gz |
First pass at separating per-vnet initializer functions
from existing functions for initializing global state.
At this stage, the new per-vnet initializer functions are
directly called from the existing global initialization code,
which should in most cases result in compiler inlining those
new functions, hence yielding a near-zero functional change.
Modify the existing initializer functions which are invoked via
protosw, like ip_init() et. al., to allow them to be invoked
multiple times, i.e. per each vnet. Global state, if any,
is initialized only if such functions are called within the
context of vnet0, which will be determined via the
IS_DEFAULT_VNET(curvnet) check (currently always true).
While here, V_irtualize a few remaining global UMA zones
used by net/netinet/netipsec networking code. While it is
not yet clear to me or anybody else whether this is the right
thing to do, at this stage this makes the code more readable,
and makes it easier to track uncollected UMA-zone-backed
objects on vnet removal. In the long run, it's quite possible
that some form of shared use of UMA zone pools among multiple
vnets should be considered.
Bump __FreeBSD_version due to changes in layout of structs
vnet_ipfw, vnet_inet and vnet_net.
Approved by: julian (mentor)
Diffstat (limited to 'sys/netinet/vinet.h')
-rw-r--r-- | sys/netinet/vinet.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet/vinet.h b/sys/netinet/vinet.h index e5b0bab..b65acc1 100644 --- a/sys/netinet/vinet.h +++ b/sys/netinet/vinet.h @@ -86,6 +86,11 @@ struct vnet_inet { struct tcp_hostcache _tcp_hostcache; struct callout _tcp_hc_callout; + uma_zone_t _tcp_reass_zone; + uma_zone_t _tcpcb_zone; + uma_zone_t _tcptw_zone; + uma_zone_t _sack_hole_zone; + struct tcp_syncache _tcp_syncache; int _tcp_syncookies; int _tcp_syncookiesonly; @@ -315,12 +320,15 @@ extern struct vnet_inet vnet_inet_0; #define V_rtq_timeout VNET_INET(rtq_timeout) #define V_rtq_timer VNET_INET(rtq_timer) #define V_rtq_toomany VNET_INET(rtq_toomany) +#define V_sack_hole_zone VNET_INET(sack_hole_zone) #define V_sameprefixcarponly VNET_INET(sameprefixcarponly) #define V_ss_fltsz VNET_INET(ss_fltsz) #define V_ss_fltsz_local VNET_INET(ss_fltsz_local) #define V_subnetsarelocal VNET_INET(subnetsarelocal) #define V_tcb VNET_INET(tcb) #define V_tcbinfo VNET_INET(tcbinfo) +#define V_tcpcb_zone VNET_INET(tcpcb_zone) +#define V_tcptw_zone VNET_INET(tcptw_zone) #define V_tcp_abc_l_var VNET_INET(tcp_abc_l_var) #define V_tcp_autorcvbuf_inc VNET_INET(tcp_autorcvbuf_inc) #define V_tcp_autorcvbuf_max VNET_INET(tcp_autorcvbuf_max) @@ -353,6 +361,7 @@ extern struct vnet_inet vnet_inet_0; #define V_tcp_reass_maxseg VNET_INET(tcp_reass_maxseg) #define V_tcp_reass_overflows VNET_INET(tcp_reass_overflows) #define V_tcp_reass_qsize VNET_INET(tcp_reass_qsize) +#define V_tcp_reass_zone VNET_INET(tcp_reass_zone) #define V_tcp_sack_globalholes VNET_INET(tcp_sack_globalholes) #define V_tcp_sack_globalmaxholes VNET_INET(tcp_sack_globalmaxholes) #define V_tcp_sack_maxholes VNET_INET(tcp_sack_maxholes) |