Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215690/?format=api
{ "id": 2215690, "url": "http://patchwork.ozlabs.org/api/patches/2215690/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/734e985f1b35aa9e5c1631a6cd3bf0e760dd7699.1774410440.git.lucien.xin@gmail.com/", "project": { "id": 12, "url": "http://patchwork.ozlabs.org/api/projects/12/?format=api", "name": "Linux CIFS Client", "link_name": "linux-cifs-client", "list_id": "linux-cifs.vger.kernel.org", "list_email": "linux-cifs@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<734e985f1b35aa9e5c1631a6cd3bf0e760dd7699.1774410440.git.lucien.xin@gmail.com>", "list_archive_url": null, "date": "2026-03-25T03:47:10", "name": "[net-next,v11,05/15] quic: provide quic.h header files for kernel and userspace", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0c68d09c08c02d977fcb71d1cc5c9b95a2d22e9d", "submitter": { "id": 61073, "url": "http://patchwork.ozlabs.org/api/people/61073/?format=api", "name": "Xin Long", "email": "lucien.xin@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/734e985f1b35aa9e5c1631a6cd3bf0e760dd7699.1774410440.git.lucien.xin@gmail.com/mbox/", "series": [ { "id": 497380, "url": "http://patchwork.ozlabs.org/api/series/497380/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=497380", "date": "2026-03-25T03:47:06", "name": "net: introduce QUIC infrastructure and core subcomponents", "version": 11, "mbox": "http://patchwork.ozlabs.org/series/497380/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215690/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215690/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-cifs+bounces-10507-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-cifs@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Il5mdhUd;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10507-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"Il5mdhUd\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.160.176", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgXzV1yWSz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 14:52:22 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 9ACB230B6F5D\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 03:49:43 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0765E2E282B;\n\tWed, 25 Mar 2026 03:49:39 +0000 (UTC)", "from mail-qt1-f176.google.com (mail-qt1-f176.google.com\n [209.85.160.176])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 625A72EA48F\n\tfor <linux-cifs@vger.kernel.org>; Wed, 25 Mar 2026 03:49:36 +0000 (UTC)", "by mail-qt1-f176.google.com with SMTP id\n d75a77b69052e-5094ba0af1aso50792571cf.0\n for <linux-cifs@vger.kernel.org>;\n Tue, 24 Mar 2026 20:49:36 -0700 (PDT)", "from wsfd-netdev58.anl.eng.rdu2.dc.redhat.com ([66.187.232.140])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-50b36cb2e29sm150093001cf.1.2026.03.24.20.49.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 24 Mar 2026 20:49:34 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774410578; cv=none;\n b=iwzW1t7DI7yrt5+m3SNFNmVrIkkvRKSTzBsdIbUkc4/6hn+EuVnUxexQO4sjG0D7zKyfNuiKO2vK87DYNKsEAGz8NQVRcNALv3gGe1sY/aGomL/sh30ScVc5P07k4344cRSPto6H+XmsBv0+43rxLl1fhxvxz1FxopMLoQfISbM=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774410578; c=relaxed/simple;\n\tbh=rhjbKjEvvRhLjKryPEE4IvivX2Rr4p7qqUaV4q7ntzk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=jXRrhcoluH9eyF3H8/bq63F/evSXgTfH2uzXZqEwR7VEl8JnaZy4S7RP1aXeM/Ab9w7pp2omss8EvsnW9OTRX6l1fQtR5NJ9SpvyxhiVrRYXMcQ2sPvi0owpz0jSzB58XCNmW1EGjHSiDo/sYyKCweIAbv1EnRHXxu5jhpBNzNc=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=Il5mdhUd; arc=none smtp.client-ip=209.85.160.176", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774410575; x=1775015375;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=z7ZQtwNLmizfYWqFpNcALcDTpPpUWApC0k3x2CAc1gk=;\n b=Il5mdhUdCZe0+/CVM5w66B4/FU0LxvnLxu7jCKNLHOx3XjrNNHHHJFoa0dVl3ycow2\n pgRUbtxqnb8JAf1sFg6uvyP8RPEaExMHdgefU11yVcFconXYtLjpqcn5t5CpJPHYSRDU\n Ux6vpQBRgBNW4ZcmzWNgjFweJAQ1FwQ59/MXjPOKohAToUHUSOC4o/UK9fic5Z7Wrou/\n gzylF0VqK/78//GkD0BPj2VBIDiYXb9UUkS7YyzF+XPlmQdSlmj77+HcOfesowiP3XiW\n 6FQf6j3/QFfvk2887Cdi7a9dlevjLfXesPlo0imxs21OX2jV7XjgZF+nobpyGKTvjYSr\n bPmg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774410575; x=1775015375;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=z7ZQtwNLmizfYWqFpNcALcDTpPpUWApC0k3x2CAc1gk=;\n b=XiINjxdAPD+vYRz6f7vHw8ShU+inO3+NeE+etwKQ/Dn3w0dzbTfOYmdMd2ttVDqaMd\n x6jHTUO1ERYH0HMKK/nHjRiiWl0efcVGc0Rl0rOlLgBvHSLEwL+JkD+BExlLgYfvolUm\n 3mPsfCfbO0hEwVVszO1ryFSEtN3F/rbU/Cg/ZZ/iCHoyc+7vMq7b+SPi7u2ZbKDJIg1R\n TRVOX7wkKX4oqMNKX6MgIosezx4mgLqLttS/asBVTbDYdY1+3VcT6gNC0NCrcca9G4oQ\n esV2fHjU7fXEmt2qJp3np0WPShtQZwmMYDHtMW/BQu7ltmXT8shUGgQs+rCNppHADfM7\n QE8A==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCWR/4oe2WSqIMpGgqk8DUCy34Th53/KUgCCDJGW57is0FoVSNwN9LD5zGh6qbkxawaDoTLMwQNTOy9K@vger.kernel.org", "X-Gm-Message-State": "AOJu0YxD6ODJdusWFMvkQgG+J0IXG+ttg3cEGhrHbsX3/5SGk0wH2XxN\n\tCfuRzVd1ZGJHFxYRS8JRsMJhU/KzxMvjZZiJcjvkjSKz3sKmLmBeM0k1", "X-Gm-Gg": "ATEYQzysRn+t8lrp2KN+Fl2EFZyUQG1ZVBeCjGj42RgKuP4vNuBNVkGCgYgaYy8d31Q\n\tpapNioNne70Zbu1+IIVG57+YcUmjrzvO9HJoXsgDxlG03iW6jLr8KGdi2a3F2QoQJ2mTc1LN6Zp\n\tl/8tzWK4JFTGYT+/OM4oNAgvkSh5FG3XgtX/EGQ2xpg7RerpOda6OTfK2I3+pYVIbqFjBGq/Ay7\n\tGj0w+xPP4V7w+CM/zt9CccsJfm84wHMnRkslhKTURuWJrcezxL1NzN2Vwp734klDm7+AoqlBm2J\n\tEMwmWG3OEqKW+DY2AXPtnM9EMsNC6IExvxRvcH7og7dRvqJDoIAotpjY8DZ8rtagXYwDqQdIzoK\n\tChWuEH8rqkSGVnj/p2Ob1dgasDSApmOQ17MgppPHEnbLOZy4Jke/kFpwjGTOUK6UZ/onPpl/XIg\n\tttd4iw2HqTKEg2TTHlYkSfyj2Mi+8qtRaXj7+HOrpDp8mi4Q/hBNlUqjPLDxKMK3SByIcwJOa/T\n\t+pkkJET7tyqjxVFpXTGGr0uqfmmGRV3GGpx/LMMSwJe9I3IeO4lVZ/Dbd+p0fOVng==", "X-Received": "by 2002:a05:622a:164a:b0:509:4e1e:1b9a with SMTP id\n d75a77b69052e-50b80e45eb4mr29919321cf.54.1774410575084;\n Tue, 24 Mar 2026 20:49:35 -0700 (PDT)", "From": "Xin Long <lucien.xin@gmail.com>", "To": "network dev <netdev@vger.kernel.org>,\n\tquic@lists.linux.dev", "Cc": "davem@davemloft.net,\n\tkuba@kernel.org,\n\tEric Dumazet <edumazet@google.com>,\n\tPaolo Abeni <pabeni@redhat.com>,\n\tSimon Horman <horms@kernel.org>,\n\tStefan Metzmacher <metze@samba.org>,\n\tMoritz Buhl <mbuhl@openbsd.org>,\n\tTyler Fanelli <tfanelli@redhat.com>,\n\tPengtao He <hepengtao@xiaomi.com>,\n\tThomas Dreibholz <dreibh@simula.no>,\n\tlinux-cifs@vger.kernel.org,\n\tSteve French <smfrench@gmail.com>,\n\tNamjae Jeon <linkinjeon@kernel.org>,\n\tPaulo Alcantara <pc@manguebit.com>,\n\tTom Talpey <tom@talpey.com>,\n\tkernel-tls-handshake@lists.linux.dev,\n\tChuck Lever <chuck.lever@oracle.com>,\n\tJeff Layton <jlayton@kernel.org>,\n\tSteve Dickson <steved@redhat.com>,\n\tHannes Reinecke <hare@suse.de>,\n\tAlexander Aring <aahringo@redhat.com>,\n\tDavid Howells <dhowells@redhat.com>,\n\tMatthieu Baerts <matttbe@kernel.org>,\n\tJohn Ericson <mail@johnericson.me>,\n\tCong Wang <xiyou.wangcong@gmail.com>,\n\t\"D . Wythe\" <alibuda@linux.alibaba.com>,\n\tJason Baron <jbaron@akamai.com>,\n\tilliliti <illiliti@protonmail.com>,\n\tSabrina Dubroca <sd@queasysnail.net>,\n\tMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>,\n\tDaniel Stenberg <daniel@haxx.se>,\n\tAndy Gospodarek <andrew.gospodarek@broadcom.com>,\n\t\"Marc E . Fiuczynski\" <marc@fiuczynski.com>", "Subject": "[PATCH net-next v11 05/15] quic: provide quic.h header files for\n kernel and userspace", "Date": "Tue, 24 Mar 2026 23:47:10 -0400", "Message-ID": "\n <734e985f1b35aa9e5c1631a6cd3bf0e760dd7699.1774410440.git.lucien.xin@gmail.com>", "X-Mailer": "git-send-email 2.47.1", "In-Reply-To": "<cover.1774410440.git.lucien.xin@gmail.com>", "References": "<cover.1774410440.git.lucien.xin@gmail.com>", "Precedence": "bulk", "X-Mailing-List": "linux-cifs@vger.kernel.org", "List-Id": "<linux-cifs.vger.kernel.org>", "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "This commit adds quic.h to include/uapi/linux, providing the necessary\ndefinitions for the QUIC socket API. Exporting this header allows both\nuser space applications and kernel subsystems to access QUIC-related\ncontrol messages, socket options, and event/notification interfaces.\n\nSince kernel_get/setsockopt() is no longer available to kernel consumers,\na corresponding internal header, include/linux/quic.h, is added. This\nexposes quic_do_get/setsockopt() to handle QUIC socket options directly\nfor kernel subsystems.\n\nDetailed descriptions of these structures are available in [1], and will\nbe also provided when adding corresponding socket interfaces in the\nlater patches.\n\n[1] https://datatracker.ietf.org/doc/html/draft-lxin-quic-socket-apis\n\nSigned-off-by: Tyler Fanelli <tfanelli@redhat.com>\nSigned-off-by: Stefan Metzmacher <metze@samba.org>\nSigned-off-by: Thomas Dreibholz <dreibh@simula.no>\nSigned-off-by: Xin Long <lucien.xin@gmail.com>\nAcked-by: Paolo Abeni <pabeni@redhat.com>\n---\nv2:\n - Fix a kernel API description warning, found by Jakub.\n - Replace uintN_t with __uN, capitalize _UAPI_LINUX_QUIC_H, and\n assign explicit values for QUIC_TRANSPORT_ERROR_ enum in UAPI\n quic.h, suggested by David Howells.\nv4:\n - Use MSG_QUIC_ prefix for MSG_* flags to avoid conflicts with other\n protocols, such as MSG_NOTIFICATION in SCTP (reported by Thomas).\n - Remove QUIC_CONG_ALG_CUBIC; only NEW RENO congestion control is\n supported in this version.\nv5:\n - Add include/linux/quic.h and include/uapi/linux/quic.h to the\n QUIC PROTOCOL entry in MAINTAINERS.\nv6:\n - Fix the copy/pasted the uAPI path for SCTP to the QUIC entry (noted\n by Jakub).\nv7:\n - Expose quic_do_get/setsockopt() instead of quic_kernel_get/setsockopt()\n (suggested by Paolo).\nv10:\n - Fix typo: 'extented' -> 'extended' (noted by AI review).\n - Add comment for inclusion of sys/socket.h in uapi quic.h.\n - Add uses-libc += linux/quic.h in usr/include/Makefile to fix the new\n build error.\n - Delete config from struct quic_sock, its members will be split into\n other subcomponents in the future patches.\n - Add explicit reserved fields to multiple structs to account for\n implicit padding and ensure UAPI stability.\n - Expand reserved fields in struct transport_param and config, handshake\n and stream_info to allow future extensions without breaking the UAPI.\nv11:\n - Set maximum line length to 80 characters.\n - Drop trailing reserved fields in structs and rely on\n copy_struct_to/from_user() for extensibility; keep reserved fields\n in the middle to indicate memory holes.\n---\n MAINTAINERS | 2 +\n include/linux/quic.h | 22 ++++\n include/uapi/linux/quic.h | 237 ++++++++++++++++++++++++++++++++++++++\n net/quic/socket.c | 36 +++++-\n net/quic/socket.h | 1 +\n usr/include/Makefile | 1 +\n 6 files changed, 295 insertions(+), 4 deletions(-)\n create mode 100644 include/linux/quic.h\n create mode 100644 include/uapi/linux/quic.h", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 532030036a8c..271ddf760eb4 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -21901,6 +21901,8 @@ M:\tXin Long <lucien.xin@gmail.com>\n L:\tquic@lists.linux.dev\n S:\tMaintained\n W:\thttps://github.com/lxin/quic\n+F:\tinclude/linux/quic.h\n+F:\tinclude/uapi/linux/quic.h\n F:\tnet/quic/\n \n RADEON and AMDGPU DRM DRIVERS\ndiff --git a/include/linux/quic.h b/include/linux/quic.h\nnew file mode 100644\nindex 000000000000..4e43d20c9c11\n--- /dev/null\n+++ b/include/linux/quic.h\n@@ -0,0 +1,22 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/* QUIC kernel implementation\n+ * (C) Copyright Red Hat Corp. 2023\n+ *\n+ * This file is part of the QUIC kernel implementation\n+ *\n+ * Written or modified by:\n+ * Xin Long <lucien.xin@gmail.com>\n+ */\n+\n+#ifndef _LINUX_QUIC_H\n+#define _LINUX_QUIC_H\n+\n+#include <linux/sockptr.h>\n+#include <uapi/linux/quic.h>\n+\n+int quic_do_setsockopt(struct sock *sk, int optname, sockptr_t optval,\n+\t\t unsigned int optlen);\n+int quic_do_getsockopt(struct sock *sk, int optname, sockptr_t optval,\n+\t\t sockptr_t optlen);\n+\n+#endif\ndiff --git a/include/uapi/linux/quic.h b/include/uapi/linux/quic.h\nnew file mode 100644\nindex 000000000000..92a0336b9b89\n--- /dev/null\n+++ b/include/uapi/linux/quic.h\n@@ -0,0 +1,237 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/* QUIC kernel implementation\n+ * (C) Copyright Red Hat Corp. 2023\n+ *\n+ * This file is part of the QUIC kernel implementation\n+ *\n+ * Written or modified by:\n+ * Xin Long <lucien.xin@gmail.com>\n+ */\n+\n+#ifndef _UAPI_LINUX_QUIC_H\n+#define _UAPI_LINUX_QUIC_H\n+\n+#include <linux/types.h>\n+#ifdef __KERNEL__\n+#include <linux/socket.h>\n+#else\n+#include <sys/socket.h> /* for MSG_* flags */\n+#endif\n+\n+/* NOTE: Structure descriptions are specified in:\n+ * https://datatracker.ietf.org/doc/html/draft-lxin-quic-socket-apis\n+ */\n+\n+/* Send or Receive Options APIs */\n+enum quic_cmsg_type {\n+\tQUIC_STREAM_INFO,\n+\tQUIC_HANDSHAKE_INFO,\n+};\n+\n+#define QUIC_STREAM_TYPE_SERVER_MASK\t0x01\n+#define QUIC_STREAM_TYPE_UNI_MASK\t0x02\n+#define QUIC_STREAM_TYPE_MASK\t\t0x03\n+\n+enum quic_msg_flags {\n+\t/* flags for stream_flags */\n+\tMSG_QUIC_STREAM_NEW\t\t= MSG_SYN,\n+\tMSG_QUIC_STREAM_FIN\t\t= MSG_FIN,\n+\tMSG_QUIC_STREAM_UNI\t\t= MSG_CONFIRM,\n+\tMSG_QUIC_STREAM_DONTWAIT\t= MSG_WAITFORONE,\n+\tMSG_QUIC_STREAM_SNDBLOCK\t= MSG_ERRQUEUE,\n+\n+\t/* extended flags for msg_flags */\n+\tMSG_QUIC_DATAGRAM\t\t= MSG_RST,\n+\tMSG_QUIC_NOTIFICATION\t\t= MSG_MORE,\n+};\n+\n+enum quic_crypto_level {\n+\tQUIC_CRYPTO_APP,\n+\tQUIC_CRYPTO_INITIAL,\n+\tQUIC_CRYPTO_HANDSHAKE,\n+\tQUIC_CRYPTO_EARLY,\n+\tQUIC_CRYPTO_MAX,\n+};\n+\n+struct quic_handshake_info {\n+\t__u8\tcrypto_level;\n+};\n+\n+struct quic_stream_info {\n+\t__s64\tstream_id;\n+\t__u32\tstream_flags;\n+};\n+\n+/* Socket Options APIs */\n+#define QUIC_SOCKOPT_EVENT\t\t\t\t0\n+#define QUIC_SOCKOPT_STREAM_OPEN\t\t\t1\n+#define QUIC_SOCKOPT_STREAM_RESET\t\t\t2\n+#define QUIC_SOCKOPT_STREAM_STOP_SENDING\t\t3\n+#define QUIC_SOCKOPT_CONNECTION_ID\t\t\t4\n+#define QUIC_SOCKOPT_CONNECTION_CLOSE\t\t\t5\n+#define QUIC_SOCKOPT_CONNECTION_MIGRATION\t\t6\n+#define QUIC_SOCKOPT_KEY_UPDATE\t\t\t\t7\n+#define QUIC_SOCKOPT_TRANSPORT_PARAM\t\t\t8\n+#define QUIC_SOCKOPT_CONFIG\t\t\t\t9\n+#define QUIC_SOCKOPT_TOKEN\t\t\t\t10\n+#define QUIC_SOCKOPT_ALPN\t\t\t\t11\n+#define QUIC_SOCKOPT_SESSION_TICKET\t\t\t12\n+#define QUIC_SOCKOPT_CRYPTO_SECRET\t\t\t13\n+#define QUIC_SOCKOPT_TRANSPORT_PARAM_EXT\t\t14\n+\n+#define QUIC_VERSION_V1\t\t\t0x1\n+#define QUIC_VERSION_V2\t\t\t0x6b3343cf\n+\n+struct quic_transport_param {\n+\t__u8\tremote;\n+\t__u8\tdisable_active_migration;\n+\t__u8\tgrease_quic_bit;\n+\t__u8\tstateless_reset;\n+\t__u8\tdisable_1rtt_encryption;\n+\t__u8\tdisable_compatible_version;\n+\t__u8\tactive_connection_id_limit;\n+\t__u8\tack_delay_exponent;\n+\t__u16\tmax_datagram_frame_size;\n+\t__u16\tmax_udp_payload_size;\n+\t__u32\tmax_idle_timeout;\n+\t__u32\tmax_ack_delay;\n+\t__u16\tmax_streams_bidi;\n+\t__u16\tmax_streams_uni;\n+\t__u64\tmax_data;\n+\t__u64\tmax_stream_data_bidi_local;\n+\t__u64\tmax_stream_data_bidi_remote;\n+\t__u64\tmax_stream_data_uni;\n+};\n+\n+struct quic_config {\n+\t__u32\tversion;\n+\t__u32\tplpmtud_probe_interval;\n+\t__u32\tinitial_smoothed_rtt;\n+\t__u32\tpayload_cipher_type;\n+\t__u8\tcongestion_control_algo;\n+\t__u8\tvalidate_peer_address;\n+\t__u8\tstream_data_nodelay;\n+\t__u8\treceive_session_ticket;\n+\t__u8\tcertificate_request;\n+};\n+\n+struct quic_crypto_secret {\n+\t__u8\tsend; /* send or recv */\n+\t__u8\tlevel; /* crypto level */\n+\t__u16\treserved;\n+\t__u32\ttype; /* TLS_CIPHER_* */\n+#define QUIC_CRYPTO_SECRET_BUFFER_SIZE 48\n+\t__u8\tsecret[QUIC_CRYPTO_SECRET_BUFFER_SIZE];\n+};\n+\n+enum quic_cong_algo {\n+\tQUIC_CONG_ALG_RENO,\n+\tQUIC_CONG_ALG_MAX,\n+};\n+\n+struct quic_errinfo {\n+\t__s64\tstream_id;\n+\t__u32\terrcode;\n+};\n+\n+struct quic_connection_id_info {\n+\t__u8\tdest;\n+\t__u8\treserved[3];\n+\t__u32\tactive;\n+\t__u32\tprior_to;\n+};\n+\n+struct quic_event_option {\n+\t__u8\ttype;\n+\t__u8\ton;\n+};\n+\n+/* Event APIs */\n+enum quic_event_type {\n+\tQUIC_EVENT_NONE,\n+\tQUIC_EVENT_STREAM_UPDATE,\n+\tQUIC_EVENT_STREAM_MAX_DATA,\n+\tQUIC_EVENT_STREAM_MAX_STREAM,\n+\tQUIC_EVENT_CONNECTION_ID,\n+\tQUIC_EVENT_CONNECTION_CLOSE,\n+\tQUIC_EVENT_CONNECTION_MIGRATION,\n+\tQUIC_EVENT_KEY_UPDATE,\n+\tQUIC_EVENT_NEW_TOKEN,\n+\tQUIC_EVENT_NEW_SESSION_TICKET,\n+\tQUIC_EVENT_MAX,\n+};\n+\n+enum {\n+\tQUIC_STREAM_SEND_STATE_READY,\n+\tQUIC_STREAM_SEND_STATE_SEND,\n+\tQUIC_STREAM_SEND_STATE_SENT,\n+\tQUIC_STREAM_SEND_STATE_RECVD,\n+\tQUIC_STREAM_SEND_STATE_RESET_SENT,\n+\tQUIC_STREAM_SEND_STATE_RESET_RECVD,\n+\n+\tQUIC_STREAM_RECV_STATE_RECV,\n+\tQUIC_STREAM_RECV_STATE_SIZE_KNOWN,\n+\tQUIC_STREAM_RECV_STATE_RECVD,\n+\tQUIC_STREAM_RECV_STATE_READ,\n+\tQUIC_STREAM_RECV_STATE_RESET_RECVD,\n+\tQUIC_STREAM_RECV_STATE_RESET_READ,\n+};\n+\n+struct quic_stream_update {\n+\t__s64\tid;\n+\t__u8\tstate;\n+\t__u8\treserved[3];\n+\t__u32\terrcode;\n+\t__u64\tfinalsz;\n+};\n+\n+struct quic_stream_max_data {\n+\t__s64\tid;\n+\t__u64\tmax_data;\n+};\n+\n+struct quic_connection_close {\n+\t__u32\terrcode;\n+\t__u8\tframe;\n+\t__u8\treserved[3];\n+\t__u8\tphrase[];\n+};\n+\n+union quic_event {\n+\tstruct quic_stream_update\tupdate;\n+\tstruct quic_stream_max_data\tmax_data;\n+\tstruct quic_connection_close\tclose;\n+\tstruct quic_connection_id_info\tinfo;\n+\t__u64\tmax_stream;\n+\t__u8\tlocal_migration;\n+\t__u8\tkey_update_phase;\n+};\n+\n+enum {\n+\tQUIC_TRANSPORT_ERROR_NONE\t\t\t= 0x00,\n+\tQUIC_TRANSPORT_ERROR_INTERNAL\t\t\t= 0x01,\n+\tQUIC_TRANSPORT_ERROR_CONNECTION_REFUSED\t\t= 0x02,\n+\tQUIC_TRANSPORT_ERROR_FLOW_CONTROL\t\t= 0x03,\n+\tQUIC_TRANSPORT_ERROR_STREAM_LIMIT\t\t= 0x04,\n+\tQUIC_TRANSPORT_ERROR_STREAM_STATE\t\t= 0x05,\n+\tQUIC_TRANSPORT_ERROR_FINAL_SIZE\t\t\t= 0x06,\n+\tQUIC_TRANSPORT_ERROR_FRAME_ENCODING\t\t= 0x07,\n+\tQUIC_TRANSPORT_ERROR_TRANSPORT_PARAM\t\t= 0x08,\n+\tQUIC_TRANSPORT_ERROR_CONNECTION_ID_LIMIT\t= 0x09,\n+\tQUIC_TRANSPORT_ERROR_PROTOCOL_VIOLATION\t\t= 0x0a,\n+\tQUIC_TRANSPORT_ERROR_INVALID_TOKEN\t\t= 0x0b,\n+\tQUIC_TRANSPORT_ERROR_APPLICATION\t\t= 0x0c,\n+\tQUIC_TRANSPORT_ERROR_CRYPTO_BUF_EXCEEDED\t= 0x0d,\n+\tQUIC_TRANSPORT_ERROR_KEY_UPDATE\t\t\t= 0x0e,\n+\tQUIC_TRANSPORT_ERROR_AEAD_LIMIT_REACHED\t\t= 0x0f,\n+\tQUIC_TRANSPORT_ERROR_NO_VIABLE_PATH\t\t= 0x10,\n+\n+\t/* The cryptographic handshake failed. A range of 256 values is reserved\n+\t * for carrying error codes specific to the cryptographic handshake that\n+\t * is used. Codes for errors occurring when TLS is used for the\n+\t * cryptographic handshake are described in Section 4.8 of [QUIC-TLS].\n+\t */\n+\tQUIC_TRANSPORT_ERROR_CRYPTO\t\t\t= 0x0100,\n+};\n+\n+#endif /* _UAPI_LINUX_QUIC_H */\ndiff --git a/net/quic/socket.c b/net/quic/socket.c\nindex f1181215ebbf..8dc2cb7628db 100644\n--- a/net/quic/socket.c\n+++ b/net/quic/socket.c\n@@ -107,11 +107,25 @@ static void quic_close(struct sock *sk, long timeout)\n \tsk_common_release(sk);\n }\n \n-static int quic_do_setsockopt(struct sock *sk, int optname, sockptr_t optval,\n-\t\t\t unsigned int optlen)\n+/**\n+ * quic_do_setsockopt - set a QUIC socket option\n+ * @sk: socket to configure\n+ * @optname: option name (QUIC-level)\n+ * @optval: user buffer containing the option value\n+ * @optlen: size of the option value\n+ *\n+ * Sets a QUIC socket option on a given socket.\n+ *\n+ * Return:\n+ * - On success, 0 is returned.\n+ * - On error, a negative error value is returned.\n+ */\n+int quic_do_setsockopt(struct sock *sk, int optname, sockptr_t optval,\n+\t\t unsigned int optlen)\n {\n \treturn -EOPNOTSUPP;\n }\n+EXPORT_SYMBOL_GPL(quic_do_setsockopt);\n \n static int quic_setsockopt(struct sock *sk, int level, int optname,\n \t\t\t sockptr_t optval, unsigned int optlen)\n@@ -123,11 +137,25 @@ static int quic_setsockopt(struct sock *sk, int level, int optname,\n \treturn quic_do_setsockopt(sk, optname, optval, optlen);\n }\n \n-static int quic_do_getsockopt(struct sock *sk, int optname, sockptr_t optval,\n-\t\t\t sockptr_t optlen)\n+/**\n+ * quic_do_getsockopt - get a QUIC socket option\n+ * @sk: socket to query\n+ * @optname: option name (QUIC-level)\n+ * @optval: user buffer to receive the option value\n+ * @optlen: pointer to buffer size; updated with actual size on return\n+ *\n+ * Gets a QUIC socket option from a given socket.\n+ *\n+ * Return:\n+ * - On success, 0 is returned.\n+ * - On error, a negative error value is returned.\n+ */\n+int quic_do_getsockopt(struct sock *sk, int optname, sockptr_t optval,\n+\t\t sockptr_t optlen)\n {\n \treturn -EOPNOTSUPP;\n }\n+EXPORT_SYMBOL_GPL(quic_do_getsockopt);\n \n static int quic_getsockopt(struct sock *sk, int level, int optname,\n \t\t\t char __user *optval, int __user *optlen)\ndiff --git a/net/quic/socket.h b/net/quic/socket.h\nindex 0aa642e3b0ae..61df0c5867be 100644\n--- a/net/quic/socket.h\n+++ b/net/quic/socket.h\n@@ -9,6 +9,7 @@\n */\n \n #include <net/udp_tunnel.h>\n+#include <linux/quic.h>\n \n #include \"common.h\"\n #include \"family.h\"\ndiff --git a/usr/include/Makefile b/usr/include/Makefile\nindex 6d86a53c6f0a..a0442e4d77da 100644\n--- a/usr/include/Makefile\n+++ b/usr/include/Makefile\n@@ -120,6 +120,7 @@ uses-libc += linux/netfilter_ipv4.h\n uses-libc += linux/netfilter_ipv4/ip_tables.h\n uses-libc += linux/netfilter_ipv6.h\n uses-libc += linux/netfilter_ipv6/ip6_tables.h\n+uses-libc += linux/quic.h\n uses-libc += linux/route.h\n uses-libc += linux/shm.h\n uses-libc += linux/soundcard.h\n", "prefixes": [ "net-next", "v11", "05/15" ] }