nvmf_che: Don't leak a socket if an error occurs finalizing the socketIf soreserve() or sosetopt() (to set TCP_NODELAY) fails after claimingthe socket from the file descriptor, explicitly close th
nvmf_che: Don't leak a socket if an error occurs finalizing the socketIf soreserve() or sosetopt() (to set TCP_NODELAY) fails after claimingthe socket from the file descriptor, explicitly close the socketbefore returning failure.Sponsored by: Chelsio CommunicationsDifferential Revision: https://reviews.freebsd.org/D55493
show more ...
inpcb: retire INP_DROPPED and in_pcbdrop()The inpcb flag INP_DROPPED served two purposes.It was used by TCP and subsystems running on top of TCP as a flag thatmarks a connection that is now in T
inpcb: retire INP_DROPPED and in_pcbdrop()The inpcb flag INP_DROPPED served two purposes.It was used by TCP and subsystems running on top of TCP as a flag thatmarks a connection that is now in TCPS_CLOSED, but was in some other statebefore (not a new-born connection). Create a new TCP flag TF_DISCONNECTEDfor this purpose.The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also setsINP_DROPPED. Use in_pcbdisconnect() instead.Second purpose of INP_DROPPED was a negative lookup mask ininp_smr_lock(), as SMR-protected lookup may see inpcbs that had beenremoved from the hash. We already have had INP_INHASHLIST that marksinpcb that is in hash. Convert it into INP_UNCONNECTED with the oppositemeaning. This allows to combine it with INP_FREED for the negative lookupmask.The Chelsio/ToE and kTLS changes are done with some style refactoring,like moving inp/tp assignments up and using macros for that. However, nodeep thinking was taken to check if those checks are really needed, itcould be that some are not.Reviewed by: rrsDifferential Revision: https://reviews.freebsd.org/D56186
nvmf_che: Fix amd64 LINT-NOVIMAGE buildFixes: ec0cd287f55f nvmf_che: NVMe-TCP offload support for Chelsio T7 adaptersSponsored by: Chelsio Communications
nvmf_che: NVMe-TCP offload support for Chelsio T7 adaptersThis provides an alternative NVMe over TCP transport which uses PDUoffload for TOE connections on a T7.Similar to iSCSI offload via cxgb
nvmf_che: NVMe-TCP offload support for Chelsio T7 adaptersThis provides an alternative NVMe over TCP transport which uses PDUoffload for TOE connections on a T7.Similar to iSCSI offload via cxgbei.ko, nvmf_che uses DDP whenpossible to enable the NIC to DMA received data directly into I/O databuffers (pages from a struct bio on the host side, pages from a CTLI/O requests on the controller side) to avoid copying data on the hostCPU. nvmf_che is also able to receive a stream of C2H or H2C PDUs fora single data transfer when using DDP without processing the header ofeach PDU.Unlike cxgbei, nvmf_che aims to be mostly transparent to end users.Notably, neither nvmecontrol or ctld have to be explicitly asked touse an offload. Instead, TCP queue pairs are claimed by this driverwhenever they are eligible (e.g., using TOE).The main restriction of nvmf_che compared to the software TCPtransport is that Chelsio adapters have a restriction on the largestPDU that can be sent and received. When sending data, nvmf_che isable to split large C2H or H2C data requests across multiple PDUswithout affecting nvmf(4) or nvmft(4).To avoid overly large PDUs when using nvmf(4), nvmf_che reports a datatransfer limit that is honored by nvmf(4). This ensures that theremote controller's PDUs will never be too large (since the commandtransfer 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 byclamping the size of the reported IOCCSZ in the controller data.However, to ensure that H2C PDUs are sufficiently small, nvmf_che willonly claim queue pairs which advertised a suitable MAXH2CDATAparameter during queue negotiation. For ctld(8), this can be achievedby 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