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
Unknown Object (File)
Thu, Nov 7, 10:48 AM
Unknown Object (File)
Thu, Nov 7, 8:41 AM
Unknown Object (File)
Fri, Nov 1, 12:31 AM
Unknown Object (File)
Fri, Nov 1, 12:30 AM
Unknown Object (File)
Fri, Nov 1, 12:30 AM
Unknown Object (File)
Fri, Nov 1, 12:18 AM
Unknown Object (File)
Sep 23 2024, 11:51 AM
Unknown Object (File)
Sep 22 2024, 5:45 PM
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