Thread (10 messages) flat view 10 messages, 5 authors, 1d ago

Re: [PATCH v4 1/4] nvmet-tcp: unify sockopt with do_sock_setsockopt

From: Hannes Reinecke <hare@suse.de>
Date: 2026-08-18 08:31:03
Also in: linux-nvme, mptcp

On 8/18/26 8:03 AM, Geliang Tang wrote:
From: Geliang Tang <redacted>

This patch consolidates socket option settings in nvmet-tcp by utilizing
the generic do_sock_setsockopt() helper for options including SO_LINGER,
SO_PRIORITY, SO_REUSEADDR, TCP_NODELAY, and IP_TOS. This change eliminates
the need to export and use specialized helpers for each individual socket
option.

A key benefit of this refactoring is that it decouples the socket option
configuration from the underlying transport protocol. This makes it
easier to extend nvmet-tcp to support other protocols, such as MPTCP, in
the future, as do_sock_setsockopt() abstracts away protocol-specific
differences without requiring per-option protocol-specific wrappers.

Signed-off-by: Geliang Tang <redacted>
---
  drivers/nvme/target/tcp.c | 82 ++++++++++++++++++++++++++++++++++-----
  1 file changed, 72 insertions(+), 10 deletions(-)
Reviewed-by: Hannes Reinecke <hare@kernel.org>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help