Article View: linux.kernel.netdev
Article #24420Re: [PATCH net-next v19 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants
From: Hangbin Liu
Date: Mon, 30 Nov 2026 05:58
Date: Mon, 30 Nov 2026 05:58
148 lines
15722 bytes
15722 bytes
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 <lucien.xin@gmail.com>
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> ---
> 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 <liuhangbin@kylinos.cn>
Technical Details
Message-ID:
<aw0QmqfW4GcHgKhA@fedora>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373908-linux-kernel-netdev=dewy.ruReferences:
<cover.1795393690.git.lucien.xin@gmail.com> <ba1d4f03926411d4e61a7587e41a12b0b423d841.1795393691.git.lucien.xin@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373908-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v19 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Date: Mon, 30 Nov 2026 13:58:50 +0800 Organization: Usenet Network Message-ID: <aw0QmqfW4GcHgKhA@fedora> References: <cover.1795393690.git.lucien.xin@gmail.com> <ba1d4f03926411d4e61a7587e41a12b0b423d841.1795393691.git.lucien.xin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1348360"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:/o9W1hkrgp79610G5yjWUm5Jg9I= sha256:qrwS1QWcFZlh23wnSmQvif680bDHb/QLdVlZVUL6Gmg= sha1:i4HwqzrdVpCqBvM3Y9dfrALntis= sha256:7n1yrBitsIuG3KAYDJ93n+6UJQvGDKbZZMyfIZLarBk= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 56480125FC6; Mon, 30 Nov 2026 08:59:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id usDWRIdn7Ghu; Mon, 30 Nov 2026 08:59:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373908-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 0C1CC125FC4; Mon, 30 Nov 2026 08:59:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id B0BCF2916A; Mon, 30 Nov 2026 05:59:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796018358; b=2qQ2ELQGrkP4MrC9kffOGNdFhkjU3H9ZukSC73X62x5iZniHEKrq/8TCCgSr1LnOqqwJ j7py5EzCmUWZTbhVwuUm4hI/VwnOMIp9iaqVlRNWPkTeWYLp2Q5xJQOw/Toyi/PUXBOd6 i2WRAJSNAcSzmd7KPkgG81AkrzwG52phWanDqOfiNnnLYlk/5W04MuN9mrCcKH0v1EZIT bRb8WqkrXsgcTHi75Th/41Y+McAc+aInXydl3bLeArgSnMI2L+pOkQWjeZ21gF3hsKeZC CSVZuZUHt3GoWuEMzcYEYb5lF6fad02KxA+TSOD91MqD46n78MgUgFniiQWCyXOSI2w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018358; h=X-Original-To:Received: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:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=YtlzsJnriEwjAAJi/L8xYpt1i+zZgkPw00taynsmp3o=; b=LXTwwD/q6wGRe2R7FnVn360CVp7PmAie6oeprTahB8K1/RFAh49NikPkbgUYYzKCNHUq dbQSElIlUv3oY4IFFHPv+hV22x41ctyrre6tXgmzBTAp5NRnlTOl2enpTDPhyM5Gr/KAz S0B7mJeUW/hnhr/C8oNHNNUI6H4pKs47FVh0C4jxcRDcXLHgzXLUkvgtxram6eMsdg2w9 vjfLrPyC50coBqg1BThAbwRThaU07vrqt+qahaISYb9zlxbl8lhlQj4mOYZp5CR52B3Qu VfIO19hUNQC1ZxA/1YZQDHh6bqe4IRpefMn6TdtFzVrLlujQd1A2MFYwayK4DKYkPOg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=lTpgwkRl; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 878F6606A32D; Mon, 30 Nov 2026 05:59:18 +0000 (UTC) X-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-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.240 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796018357; b=Og2tRLXAsQKsQIVc72HMuu5YPyV/s4RcQnt4JYJbPCOc14sO6JaSWJtJtK8oG3CqBWKR 9BUN/mM/4L8Q3krOm07s349IVAGjPfk1q1DmQrcot7vNqidGtFyYhJ+O7X/lOI8N+X/m5 PUXCIS/qXAoujKkHiHctWWzNk93KcoVRzS5gMfXiGcWsNhTbY3/4jvvDokzWc0JM1oZUH BKGxYB40wjcYq33Sf6vOsbP42am+W5C4dbPZfBSeh+HGMqwTrSh4gSq9T5RFgs0uB5mzy ORPBwZl9jEZ626daqme8dPGBwSzVhrgHaIShekDiLt+GnH7uzcVZ0lux0JDCQVHnrIQ== X-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=LGLIupIvC4xxxu8H0o9KuqLL39D6L5//kJXGE8KJHc6Od3xsaNEy9YMtfohEQOw+0yI4 SuNz1b2W3J6HDFuvXif5LcqkwsYAorNPQ/gqLlPimiQMqcGWDjWPrOtEtBBj+uvASERTg FtsRoKFjnEiEUucPW54SwQSVgVp1+rNYdBm//PjFM3+TQ517U6BHRy6YQV4Fjw90ez77K fBPgXq1+ryCE/zI4fSFzhpTVYPm4+foZlN78JDjGT8IsEPuAu5VLOmXmmlmhDsKvkVgCt 7o06+xwjiXKq8ckTNmZ05ba/PxHiNZGAdTKX6zHFbjNIXdXqCDl6elZPD9GSw56vPUw== X-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.240 X-Received: from mta1.migadu.com (out-240.mta1.migadu.com [95.215.58.240]) (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 44302606A32C for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 05:59:15 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 44302606A32C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-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: netdev@vger.kernel.org X-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 X-Cc: network dev <netdev@vger.kernel.org>, quic@lists.linux.dev, davem@davemloft.net, kuba@kernel.org, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Stefan Metzmacher <metze@samba.org>, Moritz Buhl <mbuhl@openbsd.org>, Tyler Fanelli <tfanelli@redhat.com>, Pengtao He <hepengtao@xiaomi.com>, Thomas Dreibholz <dreibh@simula.no>, Jamie Bainbridge <jamie.bainbridge@gmail.com>, linux-cifs@vger.kernel.org, Paulo Alcantara <pc@manguebit.org>, Namjae Jeon <linkinjeon@kernel.org>, Tom Talpey <tom@talpey.com>, kernel-tls-handshake@lists.linux.dev, Chuck Lever <cel@kernel.org>, Jeff Layton <jlayton@kernel.org>, Steve Dickson <steved@redhat.com>, Hannes Reinecke <hare@suse.de>, Alexander Aring <aahringo@redhat.com>, David Howells <dhowells@redhat.com>, Matthieu Baerts <matttbe@kernel.org>, John Ericson <mail@johnericson.me>, Cong Wang <xiyou.wangcong@gmail.com>, "D . Wythe" <alibuda@linux.alibaba.com>, Jason Baron <jbaron@akamai.com>, illiliti <illiliti@protonmail.com>, Sabrina Dubroca <sd@queasysnail.net>, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Daniel Stenberg <daniel@haxx.se>, Andy Gospodarek <andrew.gospodarek@broadcom.com>, mef@scarletmail.rutgers.edu, paul@jakma.org, Kuniyuki Iwashima <kuniyu@google.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <ba1d4f03926411d4e61a7587e41a12b0b423d841.1795393691.git.lucien.xin@gmail.com> X-Received-Bytes: 15525