git: 3b5f95d7bd20 - main - ctld: Disable TCP DDP for connection sockets.
John Baldwin
jhb at FreeBSD.org
Mon Sep 13 17:04:19 UTC 2021
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=3b5f95d7bd20e366d720a47a79c451ae037a3ae1
commit 3b5f95d7bd20e366d720a47a79c451ae037a3ae1
Author: John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-09-13 16:57:54 +0000
Commit: John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-09-13 16:57:54 +0000
ctld: Disable TCP DDP for connection sockets.
cxgbei is not able to offload PDU processing for a socket using TCP
DDP offload.
Sponsored by: Chelsio Communications
---
usr.sbin/ctld/ctld.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
index 7af1d88da44a..c37181ff00d0 100644
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -2178,6 +2178,10 @@ conf_apply(struct conf *oldconf, struct conf *newconf)
&sockbuf, sizeof(sockbuf)) == -1)
log_warn("setsockopt(SO_SNDBUF) failed "
"for %s", newp->p_listen);
+ if (setsockopt(newp->p_socket, SOL_SOCKET, SO_NO_DDP,
+ &one, sizeof(one)) == -1)
+ log_warn("setsockopt(SO_NO_DDP) failed "
+ "for %s", newp->p_listen);
error = setsockopt(newp->p_socket, SOL_SOCKET,
SO_REUSEADDR, &one, sizeof(one));
if (error != 0) {
More information about the dev-commits-src-all
mailing list