Page MenuHomeFreeBSD

cxgbe tom: Enable ULP_MODE_TCPDDP on demand
ClosedPublic

Authored by jhb on Jan 30 2024, 4:54 PM.
Tags
None
Referenced Files
F82798118: D43670.id133636.diff
Thu, May 2, 4:58 PM
Unknown Object (File)
Sat, Apr 13, 9:06 PM
Unknown Object (File)
Thu, Apr 4, 11:01 AM
Unknown Object (File)
Mar 17 2024, 8:56 AM
Unknown Object (File)
Mar 17 2024, 8:56 AM
Unknown Object (File)
Mar 14 2024, 4:12 PM
Unknown Object (File)
Mar 14 2024, 3:02 PM
Unknown Object (File)
Feb 4 2024, 6:07 AM
Subscribers

Details

Summary

Most ULP modes in cxgbe's TOE are enabled on the fly when a protocol
is needed (e.g. ULP_MODE_ISCSI is enabled by cxgbei when offloading a
connection using iSCSI, and ULP_MODE_TLS is enabled when RX TLS keys
are programmed for a TOE connection). The one exception to this is
ULP_MODE_TCPDDP.

Currently the cxgbe driver enables ULP_MODE_TCPDDP when a TOE
connection is first created. However, since DDP connections cannot be
converted to other connection types, this requires some special
handling in the driver. For example, iSCSI daemons use the SO_NO_DDP
socket option to ensure TOE connections use ULP_MODE_NONE so they can
be converted to ULP_MODE_ISCSI. Similarly, using TLS receive offload
(ULP_MODE_TLS) requires disabling TCP DDP for new connections by
default.

This commit changes cxgbe to instead switch a connection from
ULP_MODE_NONE to ULP_MODE_TCPDDP when a connection first attempts to
use TCP DDP via aio_read(2). This permits connections to always start
as ULP_MODE_NONE and switch to a protocol-specific mode as needed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable