Linux QUIC protocol development
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Xin Long <lucien.xin@gmail.com>
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>
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	[thread overview]
Message-ID: <aw0QmqfW4GcHgKhA@fedora> (raw)
In-Reply-To: <ba1d4f03926411d4e61a7587e41a12b0b423d841.1795393691.git.lucien.xin@gmail.com>

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>

  parent reply	other threads:[~2026-11-30  5:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  0:27 [PATCH net-next v19 00/15] net: introduce QUIC infrastructure and core subcomponents Xin Long
2026-11-23  0:27 ` [PATCH net-next v19 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-30  5:58   ` Hangbin Liu [this message]
2026-11-23  0:27 ` [PATCH net-next v19 02/15] net: build socket infrastructure for QUIC protocol Xin Long
2026-11-30  7:33   ` Hangbin Liu
2026-11-23  0:27 ` [PATCH net-next v19 03/15] quic: provide common utilities and data structures Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-23  0:28 ` [PATCH net-next v19 04/15] quic: provide family ops for address and protocol Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 16:44     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 05/15] quic: provide quic.h header files for kernel and userspace Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 06/15] quic: add stream management Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 16:08     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 07/15] quic: add connection id management Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 16:09     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 08/15] quic: add path management Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 16:11     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 09/15] quic: add congestion control Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 16:21     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 10/15] quic: add packet number space Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 11/15] quic: add crypto key derivation and installation Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 15:59     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 12/15] quic: add crypto packet encryption and decryption Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-24 20:19     ` Xin Long
2026-11-25 15:55     ` Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 13/15] quic: add timer management Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 14/15] quic: add packet builder base Xin Long
2026-11-23  0:28 ` [PATCH net-next v19 15/15] quic: add packet parser base Xin Long
2026-11-24  1:21   ` netdev-bot+sashiko
2026-11-25 15:52     ` Xin Long
2026-11-25 17:05 ` [PATCH net-next v19 00/15] net: introduce QUIC infrastructure and core subcomponents Xin Long
2026-11-30 11:18   ` Paolo Abeni
2026-11-30 11:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aw0QmqfW4GcHgKhA@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=aahringo@redhat.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=cel@kernel.org \
    --cc=daniel@haxx.se \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dreibh@simula.no \
    --cc=edumazet@kernel.org \
    --cc=hare@suse.de \
    --cc=hepengtao@xiaomi.com \
    --cc=horms@kernel.org \
    --cc=illiliti@protonmail.com \
    --cc=jamie.bainbridge@gmail.com \
    --cc=jbaron@akamai.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=mail@johnericson.me \
    --cc=marcelo.leitner@gmail.com \
    --cc=matttbe@kernel.org \
    --cc=mbuhl@openbsd.org \
    --cc=mef@scarletmail.rutgers.edu \
    --cc=metze@samba.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul@jakma.org \
    --cc=pc@manguebit.org \
    --cc=quic@lists.linux.dev \
    --cc=sd@queasysnail.net \
    --cc=steved@redhat.com \
    --cc=tfanelli@redhat.com \
    --cc=tom@talpey.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox