get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2229025/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2229025,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229025/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260427171408.23018-2-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260427171408.23018-2-pablo@netfilter.org>",
    "date": "2026-04-27T17:14:08",
    "name": "[nf,v2,2/2] netfilter: flowtable: fix inline pppoe encapsulation in xmit path",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "19787bb7051ab6245ea535215d54138eaaa75ae1",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260427171408.23018-2-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 501690,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501690/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=501690",
            "date": "2026-04-27T17:14:08",
            "name": "[nf,v2,1/2] netfilter: flowtable: fix inline vlan encapsulation in xmit path",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501690/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229025/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229025/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-12226-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@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=netfilter.org header.i=@netfilter.org\n header.a=rsa-sha256 header.s=2025 header.b=JSqlTksk;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12226-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=\"JSqlTksk\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.190.124",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=netfilter.org"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4g49DN0vpKz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 03:15:00 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 30B4B301C6DD\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 17:14:28 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 222CF3E123A;\n\tMon, 27 Apr 2026 17:14:22 +0000 (UTC)",
            "from mail.netfilter.org (mail.netfilter.org [217.70.190.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 573CE3E1209\n\tfor <netfilter-devel@vger.kernel.org>; Mon, 27 Apr 2026 17:14:16 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id BC52260272\n\tfor <netfilter-devel@vger.kernel.org>; Mon, 27 Apr 2026 19:14:13 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777310059; cv=none;\n b=o1RHhbAysRq7cDRTPzMKIw3KWnTt4HAj/mNCWJOzk/zgUevtka+7diCVBljNRUT5GotorVvRGP9XLLZkZDvtDApepyq0nncjOjFlrLno+HHALT3QQOB3+9BOG+RnIGTt6NRIKPgcJi6+9P8sER4jbp73n/Df4qFyDdoIhdYX6rU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777310059; c=relaxed/simple;\n\tbh=EDHAKnyK1kIA+pBzX1ADbDz27mEJeaIfnCqAczdgUE8=;\n\th=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=lDg7cTtCGYc7G2I3OCSqgq6IG7rAcTd+rk8zNbXJ3Dow7s1nN4FShpgpNmzy1JaTSVYrPKjiFEXBbl6pihjCqMYMU2uh5A9cST1lj9ykj8JdTyTDJXUVr6JScaX4rnOfUCXwj/cq3v8V1uyDlOcs/o68BHKrSgzDLcSp69ETWTg=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=netfilter.org;\n dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=JSqlTksk; arc=none smtp.client-ip=217.70.190.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;\n\ts=2025; t=1777310053;\n\tbh=gc4voeAZBiYXGy1MGJYq40+utIXPgtsmtaHKZldyOhY=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=JSqlTkskcb/IqvqjrmOrtTlJxTlAzqL4oAyG7VERwbYy5YK1hpwex+xLWtfkA9R8i\n\t AjO3CaNiOp0JCwLh5fUfxAeRhxQuagu1upBF7c0xMdheAxKIouyMlWXNFab5f3XeMc\n\t 2vQPipioL3WMKFVBdGpktKybi3yn3ObvtCYKJ7tfNFpim1iJGyAw3ivLdzy3PAhHGs\n\t riXg16jCSelEZvGOfcPJpkhuRcOFJc7DW8Nt/HANOKqcQnOxyJiv7WFOrxVLvhrwmD\n\t bz1HQrJ0vsO7LO5h8lwL83j5t35LT9+ld2cnyFvCy+inhqo7ual/Pe2OPx01dfda4M\n\t YLjvoX4U65HnQ==",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Subject": "[PATCH nf,v2 2/2] netfilter: flowtable: fix inline pppoe\n encapsulation in xmit path",
        "Date": "Mon, 27 Apr 2026 19:14:08 +0200",
        "Message-ID": "<20260427171408.23018-2-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260427171408.23018-1-pablo@netfilter.org>",
        "References": "<20260427171408.23018-1-pablo@netfilter.org>",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Address two issues in the inline pppoe encapsulation:\n\n- Add needs_gso_segment flag to segment PPPoE packets in software\n  given that there is no GSO support for this.\n\n- Use FLOW_OFFLOAD_XMIT_DIRECT since neighbour cache is not available\n  in point-to-point device, use the hardware address that is obtained\n  via flowtable path discovery (ie. fill_forward_path).\n\nFixes: 18d27bed0880 (\"netfilter: flowtable: inline pppoe encapsulation in xmit path\")\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\nv2: - fix skb memleak on error in skb_gso_segment().\n    - store the needs_gso_flag in the right direction.\n\nComments for AI:\n- skbs payload is never shrunk, so skb_gso_segment should not ever return NULL.\n- no mac header is in placed when skb_gso_segment() is called, this VLAN/PPPoE\n  header is pushed then dev_queue_xmit() pushes the mac header.\n\n include/net/netfilter/nf_flow_table.h |  4 ++-\n net/netfilter/nf_flow_table_core.c    |  1 +\n net/netfilter/nf_flow_table_ip.c      | 38 ++++++++++++++++++++++++---\n net/netfilter/nf_flow_table_path.c    |  7 ++++-\n 4 files changed, 45 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h\nindex b09c11c048d5..7b23b245a5a8 100644\n--- a/include/net/netfilter/nf_flow_table.h\n+++ b/include/net/netfilter/nf_flow_table.h\n@@ -148,9 +148,10 @@ struct flow_offload_tuple {\n \t/* All members above are keys for lookups, see flow_offload_hash(). */\n \tstruct { }\t\t\t__hash;\n \n-\tu8\t\t\t\tdir:2,\n+\tu16\t\t\t\tdir:2,\n \t\t\t\t\txmit_type:3,\n \t\t\t\t\tencap_num:2,\n+\t\t\t\t\tneeds_gso_segment:1,\n \t\t\t\t\ttun_num:2,\n \t\t\t\t\tin_vlan_ingress:2;\n \tu16\t\t\t\tmtu;\n@@ -232,6 +233,7 @@ struct nf_flow_route {\n \t\t\tu32\t\t\thw_ifindex;\n \t\t\tu8\t\t\th_source[ETH_ALEN];\n \t\t\tu8\t\t\th_dest[ETH_ALEN];\n+\t\t\tu8\t\t\tneeds_gso_segment:1;\n \t\t} out;\n \t\tenum flow_offload_xmit_type\txmit_type;\n \t} tuple[FLOW_OFFLOAD_DIR_MAX];\ndiff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c\nindex 2c4140e6f53c..785d8c244a77 100644\n--- a/net/netfilter/nf_flow_table_core.c\n+++ b/net/netfilter/nf_flow_table_core.c\n@@ -122,6 +122,7 @@ static int flow_offload_fill_route(struct flow_offload *flow,\n \n \tflow_tuple->tun = route->tuple[dir].in.tun;\n \tflow_tuple->encap_num = route->tuple[dir].in.num_encaps;\n+\tflow_tuple->needs_gso_segment = route->tuple[dir].out.needs_gso_segment;\n \tflow_tuple->tun_num = route->tuple[dir].in.num_tuns;\n \n \tswitch (route->tuple[dir].xmit_type) {\ndiff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c\nindex 6da0bc3965df..9bcdc3b85ca1 100644\n--- a/net/netfilter/nf_flow_table_ip.c\n+++ b/net/netfilter/nf_flow_table_ip.c\n@@ -552,7 +552,8 @@ static int nf_flow_vlan_push(struct sk_buff *skb, __be16 proto, u16 id,\n \treturn 0;\n }\n \n-static int nf_flow_pppoe_push(struct sk_buff *skb, u16 id)\n+static int nf_flow_pppoe_push(struct sk_buff *skb, u16 id,\n+\t\t\t      u32 needed_headroom)\n {\n \tint data_len = skb->len + sizeof(__be16);\n \tstruct ppp_hdr {\n@@ -561,7 +562,7 @@ static int nf_flow_pppoe_push(struct sk_buff *skb, u16 id)\n \t} *ph;\n \t__be16 proto;\n \n-\tif (skb_cow_head(skb, PPPOE_SES_HLEN))\n+\tif (skb_cow_head(skb, needed_headroom + PPPOE_SES_HLEN))\n \t\treturn -1;\n \n \tswitch (skb->protocol) {\n@@ -754,7 +755,8 @@ static int nf_flow_encap_push(struct sk_buff *skb,\n \t\t\t\treturn -1;\n \t\t\tbreak;\n \t\tcase htons(ETH_P_PPP_SES):\n-\t\t\tif (nf_flow_pppoe_push(skb, tuple->encap[i].id) < 0)\n+\t\t\tif (nf_flow_pppoe_push(skb, tuple->encap[i].id,\n+\t\t\t\t\t       needed_headroom) < 0)\n \t\t\t\treturn -1;\n \t\t\tbreak;\n \t\t}\n@@ -768,6 +770,7 @@ struct nf_flow_xmit {\n \tconst void\t\t*source;\n \tstruct net_device\t*outdev;\n \tstruct flow_offload_tuple *tuple;\n+\tbool\t\t\tneeds_gso_segment;\n };\n \n static void __nf_flow_queue_xmit(struct net *net, struct sk_buff *skb,\n@@ -779,10 +782,37 @@ static void __nf_flow_queue_xmit(struct net *net, struct sk_buff *skb,\n \tdev_queue_xmit(skb);\n }\n \n+static unsigned int nf_flow_encap_gso_xmit(struct net *net, struct sk_buff *skb,\n+\t\t\t\t\t   struct nf_flow_xmit *xmit)\n+{\n+\tstruct sk_buff *segs, *nskb;\n+\n+\tsegs = skb_gso_segment(skb, 0);\n+\tif (IS_ERR(segs) || !segs)\n+\t\treturn NF_DROP;\n+\n+\tskb_list_walk_safe(segs, segs, nskb) {\n+\t\tskb_mark_not_on_list(segs);\n+\n+\t\tif (nf_flow_encap_push(segs, xmit->tuple, xmit->outdev) < 0) {\n+\t\t\tkfree_skb(segs);\n+\t\t\tkfree_skb_list(nskb);\n+\t\t\treturn NF_DROP;\n+\t\t}\n+\t\t__nf_flow_queue_xmit(net, segs, xmit);\n+\t}\n+\tconsume_skb(skb);\n+\n+\treturn NF_STOLEN;\n+}\n+\n static unsigned int nf_flow_queue_xmit(struct net *net, struct sk_buff *skb,\n \t\t\t\t       struct nf_flow_xmit *xmit)\n {\n \tif (xmit->tuple->encap_num) {\n+\t\tif (skb_is_gso(skb) && xmit->needs_gso_segment)\n+\t\t\treturn nf_flow_encap_gso_xmit(net, skb, xmit);\n+\n \t\tif (nf_flow_encap_push(skb, xmit->tuple, xmit->outdev) < 0)\n \t\t\treturn NF_DROP;\n \t}\n@@ -866,6 +896,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,\n \t\treturn NF_DROP;\n \t}\n \txmit.tuple = other_tuple;\n+\txmit.needs_gso_segment = tuplehash->tuple.needs_gso_segment;\n \n \treturn nf_flow_queue_xmit(state->net, skb, &xmit);\n }\n@@ -1186,6 +1217,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,\n \t\treturn NF_DROP;\n \t}\n \txmit.tuple = other_tuple;\n+\txmit.needs_gso_segment = tuplehash->tuple.needs_gso_segment;\n \n \treturn nf_flow_queue_xmit(state->net, skb, &xmit);\n }\ndiff --git a/net/netfilter/nf_flow_table_path.c b/net/netfilter/nf_flow_table_path.c\nindex 6bb9579dcc2a..9e88ea6a2eef 100644\n--- a/net/netfilter/nf_flow_table_path.c\n+++ b/net/netfilter/nf_flow_table_path.c\n@@ -86,6 +86,7 @@ struct nft_forward_info {\n \tu8 ingress_vlans;\n \tu8 h_source[ETH_ALEN];\n \tu8 h_dest[ETH_ALEN];\n+\tbool needs_gso_segment;\n \tenum flow_offload_xmit_type xmit_type;\n };\n \n@@ -138,8 +139,11 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack,\n \t\t\t\t\tpath->encap.proto;\n \t\t\t\tinfo->num_encaps++;\n \t\t\t}\n-\t\t\tif (path->type == DEV_PATH_PPPOE)\n+\t\t\tif (path->type == DEV_PATH_PPPOE) {\n \t\t\t\tmemcpy(info->h_dest, path->encap.h_dest, ETH_ALEN);\n+\t\t\t\tinfo->xmit_type = FLOW_OFFLOAD_XMIT_DIRECT;\n+\t\t\t\tinfo->needs_gso_segment = 1;\n+\t\t\t}\n \t\t\tbreak;\n \t\tcase DEV_PATH_BRIDGE:\n \t\t\tif (is_zero_ether_addr(info->h_source))\n@@ -279,6 +283,7 @@ static void nft_dev_forward_path(const struct nft_pktinfo *pkt,\n \t\tmemcpy(route->tuple[dir].out.h_dest, info.h_dest, ETH_ALEN);\n \t\troute->tuple[dir].xmit_type = info.xmit_type;\n \t}\n+\troute->tuple[dir].out.needs_gso_segment = info.needs_gso_segment;\n }\n \n int nft_flow_route(const struct nft_pktinfo *pkt, const struct nf_conn *ct,\n",
    "prefixes": [
        "nf",
        "v2",
        "2/2"
    ]
}