<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/cxgbe/nvmf, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-04-20T17:18:04Z</updated>
<entry>
<title>nvmf_che: Don't leak a socket if an error occurs finalizing the socket</title>
<updated>2026-04-20T17:18:04Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-04-20T17:18:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=505f381cb96ee25bcf0df11cfaf15a601d969500'/>
<id>urn:sha1:505f381cb96ee25bcf0df11cfaf15a601d969500</id>
<content type='text'>
If soreserve() or sosetopt() (to set TCP_NODELAY) fails after claiming
the socket from the file descriptor, explicitly close the socket
before returning failure.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D55493
</content>
</entry>
<entry>
<title>inpcb: retire INP_DROPPED and in_pcbdrop()</title>
<updated>2026-04-12T18:33:07Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2026-04-12T18:33:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=40dbb06fa73cac37d57563c07e55efd0cabbd488'/>
<id>urn:sha1:40dbb06fa73cac37d57563c07e55efd0cabbd488</id>
<content type='text'>
The inpcb flag INP_DROPPED served two purposes.

It was used by TCP and subsystems running on top of TCP as a flag that
marks a connection that is now in TCPS_CLOSED, but was in some other state
before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED
for this purpose.

The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets
INP_DROPPED.  Use in_pcbdisconnect() instead.

Second purpose of INP_DROPPED was a negative lookup mask in
inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been
removed from the hash.  We already have had INP_INHASHLIST that marks
inpcb that is in hash.  Convert it into INP_UNCONNECTED with the opposite
meaning.  This allows to combine it with INP_FREED for the negative lookup
mask.

The Chelsio/ToE and kTLS changes are done with some style refactoring,
like moving inp/tp assignments up and using macros for that.  However, no
deep thinking was taken to check if those checks are really needed, it
could be that some are not.

Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D56186
</content>
</entry>
<entry>
<title>nvmf_che: Fix amd64 LINT-NOVIMAGE build</title>
<updated>2025-11-12T20:04:48Z</updated>
<author>
<name>Navdeep Parhar</name>
<email>np@FreeBSD.org</email>
</author>
<published>2025-11-12T20:04:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e353cb88d4581303a4d9af090974ec88463802e6'/>
<id>urn:sha1:e353cb88d4581303a4d9af090974ec88463802e6</id>
<content type='text'>
Fixes:	ec0cd287f55f nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters
Sponsored by:	Chelsio Communications
</content>
</entry>
<entry>
<title>nvmf_che: NVMe-TCP offload support for Chelsio T7 adapters</title>
<updated>2025-11-10T15:50:48Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-11-10T15:50:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75'/>
<id>urn:sha1:ec0cd287f55f7ea93ff4ccfa4de0f70eca5fef75</id>
<content type='text'>
This provides an alternative NVMe over TCP transport which uses PDU
offload for TOE connections on a T7.

Similar to iSCSI offload via cxgbei.ko, nvmf_che uses DDP when
possible to enable the NIC to DMA received data directly into I/O data
buffers (pages from a struct bio on the host side, pages from a CTL
I/O requests on the controller side) to avoid copying data on the host
CPU.  nvmf_che is also able to receive a stream of C2H or H2C PDUs for
a single data transfer when using DDP without processing the header of
each PDU.

Unlike cxgbei, nvmf_che aims to be mostly transparent to end users.
Notably, neither nvmecontrol or ctld have to be explicitly asked to
use an offload.  Instead, TCP queue pairs are claimed by this driver
whenever they are eligible (e.g., using TOE).

The main restriction of nvmf_che compared to the software TCP
transport is that Chelsio adapters have a restriction on the largest
PDU that can be sent and received.  When sending data, nvmf_che is
able to split large C2H or H2C data requests across multiple PDUs
without affecting nvmf(4) or nvmft(4).

To avoid overly large PDUs when using nvmf(4), nvmf_che reports a data
transfer limit that is honored by nvmf(4).  This ensures that the
remote controller's PDUs will never be too large (since the command
transfer size is limited to one PDU) and also ensures that nvmf(4)
will never to try to send a command PDU with ICD that is too large.

For nvmft(4), overly large command PDUs due to ICD are avoided by
clamping the size of the reported IOCCSZ in the controller data.
However, to ensure that H2C PDUs are sufficiently small, nvmf_che will
only claim queue pairs which advertised a suitable MAXH2CDATA
parameter during queue negotiation.  For ctld(8), this can be achieved
by setting the MAXH2CDATA option in a transport-group, e.g. for T7:

transport-group tg0 {
	discovery-auth-group no-authentication
	listen tcp 0.0.0.0
	listen tcp [::]
	listen discovery-tcp 0.0.0.0
	listen discovery-tcp [::]
	option MAXH2CDATA 32488
}

Sponsored by:	Chelsio Communications
</content>
</entry>
</feed>
