freebsd-dev/sys/net
Stephen Hurd d300df0182 Roll up iflib commits from github. This pulls in most of the work done
by Matt Macy as well as other changes which he has accepted via pull
request to his github repo at https://github.com/mattmacy/networking/

This should bring -CURRENT and the github repo into close enough sync to
allow small feature branches rather than a large chain of interdependant
patches being developed out of tree.  The reset of the synchronization
should be able to be completed on github by splitting the remaining
changes that are not yet ready into short feature branches for later
review as smaller commits.

Here is a summary of changes included in this patch:

1)  More checks when INVARIANTS are enabled for eariler problem
    detection
2)  Group Task Queue cleanups
    - Fix use of duplicate shortdesc for gtaskqueue malloc type.
      Some interfaces such as memguard(9) use the short description to
      identify malloc types, so duplicates should be avoided.
3)  Allow gtaskqueues to use ithreads in addition to taskqueues
    - In some cases, this can improve performance
4)  Better logging when taskqgroup_attach*() fails to set interrupt
    affinity.
5)  Do not start gtaskqueues until they're needed
6)  Have mp_ring enqueue function enter the ABDICATED rather than BUSY
    state.  This moves the TX to the gtaskq and allows processing to
    continue faster as well as make TX batching more likely.
7)  Add an ift_txd_errata function to struct if_txrx.  This allows
    drivers to inspect/modify mbufs before transmission.
8)  Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need
    checksums zeroed for checksum offload to work.  This avoids modifying
    packet data in the TX path when possible.
9)  Use ithreads for iflib I/O instead of taskqueues
10) Clean up ioctl and support async ioctl functions
11) Prefetch two cachlines from each mbuf instead of one up to 128B.  We
    often need to parse packet header info beyond 64B.
12) Fix potential memory corruption due to fence post error in
    bit_nclear() usage.
13) Improved hang detection and handling
14) If the packet is smaller than MTU, disable the TSO flags.
    This avoids extra packet parsing when not needed.
15) Move TCP header parsing inside the IS_TSO?() test.
    This avoids extra packet parsing when not needed.
16) Pass chains of mbufs that are not consumed by lro to if_input()
    rather call if_input() for each mbuf.
17) Re-arrange packet header loads to get as much work as possible done
    before a cache stall.
18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/
    IFDI_DETACH();
19) Attempt to distribute RX/TX tasks across cores more sensibly,
    especially when RX and TX share an interrupt.  RX will attempt to
    take the first threads on a core, and TX will attempt to take
    successive threads.
20) Allow iflib_softirq_alloc_generic() to request affinity to the same
    cpus an interrupt has affinity with.  This allows TX queues to
    ensure they are serviced by the socket the device is on.
21) Add new iflib sysctls to net.iflib:
    - timer_int - interval at which to run per-queue timers in ticks
    - force_busdma
22) Add new per-device iflib sysctls to dev.X.Y.iflib
    - rx_budget allows tuning the batch size on the RX path
    - watchdog_events Count of watchdog events seen since load
23) Fix error where netmap_rxq_init() could get called before
    IFDI_INIT()
24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY
    when waiting for firmware
    - After interrupts are enabled, convert all waits to sleeps
    - Eliminates e1000 software/firmware synchronization busy waits after
      startup
25) e1000: Remove special case for budget=1 in em_txrx.c
    - Premature optimization which may actually be incorrect with
      multi-segment packets
26) e1000: Split out TX interrupt rather than share an interrupt for
    RX and TX.
    - Allows better performance by keeping RX and TX paths separate
27) e1000: Separate igb from em code where suitable
    Much easier to understand separate functions and "if (is_igb)" than
    previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))"

#blamebruno

