From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FBABC5CFC1 for ; Sun, 16 Aug 2026 01:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MY/sIL9Y1jnzsucHK8wlt+7uuZuywIJOs+Wptlau6mo=; b=pwsNl+uYTn31sy1ljNCtprlOuk nijKG4OxpmMbqHQGUShFi8XQ4yytm+oZZpVV3RcMUhaBe5PCvHkHNCTKMLiPpuRgNy0UH8V5p7NNN Iuo7iMSUwkcyNIlqNvM/tUXkzhhYNjsG0eOV1UGfWdyz8e8OEncq+RqThAAge8qOSESqIWsuAFLeD y18KNavdhwbYB+ZylGXH6epJIhnqGvCVQMo+b8yYUGxzLA7EpI6vVillGKTdJaEn9Lqb8tHFvxzdU nSzyvx03ezFycKGdqH8yDFynID3RbMSlRYTdeTywcFyErBGON5KigCcSWlpV+hk9Z+hzKzVTvZyNc CCTvf/gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wvPEs-00000004MM3-3T1r; Sun, 16 Aug 2026 01:00:38 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wvPEq-00000004MLx-40oO for linux-nvme@lists.infradead.org; Sun, 16 Aug 2026 01:00:37 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 7ECBF6001A; Sun, 16 Aug 2026 01:00:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DD571F000E9; Sun, 16 Aug 2026 01:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786842034; bh=MY/sIL9Y1jnzsucHK8wlt+7uuZuywIJOs+Wptlau6mo=; h=From:To:Cc:Subject:Date; b=P8WKgyc+GhEdG+N8ebNW/5hE6ZmuJmANuT6mzKa/UMhd3y1jRSKc4K8v9+5Ivewxt B9FqPl+MKYd4kTJtZwV31qir4dhd1UIWV4uokmYCRDFAzfE/u0u0xs09FdrJTbaOay +Vwd99dERCSDve1O9rKUrhP5+8NbuCH/OypgBUp6958ac6VVOtit236Fu/XdmioYMc pl3b8M9DSO7aCIjchdpv9Q/YcbyPalQ0E/u8+YbYGfbXYwi4Q+NmJUouDJC5EyXE4A KEEdWGf/w4jBEs3KOtfyPpLRugHLqXRYxnNhKENYFXcMfJZFCrhE+1OMMgjV5RkN0Z dgrYv2jv5kg0w== From: Geliang Tang To: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , David Ahern , Ido Schimmel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Hannes Reinecke , Stanislav Fomichev Cc: Geliang Tang , linux-nvme@lists.infradead.org, netdev@vger.kernel.org, mptcp@lists.linux.dev Subject: [PATCH v3 0/4] nvme-tcp: add IPv6 traffic class support Date: Sun, 16 Aug 2026 08:59:56 +0800 Message-ID: X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org From: Geliang Tang This series adds IPv6 traffic class (tclass) support to the NVMe/TCP fabrics stack, mirroring the existing IPv4 TOS configuration. The current code path only handles IPv4: nvme-fabrics exposes a 'tos' option, the host (nvme-tcp) applies IP_TOS to each queue socket, and the target (nvmet-tcp) reflects the value received on the wire. This leaves no way to control or observe the IPv6 traffic class for NVMe/TCP connections, which is a real gap for deployments running over IPv6 that need a non-default tclass. The series also refactors the socket option configuration on both host and target sides to use the generic do_sock_setsockopt() helper. This change eliminates the need for protocol-specific helpers and decouples the configuration from the underlying transport protocol, laying the groundwork for future protocol extensions such as MPTCP. The series is split into two logical parts: the do_sock_setsockopt refactoring (patches 1-2) and the IPv6 traffic class support (patches 3-4), following the natural host/target layering. This was tested with the selftests mptcp_nvme.sh [1] to pass "--tos" on the host side and validate that the value is reflected on the wire by the target. [1] https://patchwork.kernel.org/project/linux-nvme/cover/cover.1779934709.git.tanggeliang@kylinos.cn/ v3: - add two patches to unify socket option configuration using do_sock_setsockopt on both host and target sides. - use do_sock_setsockopt for IPV6_TCLASS rather than exporting and calling ip6_sock_set_tclass, as suggested by Jakub. - reuse the existing NVMF_OPT_TOS for IPv6 sockets instead of adding a new NVMF_OPT_TCLASS option, as suggested by Stanislav. v2: - Export and use the ip6_sock_set_tclass() helper in both target and host paths, aligning with the existing ip_sock_set_tos() usage. - Add CONFIG_IPV6 and AF_INET6 guards to avoid build failures when IPv6 is disabled. - Use rcv_flowinfo from the target socket instead of np->tclass. - https://patchwork.kernel.org/project/linux-nvme/cover/cover.1786171863.git.tanggeliang@kylinos.cn/ v1: - https://patchwork.kernel.org/project/linux-nvme/cover/cover.1785122120.git.tanggeliang@kylinos.cn/ Geliang Tang (4): nvmet-tcp: unify sockopt with do_sock_setsockopt nvme-tcp: unify sockopt with do_sock_setsockopt nvmet-tcp: support IPv6 traffic class nvme-tcp: support IPv6 traffic class drivers/nvme/host/tcp.c | 68 +++++++++++++++++++++++++++++++++------ drivers/nvme/target/tcp.c | 68 ++++++++++++++++++++++++++++++++++----- 2 files changed, 119 insertions(+), 17 deletions(-) -- 2.53.0