History log of /freebsd/sys/dev/nvmf/nvmf_tcp.c (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 365b89e8 30-Dec-2024 John Baldwin <jhb@FreeBSD.org>

nvmf: Switch several ioctls to using nvlists

For requests that handoff queues from userspace to the kernel as well
as the request to fetch reconnect parameters from the kernel, switch
from using fla

nvmf: Switch several ioctls to using nvlists

For requests that handoff queues from userspace to the kernel as well
as the request to fetch reconnect parameters from the kernel, switch
from using flat structures to nvlists. In particular, this will
permit adding support for additional transports in the future without
breaking the ABI of the structures.

Note that this is an ABI break for the ioctls used by nvmf(4) and
nvmft(4). Since this is only present in main I did not bother
implementing compatability shims.

Inspired by: imp (suggestion on a different review)
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48230

show more ...


Revision tags: release/14.2.0
# 06b2ed7a 02-Nov-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Correct padding calculation

PDU data alignment (PDA) isn't necessarily a power of 2, just a
multiple of 4, so use roundup() instead of roundup2() to compute the
PDU data offset (PDO).

Spo

nvmf_tcp: Correct padding calculation

PDU data alignment (PDA) isn't necessarily a power of 2, just a
multiple of 4, so use roundup() instead of roundup2() to compute the
PDU data offset (PDO).

Sponsored by: Chelsio Communications

show more ...


# 314cb279 31-Oct-2024 John Baldwin <jhb@FreeBSD.org>

mbuf: Don't force all M_EXTPG mbufs to be read-only

Some M_EXTPG mbufs are read-only (e.g. those backing sendfile
requests), but others are not. Add a flags argument to
mb_alloc_ext_pgs that can be

mbuf: Don't force all M_EXTPG mbufs to be read-only

Some M_EXTPG mbufs are read-only (e.g. those backing sendfile
requests), but others are not. Add a flags argument to
mb_alloc_ext_pgs that can be used to set M_RDONLY when needed rather
than setting it unconditionally. Update mb_unmapped_to_ext to
preserve M_RDONLY from the unmapped mbuf.

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D46783

show more ...


Revision tags: release/13.4.0
# bedfac1f 05-Sep-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Fully honor kern.nvmf.tcp.max_transmit_data for C2H_DATA PDUs

The previous version of tcp_send_controller_data avoided sending a
chain of multiple mbufs that exceeded the limit, but if an

nvmf_tcp: Fully honor kern.nvmf.tcp.max_transmit_data for C2H_DATA PDUs

The previous version of tcp_send_controller_data avoided sending a
chain of multiple mbufs that exceeded the limit, but if an individual
mbuf was larger than the limit it was sent as a single, over-sized
PDU. Fix by using m_split() to split individual mbufs larger than the
limit.

Note that this is not a protocol error, per se, as there is no limit
on C2H_DATA PDU lengths (unlike the MAXH2CDATA parameter). This fix
just honors the administrative limit more faithfully. This case is
also very unlikely with the default limit of 256k.

Sponsored by: Chelsio Communications

show more ...


# 8ebacb9d 30-Jul-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Correct calculation of number of TTAGs to allocate

The increment of 1 was intended to convert qp->maxr2t from 0's based
to 1 based before multiplying by the queue length.

Sponsored by: Ch

nvmf_tcp: Correct calculation of number of TTAGs to allocate

The increment of 1 was intended to convert qp->maxr2t from 0's based
to 1 based before multiplying by the queue length.

Sponsored by: Chelsio Communications

show more ...


# 19c15e41 30-Jul-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Update R2T accounting stats when aborting command buffers

If a queue pair is destroyed (e.g. due to the TCP connection dropping)
while a host to controller data transfer is in progress, th

nvmf_tcp: Update R2T accounting stats when aborting command buffers

If a queue pair is destroyed (e.g. due to the TCP connection dropping)
while a host to controller data transfer is in progress, the
pending_r2ts counter can be non-zero. This can later trigger an
assertion failure when the capsule is freed. To fix, update the
relevant R2T accounting stats when aborting active command buffers
during queue pair destruction.

Sponsored by: Chelsio Communications

show more ...


# 6df040ea 30-Jul-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Avoid setting some unused parameters in tcp_allocate_qpair

Specifically, some parameters only apply to either controller or host
queue pairs but not both.

Sponsored by: Chelsio Communicat

nvmf_tcp: Avoid setting some unused parameters in tcp_allocate_qpair

Specifically, some parameters only apply to either controller or host
queue pairs but not both.

Sponsored by: Chelsio Communications

show more ...


# a14de491 30-Jul-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Use min() to simplify a few statements

Sponsored by: Chelsio Communications


# 5d0498db 25-Jul-2024 John Baldwin <jhb@FreeBSD.org>

nvmf_tcp: Rename max_c2hdata sysctl to max_transmit_data

This sysctl sets a cap on the maximum payload of transmitted data PDUs
including both C2H_DATA and H2C_DATA PDUs, not just C2H_DATA PDUs.

Sp

nvmf_tcp: Rename max_c2hdata sysctl to max_transmit_data

This sysctl sets a cap on the maximum payload of transmitted data PDUs
including both C2H_DATA and H2C_DATA PDUs, not just C2H_DATA PDUs.

Sponsored by: Chelsio Communications

show more ...


Revision tags: release/14.1.0
# 59144db3 03-May-2024 John Baldwin <jhb@FreeBSD.org>

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 i

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

show more ...