freebsd-dev/sys/dev/netmap
Sean Bruno 23c9098b2a Change EM_MULTIQUEUE to a real kernconf entry and enable support for
up to 2 rx/tx queues for the 82574.

Program the 82574 to enable 5 msix vectors, assign 1 to each rx queue,
1 to each tx queue and 1 to the link handler.

Inspired by DragonFlyBSD, enable some RSS logic for handling tx queue
handling/processing.

Move multiqueue handler functions so that they line up better in a diff
review to if_igb.c

Always enqueue tx work to be done in em_mq_start, if unable to acquire
the TX lock, then this will be processed in the background later by the
taskqueue.  Remove mbuf argument from em_start_mq_locked() as the work
is always enqueued.  (stolen from igb)

Setup TARC, TXDCTL and RXDCTL registers for better performance and stability
in multiqueue and singlequeue implementations. Handle Intel errata  3 and
generic multiqueue behavior with the initialization of TARC(0) and TARC(1)

Bind interrupt threads to cpus in order.  (stolen from igb)

Add 2 new DDB functions, one to display the queue(s) and their settings and
one to reset the adapter.  Primarily used for debugging.

In the multiqueue configuration, bump RXD and TXD ring size to max for the
adapter (4096).  Setup an RDTR of 64 and an RADV of 128 in multiqueue configuration
to cut down on the number of interrupts.  RADV was arbitrarily set to 2x RDTR
and can be adjusted as needed.

Cleanup the display in top a bit to make it clearer where the taskqueue threads
are running and what they should be doing.

Ensure that both queues are processed by em_local_timer() by writing them both
to the IMS register to generate soft interrupts.

Ensure that an soft interrupt is generated when em_msix_link() is run so that
any races between assertion of the link/status interrupt and a rx/tx interrupt
are handled.

Document existing tuneables: hw.em.eee_setting, hw.em.msix, hw.em.smart_pwr_down, hw.em.sbp

Document use of hw.em.num_queues and the new kernel option EM_MULTIQUEUE

Thanks to Intel for their continued support of FreeBSD.

Reviewed by:	erj jfv hiren gnn wblock
Obtained from:	Intel Corporation
MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D1994
2015-06-03 18:01:09 +00:00
..
if_em_netmap.h Change EM_MULTIQUEUE to a real kernconf entry and enable support for 2015-06-03 18:01:09 +00:00
if_igb_netmap.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
if_ixl_netmap.h Add native netmap support to ixl. 2015-02-24 06:20:50 +00:00
if_lem_netmap.h Mechanically convert to if_inc_counter(). 2014-09-19 03:51:26 +00:00
if_re_netmap.h Mechanically convert to if_inc_counter(). 2014-09-19 03:51:26 +00:00
if_vtnet_netmap.h staticize two functions, and use proper format for a struct sglist 2014-08-17 10:25:27 +00:00
ixgbe_netmap.h Make ix_crcstrip a public symbol for the moment; it probably is not 2015-03-24 09:46:47 +00:00
netmap_freebsd.c add MODULE_VERSION, needed to track module dependencies 2015-02-23 07:28:31 +00:00
netmap_generic.c sync a comment with our internal repo 2014-11-10 20:19:58 +00:00
netmap_kern.h add support for private knote lock (reduces lock contention), 2014-11-13 00:40:34 +00:00
netmap_mbq.c introduce mbq_lock() and mbq_unlock() for the mbq, 2014-06-06 18:02:32 +00:00
netmap_mbq.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
netmap_mem2.c When a netmap process terminates without the full set of buffers it 2015-05-15 15:36:57 +00:00
netmap_mem2.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
netmap_monitor.c we need full barriers here 2014-11-13 00:14:25 +00:00
netmap_offloadings.c Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
netmap_pipe.c we need full barriers here 2014-11-13 00:14:25 +00:00
netmap_vale.c Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
netmap.c netmap: improve the netmap attach message on FreeBSD. 2015-04-11 06:20:46 +00:00