freebsd-skq/sys/dev/cxgbe
John Baldwin 07159830be Add support for zero-copy aio_write() on TOE sockets.
AIO write requests for a TOE socket on a Chelsio T4+ adapter can now
DMA directly from the user-supplied buffer.  This is implemented by
wiring the pages backing the user-supplied buffer and queueing special
mbufs backed by raw VM pages to the socket buffer.  The TOE code
recognizes these special mbufs and builds a sglist from the VM page
array associated with the mbuf when queueing a work request to the TOE.

Because these mbufs do not have an associated virtual address, m_data
is not valid.  Thus, the AIO handler does not invoke sosend() directly
for these mbufs but instead inlines portions of sosend_generic() and
tcp_usr_send().

An aiotx_buffer structure is used to describe the user buffer (e.g.
it holds the array of VM pages and a reference to the AIO job).  The
special mbufs reference this structure via m_ext.  Note that a single
job might be split across multiple mbufs (e.g. if it is larger than
the socket buffer size).  The 'ext_arg2' member of each mbuf gives an
offset relative to the backing aiotx_buffer.  The AIO job associated
with an aiotx_buffer structure is completed when the last reference to
the structure is released.

Zero-copy aio_write()'s for connections associated with a given
adapter can be enabled/disabled at runtime via the
'dev.t[45]nex.N.toe.tx_zcopy' sysctl.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	Chelsio Communications
2016-07-27 18:29:35 +00:00
..
common sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
cxgbei cxgbe(4): Changes to the CPL-handler registration mechanism and code 2016-07-05 01:29:24 +00:00
firmware cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0. 2016-05-13 17:38:59 +00:00
iw_cxgbe cxgbe(4): Changes to the CPL-handler registration mechanism and code 2016-07-05 01:29:24 +00:00
tom Add support for zero-copy aio_write() on TOE sockets. 2016-07-27 18:29:35 +00:00
adapter.h cxgbe(4): Changes to the CPL-handler registration mechanism and code 2016-07-05 01:29:24 +00:00
if_cxl.c cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as 2015-02-06 01:10:04 +00:00
offload.h Add support for zero-copy aio_write() on TOE sockets. 2016-07-27 18:29:35 +00:00
osdep.h cxgbe(4): Remove __devinit and SPEED_<foo> as part of catch up with 2016-03-08 08:13:37 +00:00
t4_if.m Add a driver to create VF devices on Chelsio T4/T5 NICs. 2016-07-22 22:46:41 +00:00
t4_ioctl.h cxgbe(4): Create a reusable struct type for scheduling class parameters. 2016-06-06 20:42:46 +00:00
t4_iov.c Add a driver to create VF devices on Chelsio T4/T5 NICs. 2016-07-22 22:46:41 +00:00
t4_l2t.c cxgbe(4): Changes to the CPL-handler registration mechanism and code 2016-07-05 01:29:24 +00:00
t4_l2t.h cxgbe(4): Changes to the CPL-handler registration mechanism and code 2016-07-05 01:29:24 +00:00
t4_main.c Add support for zero-copy aio_write() on TOE sockets. 2016-07-27 18:29:35 +00:00
t4_mp_ring.c sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
t4_mp_ring.h cxgbe(4): major tx rework. 2014-12-31 23:19:16 +00:00
t4_netmap.c cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to the 2016-06-23 02:53:00 +00:00
t4_sge.c Install a handler for firmware work request error messages. 2016-07-22 21:52:07 +00:00
t4_tracer.c