freebsd kernel with SKQ
Go to file
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
bin sh: Add some consts. 2014-03-14 21:45:37 +00:00
cddl cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c 2014-03-07 23:01:35 +00:00
contrib Remove lukemftpd. It was disconnected from the build in 2009. 2014-03-14 08:43:56 +00:00
crypto Fix installations that use kernels without CAPABILITIES support. 2014-02-04 21:48:09 +00:00
etc Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
games Correct a typo in Malcolm MacDougall's name. 2014-02-15 22:15:24 +00:00
gnu Remove IPX support. 2014-03-14 02:58:48 +00:00
include Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
kerberos5 Revert my commit in r261253; the real problem was tackled in r262209. 2014-02-20 20:53:29 +00:00
lib libusb: add libusb_log_level enum 2014-03-14 20:54:15 +00:00
libexec Make bsd.test.mk the only public mk fragment for the building of tests. 2014-03-14 08:56:19 +00:00
release Remove IPX support. 2014-03-14 02:58:48 +00:00
rescue Remove IPX support. 2014-03-14 02:58:48 +00:00
sbin Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
secure multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
share A miss from r263140. 2014-03-14 17:18:21 +00:00
sys Several years after initial development, merge prototype support for 2014-03-15 00:57:50 +00:00
tests Make bsd.test.mk the only public mk fragment for the building of tests. 2014-03-14 08:56:19 +00:00
tools Remove TARGET_BIG_ENDIAN. It's no longer relevant. 2014-03-14 21:18:41 +00:00
usr.bin Don't dump entries that were modified during the time the KTR buffer was being 2014-03-14 22:07:08 +00:00
usr.sbin Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion. 2014-03-14 17:37:38 +00:00
COPYRIGHT Bump copyright year. 2013-12-31 12:18:10 +00:00
LOCKS Explicitly require Security Officer's approval for kernel PRNG bits. 2013-09-17 14:19:05 +00:00
MAINTAINERS Remove lukemftpd. It was disconnected from the build in 2009. 2014-03-14 08:43:56 +00:00
Makefile Remove the armv6eb architecture as it is unused, and almost certainly 2013-09-22 07:30:17 +00:00
Makefile.inc1 With the more generous footprints today, it makes little sense to use 2014-03-14 19:45:40 +00:00
ObsoleteFiles.inc Another miss from r263140. 2014-03-14 17:20:23 +00:00
README
UPDATING Disable libwrap (TCP wrappers) support in rpcbind by default, introducing 2014-03-06 17:33:27 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html