From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.112 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796018357; b=fLVcovmII712LhYX7rwcy2kUSpKXytKp7DIXT5nAEm8Al+AS5O+LdWtgli2OJkVqpkf6 DciXJq/a0pATrlPLlZAsuVaFPC8/vdPcH9Tg34EYltS5h/oRAeNQ/Fty0YyYyMIbHG/7W 934rbXyc6UACJGVZ83LgLY+9aWNhXZ1+8gNE60WWbYaGIxeqG5htmKI4Nqrzhqjea8P0r Vi8HQOT1H967MQrvjNuvWkGw0PnjL1JYD/0LImT1xORBK5M+wk0vlkxfGrtOIDxsczu7+ 0uHeR1vMcRhhnRkaCMTkkmtMZPzSSN0DRXLBgVh4FiOxfPXh4N7HqhszRrK9cK4M9xw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018357; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=YtlzsJnriEwjAAJi/L8xYpt1i+zZgkPw00taynsmp3o=; b=Mj/b4IPWKOdM0/VqNM6ioeclLKtztFY8+yeVx3FxwTbG64jQWPcytEJgw45010a930fO Mdx409yEuhT3vzE0wcPSYW2yyILGFOuZpNw53ZJFDsJY+mRspaoAW2Bok5AzxGDzBLo3Y Qicl7C5EoKmzfaDRt2Q2xjlfCb6jJTqtqC/KPCxWgG2TEAfuYCraaeDuRJUtXG4Ac/QZX jddW5lMYecx1eykPmyWMA8Sy+a770wx3eJCHCYfTrXwYlV0/UeHdZ32PKhpGZYNSuITY/ DBI4X9Q60XG3XPHe4Sm/cYRQTA5BZkAzERwoEdlQQSQ5SZGEPdGpf6S9oLPbR/yDaHw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=lTpgwkRl; arc=none smtp.remote-ip=91.218.175.112 Received: from mta0.migadu.com (out-112.mta0.migadu.com [91.218.175.112]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFB5E606A325 for ; Mon, 30 Nov 2026 05:59:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AFB5E606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=lTpgwkRl X-Envelope-To: linux-cifs@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=7D8uRs9RXYu0tQiUcHPAAjUuViVqzcHfhD95+M1YxiY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796018354; v=1; x=1796623154; b=lTpgwkRlpNaraMLHOPWrx9TBvYLj8iUbXNAiRz2X9cr6MvpMI/BZ3UNih2qPH8BxREfZ3wUW u4s5A4oUHOOShic7T/rnwHce3C09QSu6LuA5ECmrnoAxc7S3+MMRgQ630e7dkAc47YTX3jwDG6C EQ1Ecuq1dE/Xpm1GCfUL59S4= X-Envelope-To: linux-cifs@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id 18aa0b0a131a3350; Mon, 30 Nov 2026 05:59:14 +0000 X-Mizu-Trace-ID: 18aa0b0a131a3350 X-Migadu-Flow: FLOW_OUT Date: Mon, 30 Nov 2026 13:58:50 +0800 From: Hangbin Liu To: Xin Long Cc: network dev , quic@lists.linux.dev, davem@davemloft.net, kuba@kernel.org, Eric Dumazet , Paolo Abeni , Simon Horman , Stefan Metzmacher , Moritz Buhl , Tyler Fanelli , Pengtao He , Thomas Dreibholz , Jamie Bainbridge , linux-cifs@vger.kernel.org, Paulo Alcantara , Namjae Jeon , Tom Talpey , kernel-tls-handshake@lists.linux.dev, Chuck Lever , Jeff Layton , Steve Dickson , Hannes Reinecke , Alexander Aring , David Howells , Matthieu Baerts , John Ericson , Cong Wang , "D . Wythe" , Jason Baron , illiliti , Sabrina Dubroca , Marcelo Ricardo Leitner , Daniel Stenberg , Andy Gospodarek , mef@scarletmail.rutgers.edu, paul@jakma.org, Kuniyuki Iwashima Subject: Re: [PATCH net-next v19 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Message-ID: References: X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Nov 22, 2026 at 07:27:57PM -0500, Xin Long wrote: > This patch adds IPPROTO_QUIC and SOL_QUIC constants to the networking > subsystem. These definitions are essential for applications to set > socket options and protocol identifiers related to the QUIC protocol. > > QUIC does not possess a protocol number allocated from IANA, and like > IPPROTO_MPTCP, IPPROTO_QUIC is merely a value used when opening a QUIC > socket with: > > socket(AF_INET, SOCK_STREAM, IPPROTO_QUIC); > > Note we did not opt for UDP ULP for QUIC implementation due to several > considerations: > > - QUIC's connection Migration requires at least 2 UDP sockets for one > QUIC connection at the same time, not to mention the multipath > feature in one of its draft RFCs. > > - In-Kernel QUIC, as a Transport Protocol, wants to provide users with > the TCP or SCTP like Socket APIs, like connect()/listen()/accept()... > Note that a single UDP socket might even be used for multiple QUIC > connections. > > The use of IPPROTO_QUIC type sockets over UDP tunnel will effectively > address these challenges and provides a more flexible and scalable > solution. > > Signed-off-by: Xin Long > Acked-by: Paolo Abeni > --- > Sashiko, do not report any of the following concerns: > - Ignore the concern about prematurely exposing the UAPI protocol > numbers. Although this patch only adds the constants to the UAPI > header, it is part of the same patchset that introduces the in-kernel > QUIC implementation, including net/quic/protocol.c. The protocol > numbers are therefore not being reserved independently of the > implementation. > > - Ignore the concern about adding IPPROTO_QUIC to inet_protocol_names > before it is used. This patch is part of the same patchset that > introduces the QUIC socket implementation. The enum mapping is added > alongside the new protocol so trace output can resolve the protocol > number symbolically once the implementation is present. > > - Ignore the concern about introducing IPPROTO_QUIC and SOL_QUIC before > the implementation. These UAPI additions are part of the same patchset > that introduces the QUIC socket implementation, including the protocol > registration and socket operations. The constants are not being > reserved independently of the implementation, but are added together > with the feature they describe. > > - Ignore the concern about the gap between IPPROTO_SMC and IPPROTO_QUIC. > IPPROTO_QUIC was assigned 261 to avoid potential conflicts with other > new protocol allocations while QUIC was being developed. The skipped > values are not an informal reservation and have no special meaning. > > - Ignore the SELinux protocol truncation concern for QUIC. Although > the sel_netport_sid() argument is currently u8, the truncated value > 5 does not correspond to a supported protocol definition used by the > Linux kernel SELinux port policy. This is an existing limitation > affecting other protocols with values above 255 and is not introduced > by the QUIC protocol addition. > > v11: > - Set maximum line length to 80 characters. > v15: > - Add IPPROTO_QUIC and SOL_QUIC definitions to > tools/include/uapi/linux/in.h and > tools/perf/trace/beauty/include/linux/socket.h. > - Add IPPROTO_QUIC to inet_protocol_names in include/trace/events/sock.h. > --- > include/linux/socket.h | 1 + > include/trace/events/sock.h | 3 ++- > include/uapi/linux/in.h | 2 ++ > tools/include/uapi/linux/in.h | 2 ++ > tools/perf/trace/beauty/include/linux/socket.h | 1 + > 5 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/include/linux/socket.h b/include/linux/socket.h > index 37ddcdfc0377..b8569b5bc060 100644 > --- a/include/linux/socket.h > +++ b/include/linux/socket.h > @@ -402,6 +402,7 @@ struct ucred { > #define SOL_MCTP 285 > #define SOL_SMC 286 > #define SOL_VSOCK 287 > +#define SOL_QUIC 288 > > /* IPX options */ > #define IPX_TYPE 1 > diff --git a/include/trace/events/sock.h b/include/trace/events/sock.h > index b5310439536e..ed43fe6d2705 100644 > --- a/include/trace/events/sock.h > +++ b/include/trace/events/sock.h > @@ -20,7 +20,8 @@ > #define inet_protocol_names \ > EM(IPPROTO_TCP) \ > EM(IPPROTO_SCTP) \ > - EMe(IPPROTO_MPTCP) > + EM(IPPROTO_MPTCP) \ > + EMe(IPPROTO_QUIC) > > #define tcp_state_names \ > EM(TCP_ESTABLISHED) \ > diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h > index ced0fc3c3aa5..e4072152f2e6 100644 > --- a/include/uapi/linux/in.h > +++ b/include/uapi/linux/in.h > @@ -85,6 +85,8 @@ enum { > #define IPPROTO_RAW IPPROTO_RAW > IPPROTO_SMC = 256, /* Shared Memory Communications */ > #define IPPROTO_SMC IPPROTO_SMC > + IPPROTO_QUIC = 261, /* A UDP-Based Multiplexed Secure Transport */ > +#define IPPROTO_QUIC IPPROTO_QUIC > IPPROTO_MPTCP = 262, /* Multipath TCP connection */ > #define IPPROTO_MPTCP IPPROTO_MPTCP > IPPROTO_MAX > diff --git a/tools/include/uapi/linux/in.h b/tools/include/uapi/linux/in.h > index ced0fc3c3aa5..e4072152f2e6 100644 > --- a/tools/include/uapi/linux/in.h > +++ b/tools/include/uapi/linux/in.h > @@ -85,6 +85,8 @@ enum { > #define IPPROTO_RAW IPPROTO_RAW > IPPROTO_SMC = 256, /* Shared Memory Communications */ > #define IPPROTO_SMC IPPROTO_SMC > + IPPROTO_QUIC = 261, /* A UDP-Based Multiplexed Secure Transport */ > +#define IPPROTO_QUIC IPPROTO_QUIC > IPPROTO_MPTCP = 262, /* Multipath TCP connection */ > #define IPPROTO_MPTCP IPPROTO_MPTCP > IPPROTO_MAX > diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h > index b17fdb7d38a7..7677133953ec 100644 > --- a/tools/perf/trace/beauty/include/linux/socket.h > +++ b/tools/perf/trace/beauty/include/linux/socket.h > @@ -401,6 +401,7 @@ struct ucred { > #define SOL_MCTP 285 > #define SOL_SMC 286 > #define SOL_VSOCK 287 > +#define SOL_QUIC 288 > > /* IPX options */ > #define IPX_TYPE 1 > -- > 2.47.1 > Reviewed-by: Hangbin Liu