Reviewed by:	sbruno
Approved by:	sbruno (mentor)
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D12235
2017-09-13 01:18:42 +00:00
..
altq Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
bpf_buffer.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
bpf_buffer.h
bpf_filter.c Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
bpf_jitter.c Use kmem_malloc() instead of malloc(9) for the native amd64 filter. 2017-04-17 22:02:09 +00:00
bpf_jitter.h Use kmem_malloc() instead of malloc(9) for the native amd64 filter. 2017-04-17 22:02:09 +00:00
bpf_zerocopy.c
bpf_zerocopy.h
bpf.c bpf: Fix incorrect cleanup 2017-08-16 19:40:07 +00:00
bpf.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
bpfdesc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
bridgestp.c sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
bridgestp.h
dlt.h MFV r313759: license change for a few headers (4 clause BSD to 3 clause BSD). 2017-02-15 07:22:47 +00:00
ethernet.h ethernet: Add ethernet interface attached event and devctl notification. 2017-07-24 03:32:10 +00:00
fddi.h
firewire.h
ieee8023ad_lacp.c Make LACP based lagg work with interfaces (like 100Gbps and 25Gbps) that 2017-09-06 14:36:35 +00:00
ieee8023ad_lacp.h Implement kernel support for hardware rate limited sockets. 2017-01-18 13:31:17 +00:00
ieee_oui.h
if_arc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_arcsubr.c Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
if_arp.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_bridge.c Make if_bridge complain if it can't disable some capabilities. 2017-04-29 08:52:07 +00:00
if_bridgevar.h bridge: Release the bridge lock when calling bridge_set_ifcap() 2017-01-25 21:25:26 +00:00
if_clone.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_clone.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_dead.c Implement kernel support for hardware rate limited sockets. 2017-01-18 13:31:17 +00:00
if_debug.c Add more fields to if_debug.c for ddb(4) 'show ifnet'; resort 2016-06-22 12:53:10 +00:00
if_disc.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_dl.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_edsc.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_enc.c Add to if_enc(4) ability to capture packets via BPF after pfil processing. 2017-08-09 12:24:07 +00:00
if_enc.h Add inpcb pointer to struct ipsec_ctx_data and pass it to the pfil hook 2017-07-31 11:04:35 +00:00
if_epair.c Fixed typo in comment found while reading commit email for fix of 2017-04-08 04:50:50 +00:00
if_ethersubr.c ethernet: Add ethernet interface attached event and devctl notification. 2017-07-24 03:32:10 +00:00
if_fddisubr.c sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
if_fwsubr.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_gif.c Extract out the various local definitions of ETHER_IS_BROADCAST() and 2016-08-07 03:48:33 +00:00
if_gif.h
if_gre.c Do not adjust interface MTU automatically. Leave this task to the system 2017-04-11 08:56:18 +00:00
if_gre.h Do not adjust interface MTU automatically. Leave this task to the system 2017-04-11 08:56:18 +00:00
if_ipsec.c Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
if_ipsec.h Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
if_iso88025subr.c sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
if_lagg.c Don't hold the RM lock during lagg_proto_addport() to avoid an LOR. 2017-07-25 14:41:50 +00:00
if_lagg.h Remove some code, dead from the day one. 2017-05-25 23:19:09 +00:00
if_llatbl.c Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
if_llatbl.h Make LLTABLE list lock private for if_llatbl.c 2016-10-11 17:41:13 +00:00
if_llc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_loop.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_me.c Do not adjust interface MTU automatically. Leave this task to the system 2017-04-11 08:56:18 +00:00
if_media.c Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
if_media.h Add several new media types to if_media.h 2017-05-10 18:33:40 +00:00
if_mib.c
if_mib.h
if_pflog.h
if_pfsync.h
if_sppp.h sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
if_spppfr.c
if_spppsubr.c sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
if_stf.c Remove the unused mutex since r273220. 2017-07-28 04:41:57 +00:00
if_tap.c
if_tap.h
if_tapvar.h
if_tun.c Allow writing IP packets of length TUNMRU no matter if TUNSIFHEAD is set 2016-05-19 13:52:12 +00:00
if_tun.h Allow an MTU of 65535 bytes to be set via TUN[SG]IFINFO. This requires 2016-05-24 11:47:14 +00:00
if_types.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
if_var.h Add support for generic backpressure indicator for ratelimited 2017-09-06 13:56:18 +00:00
if_vlan_var.h Add support to priority code point (PCP) that is an 3-bit field 2016-06-06 09:51:58 +00:00
if_vlan.c Allow vlan interfaces to rx through netmap(4). 2017-09-13 00:25:09 +00:00
if_vxlan.c net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties 2016-06-07 04:51:50 +00:00
if_vxlan.h
if.c if: Add ioctls to get RSS key and hash type/function. 2017-09-05 05:28:52 +00:00
if.h if: Add ioctls to get RSS key and hash type/function. 2017-09-05 05:28:52 +00:00
ifdi_if.m IFLIB updates 2017-03-13 22:53:06 +00:00
iflib.c Roll up iflib commits from github. This pulls in most of the work done 2017-09-13 01:18:42 +00:00
iflib.h Roll up iflib commits from github. This pulls in most of the work done 2017-09-13 01:18:42 +00:00
ifq.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
iso88025.h
mp_ring.c Roll up iflib commits from github. This pulls in most of the work done 2017-09-13 01:18:42 +00:00
mp_ring.h Import the 'iflib' API library for network drivers. From the author: 2016-05-18 04:35:58 +00:00
mppc.h ng_mppc(4): Bring netgraph(3) MPPC compression support. 2016-06-07 15:07:00 +00:00
mppcc.c ng_mppc(4):: basic readability cleanups. 2016-07-09 02:33:45 +00:00
mppcd.c ng_mppc(4):: basic readability cleanups. 2016-07-09 02:33:45 +00:00
netisr_internal.h
netisr.c Bring back r313037, with fixes for mips: 2017-02-19 02:03:09 +00:00
netisr.h Remove the NATM framework including the en(4), fatm(4), hatm(4), and 2017-04-24 21:21:49 +00:00
netmap_user.h Update netmap_user.h with the current version of netmap. This file should 2017-07-21 03:42:09 +00:00
netmap_virt.h Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: 2016-10-27 09:46:22 +00:00
netmap.h Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: 2016-10-27 09:46:22 +00:00
paravirt.h
pfil.c Remove "IPFW static rules" rmlock. 2017-04-03 13:35:04 +00:00
pfil.h Remove "IPFW static rules" rmlock. 2017-04-03 13:35:04 +00:00
pfkeyv2.h Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
pfvar.h pf: Fix possible shutdown race 2017-03-22 21:18:18 +00:00
ppp_defs.h
radix_mpath.c
radix_mpath.h
radix.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
radix.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
raw_cb.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
raw_cb.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
raw_usrreq.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rndis.h rndis: Add LINK_SPEED_CHANGE status 2017-07-24 03:59:50 +00:00
route_var.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
route.c After inpcb route caching was put back in place there is no need for 2017-07-27 13:03:36 +00:00
route.h Garbage collect RT_NORTREF, which is no longer in use after FLOWTABLE removal. 2017-08-24 23:08:12 +00:00
rss_config.c sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
rss_config.h
rtsock.c Fix typo in comment. 2017-04-08 04:37:01 +00:00
sff8436.h
sff8472.h sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
slcompress.c Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
slcompress.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
toeplitz.c
toeplitz.h
vnet.c Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
vnet.h Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00