1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
freebsd/sys
Robert Watson 7527624efa Several years after initial development, merge prototype support for
linking NIC Receive Side Scaling (RSS) to the network stack's
connection-group implementation.  This prototype (and derived patches)
are in use at Juniper and several other FreeBSD-using companies, so
despite some reservations about its maturity, merge the patch to the
base tree so that it can be iteratively refined in collaboration rather
than maintained as a set of gradually diverging patch sets.

(1) Merge a software implementation of the Toeplitz hash specified in
    RSS implemented by David Malone.  This is used to allow suitable
    pcbgroup placement of connections before the first packet is
    received from the NIC.  Software hashing is generally avoided,
    however, due to high cost of the hash on general-purpose CPUs.

(2) In in_rss.c, maintain authoritative versions of RSS state intended
    to be pushed to each NIC, including keying material, hash
    algorithm/ configuration, and buckets.  Provide software-facing
    interfaces to hash 2- and 4-tuples for IPv4 and IPv6 using both
    the RSS standardised Toeplitz and a 'naive' variation with a hash
    efficient in software but with poor distribution properties.
    Implement rss_m2cpuid()to be used by netisr and other load
    balancing code to look up the CPU on which an mbuf should be
    processed.

(3) In the Ethernet link layer, allow netisr distribution using RSS as
    a source of policy as an alternative to source ordering; continue
    to default to direct dispatch (i.e., don't try and requeue packets
    for processing on the 'right' CPU if they arrive in a directly
    dispatchable context).

(4) Allow RSS to control tuning of connection groups in order to align
    groups with RSS buckets.  If a packet arrives on a protocol using
    connection groups, and contains a suitable hardware-generated
    hash, use that hash value to select the connection group for pcb
    lookup for both IPv4 and IPv6.  If no hardware-generated Toeplitz
    hash is available, we fall back on regular PCB lookup risking
    contention rather than pay the cost of Toeplitz in software --
    this is a less scalable but, at my last measurement, faster
    approach.  As core counts go up, we may want to revise this
    strategy despite CPU overhead.

Where device drivers suitably configure NICs, and connection groups /
RSS are enabled, this should avoid both lock and line contention during
connection lookup for TCP.  This commit does not modify any device
drivers to tune device RSS configuration to the global RSS
configuration; patches are in circulation to do this for at least
Chelsio T3 and Intel 1G/10G drivers.  Currently, the KPI for device
drivers is not particularly robust, nor aware of more advanced features
such as runtime reconfiguration/rebalancing.  This will hopefully prove
a useful starting point for refinement.

No MFC is scheduled as we will first want to nail down a more mature
and maintainable KPI/KBI for device drivers.

Sponsored by:   Juniper Networks (original work)
Sponsored by:   EMC/Isilon (patch update and merge)
2014-03-15 00:57:50 +00:00
..
amd64 Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
arm Delete stray clause 3 (Advertising clause) and renumber while i'm 2014-03-11 23:41:35 +00:00
boot Fix an uninitialized variable error I perpetrated when splitting some 2014-03-14 00:49:02 +00:00
bsm
cam Fix support for increased logical sector size (4K-native drives). 2014-03-07 09:45:40 +00:00
cddl Report ZVOL block size as GEOM stripesize. 2014-03-13 19:26:26 +00:00
compat Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 Gbit 2014-03-13 03:42:24 +00:00
conf Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
contrib Also tag the current HAL power mode in ar9300_set_power_mode(). 2014-03-10 06:05:26 +00:00
crypto
ddb
dev Use the existence of module metadata to indicate framebuffer presence 2014-03-14 19:37:37 +00:00
fs Add missing FALLTHROUGH comment in tmpfs_dir_getdents for looking up '.' and 2014-03-14 13:58:02 +00:00
gdb
geom
gnu Symbolic bindings for the dts files... 2014-02-28 16:51:33 +00:00
i386 Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
ia64 Delete stray clause 3 (Advertising clause) and renumber while i'm 2014-03-11 23:41:35 +00:00
isa
kern Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
kgssapi
libkern
mips Remove IPX support. 2014-03-14 02:58:48 +00:00
modules Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
net Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
net80211 Remove IPX support. 2014-03-14 02:58:48 +00:00
netgraph Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
netinet Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
netinet6 Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
netipsec Remove more constants related to static sysctl nodes. The MAXID constants 2014-02-25 18:44:33 +00:00
netnatm
netpfil - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
netsmb Remove IPX support. 2014-03-14 02:58:48 +00:00
nfs - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
nfsclient
nfsserver
nlm Correct a typo in nlm_find_host_by_addr(): the intention of the 2014-03-11 00:25:55 +00:00
ofed Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 Gbit 2014-03-13 03:42:24 +00:00
opencrypto allow the kern.cryptodevallowsoft sysctl to enable symetric/hashes too... 2014-03-11 01:45:46 +00:00
pc98 Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
pci
powerpc Delete stray clause 3 (Advertising clause) and renumber while i'm 2014-03-11 23:41:35 +00:00
rpc
security Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
sparc64 Delete stray clause 3 (Advertising clause) and renumber while i'm 2014-03-11 23:41:35 +00:00
sys Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
teken
tools Use proper include path for dtc as well as cpp. 2014-02-28 22:37:35 +00:00
ufs - If we fail to do a non-blocking acquire of a buf lock while doing a 2014-03-06 00:13:21 +00:00
vm Initialize paddr to handle the case of zero size. 2014-03-12 16:38:55 +00:00
x86 Correct type for malloc(). 2014-03-13 18:11:42 +00:00
xdr
xen xen: add and enable Xen console for PVH guests 2014-03-11 10:09:23 +00:00
Makefile Remove AppleTalk support. 2014-03-14 06:29:43 +00:00