freebsd-src/share
John Baldwin 59144db3fc nvmf_tcp: Add a TCP transport for NVMe over Fabrics
Structurally this is very similar to the TCP transport for iSCSI
(icl_soft.c).  One key difference is that NVMeoF transports use a more
abstract interface working with NVMe commands rather than transport
PDUs.  Thus, the data transfer for a given command is managed entirely
in the transport backend.

Similar to icl_soft.c, separate kthreads are used to handle transmit
and receive for each queue pair.  On the transmit side, when a capsule
is transmitted by an upper layer, it is placed on a queue for
processing by the transmit thread.  The transmit thread converts
command response capsules into suitable TCP PDUs where each PDU is
described by an mbuf chain that is then queued to the backing socket's
send buffer.  Command capsules can embed data along with the NVMe
command.

On the receive side, a socket upcall notifies the receive kthread when
more data arrives.  Once enough data has arrived for a PDU, the PDU is
handled synchronously in the kthread.  PDUs such as R2T or data
related PDUs are handled internally, with callbacks invoked if a data
transfer encounters an error, or once the data transfer has completed.
Received capsule PDUs invoke the upper layer's capsule_received
callback.

struct nvmf_tcp_command_buffer manages a TCP command buffer for data
transfers that do not use in-capsule-data as described in the NVMeoF
spec.  Data related PDUs such as R2T, C2H, and H2C are associated with
a command buffer except in the case of the send_controller_data
transport method which simply constructs one or more C2H PDUs from the
caller's mbuf chain.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44712
2024-05-02 16:28:47 -07:00
..
colldef
colldef_unicode
ctypedef
dict share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
doc Grammar fix in share/doc/IPv6/IMPLEMENTATION 2024-02-13 15:16:01 +08:00
dtrace libdtrace: decode all tcp header flags and add 2023-12-31 15:02:03 +01:00
examples Fix up a mistake in the CFLAGS added. Pointed out by jrtc. 2024-05-01 13:21:59 -04:00
i18n
keys
man nvmf_tcp: Add a TCP transport for NVMe over Fabrics 2024-05-02 16:28:47 -07:00
misc organization.dot: Fix typos 2024-04-18 22:02:55 +02:00
mk libnvmf: Add internal library to support NVMe over Fabrics 2024-05-02 16:28:16 -07:00
monetdef
monetdef_unicode
msgdef msgdef: fix NO and SI locales 2023-09-21 12:54:21 +02:00
msgdef_unicode
numericdef
numericdef_unicode
security
sendmail
skel dot.profile: handle symlinked $HOME 2024-02-13 13:24:22 -05:00
snmp
syscons
tabset share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
termcap share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
tests
timedef
vt Trim various $FreeBSD$ 2023-10-10 10:34:43 -07:00
zoneinfo Fix share/zoneinfo for DIRDEPS_BUILD 2023-11-20 12:52:43 -08:00
Makefile share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
Makefile.inc share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00