diff options
author | bz <bz@FreeBSD.org> | 2016-06-03 13:57:10 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2016-06-03 13:57:10 +0000 |
commit | 69cdb2137c13e36cbc467dd745ab15126fc22063 (patch) | |
tree | b9bad282d3f1a106a25f2d6b11e1232e2b57223b /share/man | |
parent | 28ea44dac8d1daa2b1d50448cbbb48c2f51045fd (diff) | |
download | FreeBSD-src-69cdb2137c13e36cbc467dd745ab15126fc22063.zip FreeBSD-src-69cdb2137c13e36cbc467dd745ab15126fc22063.tar.gz |
Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.
Add accessor functions to toggle the state per VNET.
The base system (vnet0) will always enable itself with the normal
registration. We will share the registered protocol handlers in all
VNETs minimising duplication and management.
Upon disabling netisr processing for a VNET drain the netisr queue from
packets for that VNET.
Update netisr consumers to (de)register on a per-VNET start/teardown using
VNET_SYS(UN)INIT functionality.
The change should be transparent for non-VIMAGE kernels.
Reviewed by: gnn (, hiren)
Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6691
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man9/netisr.9 | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/share/man/man9/netisr.9 b/share/man/man9/netisr.9 index 63112be..ac648d1 100644 --- a/share/man/man9/netisr.9 +++ b/share/man/man9/netisr.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2015 +.Dd June 3, 2016 .Dt NETISR 9 .Os .Sh NAME @@ -61,6 +61,16 @@ .Fn netisr_get_cpucount "void" .Ft u_int .Fn netisr_get_cpuid "u_int cpunumber" +.Pp +With optional virtual network stack support enabled via the following kernel +compile option: +.Bd -ragged -offset indent +.Cd "options VIMAGE" +.Ed +.Ft void +.Fn netisr_register_vnet "const struct netisr_handler *nhp" +.Ft void +.Fn netisr_unregister_vnet "const struct netisr_handler *nhp" .Sh DESCRIPTION The .Nm @@ -80,6 +90,16 @@ and may also manage queue limits and statistics using the and .Fn netisr_setqlimit . .Pp +In case of VIMAGE kernels each virtual network stack (vnet), that is not the +default base system network stack, calls +.Fn netisr_register_vnet +and +.Fn netisr_unregister_vnet +to enable or disable packet processing by the +.Nm +for each protocol. +Disabling will also purge any outstanding packet from the protocol queue. +.Pp .Nm supports multi-processor execution of handlers, and relies on a combination of source ordering and protocol-specific ordering and work-placement |