From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.241 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796018359; b=GB2GuUaVQ3fNgJMiHSrkqXWjjcXUfWIVzvOzVtNfAw3SmryjzhpRVoO04J3Uyo0GtJxo aTGHReCTVCEVQf8sdmSmTiv0B2KLbBJNZrItUFXs8kwDawtqFVHPJ0L2Hh2g3XMznQeAN q0AqTx0/P2rd7FAu9PYHoUyozWAbicxV4AkxN/FdBI8C+cK2kQKbWPYPolOkdBbnGOCeC 81//VJkuM6OcsI1LfwVdUMk96QN9jKuFUM7uKI82YmzHJ77jTamexc+m+VG5g7kIzLKSH XaOPLSg3VGW79e6s8oPtzclHWo5sOvTQsDllXdaGb7F/eoUNEhDq0fDK0AncUKYYzJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018359; 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=h2wLKyMQel56ONRX7hTryAFCNdZs4foqKQwKkdK4MXeHlT1gmjM1EcmWvr3mlCjVrYEs Zx8YgjhTX91/1Pm9BIplhteOhxQX/wTcp5JcoCSdxyo0n7uFnbTP12bErhX/2DAtuG6nT rxUU7BUIdTmi1k7AvVVKRhtIreypkhm/p6KjajL/H6tQcG6HP+RIwkD+lSl/PY0Of4cQM /+q5PE5u383MH/NA1agb7NFuNGim2Hb3YesaxtKgBGHp0hrY2CnZYKGDCzG0JTXFg3lir LRvMTzCnzKRuO4cgA9moyVW+R1eY8lj8AFoy+TWLgklQg0nX9EHTVodD2G/sUHNbvpQ== 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=95.215.58.241 Received: from mta1.migadu.com (out-241.mta1.migadu.com [95.215.58.241]) (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 3B37F606A327 for ; Mon, 30 Nov 2026 05:59:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B37F606A327 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: quic@lists.linux.dev 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: quic@lists.linux.dev 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: quic@lists.linux.dev 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