get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2197159,
    "url": "http://patchwork.ozlabs.org/api/patches/2197159/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260217-bpf-xdp-meta-rxcksum-v3-3-30024c50ba71@kernel.org/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260217-bpf-xdp-meta-rxcksum-v3-3-30024c50ba71@kernel.org>",
    "list_archive_url": null,
    "date": "2026-02-17T08:33:58",
    "name": "[bpf-next,v3,3/5] net: ice: Add xmo_rx_checksum callback",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "04f03faab09242978370781a441b396985d10cd9",
    "submitter": {
        "id": 76007,
        "url": "http://patchwork.ozlabs.org/api/people/76007/?format=api",
        "name": "Lorenzo Bianconi",
        "email": "lorenzo@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260217-bpf-xdp-meta-rxcksum-v3-3-30024c50ba71@kernel.org/mbox/",
    "series": [
        {
            "id": 492397,
            "url": "http://patchwork.ozlabs.org/api/series/492397/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=492397",
            "date": "2026-02-17T08:33:55",
            "name": "Add the the capability to load HW RX checsum in eBPF programs",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492397/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2197159/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197159/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=7e0qE3eb;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4fFXy03vJsz1xwD\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 19:34:48 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id E95CD40CDA;\n\tTue, 17 Feb 2026 08:34:46 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id NQ_7UHBm5GaE; Tue, 17 Feb 2026 08:34:46 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 3018140CC4;\n\tTue, 17 Feb 2026 08:34:46 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id BE7791EB\n for <intel-wired-lan@lists.osuosl.org>; Tue, 17 Feb 2026 08:34:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id A079940CCC\n for <intel-wired-lan@lists.osuosl.org>; Tue, 17 Feb 2026 08:34:43 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id dHrgmEBVi4Vr for <intel-wired-lan@lists.osuosl.org>;\n Tue, 17 Feb 2026 08:34:42 +0000 (UTC)",
            "from sea.source.kernel.org (sea.source.kernel.org\n [IPv6:2600:3c0a:e001:78e:0:1991:8:25])\n by smtp4.osuosl.org (Postfix) with ESMTPS id A040E40CC4\n for <intel-wired-lan@lists.osuosl.org>; Tue, 17 Feb 2026 08:34:42 +0000 (UTC)",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id 5345042AE1;\n Tue, 17 Feb 2026 08:34:42 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id A9748C4CEF7;\n Tue, 17 Feb 2026 08:34:41 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3018140CC4",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org A040E40CC4"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1771317286;\n\tbh=t1l3h4aODXJy1D/iGCNaRp7wxtwW0s1JEZCBd/kTna8=;\n\th=From:Date:References:In-Reply-To:To:Cc:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=7e0qE3ebCAhcpU88yVEyaLsHv3IVQgm+Ck5Wi1/8+25Eprhc3QP5WtHA1pCvAaA/k\n\t 77bglst20nwlg80eP/5/w8EvyUznJIC/h4j6CAfh8p+KAWtLe5/F5jz3YrTdsno/P8\n\t lQugGn9Av+BsiDcYxu0NhAT2lwosIh3YhXVD27CSFyD6AZz5UE9w+6RdKbVaKkwKuX\n\t RtFycQB6auhqL95Tpregn/grKmwb9TFtq50CUVt0o7opAf9BY2faBFfIO1wFXz6rm2\n\t HhwabNYaOHIS+fOyf+gMxqe7ey8JxduSxA9RO8FaTlqYeKfxC3WvLCl/lnZwnzbOsl\n\t bbk/3HlRxpsCw==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org;\n envelope-from=lorenzo@kernel.org; receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org A040E40CC4",
        "From": "Lorenzo Bianconi <lorenzo@kernel.org>",
        "Date": "Tue, 17 Feb 2026 09:33:58 +0100",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260217-bpf-xdp-meta-rxcksum-v3-3-30024c50ba71@kernel.org>",
        "References": "<20260217-bpf-xdp-meta-rxcksum-v3-0-30024c50ba71@kernel.org>",
        "In-Reply-To": "<20260217-bpf-xdp-meta-rxcksum-v3-0-30024c50ba71@kernel.org>",
        "To": "Donald Hunter <donald.hunter@gmail.com>,\n Jakub Kicinski <kuba@kernel.org>, \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>,\n Simon Horman <horms@kernel.org>, Alexei Starovoitov <ast@kernel.org>,\n Daniel Borkmann <daniel@iogearbox.net>,\n Jesper Dangaard Brouer <hawk@kernel.org>,\n John Fastabend <john.fastabend@gmail.com>,\n Stanislav Fomichev <sdf@fomichev.me>, Andrew Lunn <andrew+netdev@lunn.ch>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Alexander Lobakin <aleksander.lobakin@intel.com>,\n Andrii Nakryiko <andrii@kernel.org>,\n Martin KaFai Lau <martin.lau@linux.dev>,\n Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,\n Yonghong Song <yonghong.song@linux.dev>, KP Singh <kpsingh@kernel.org>,\n Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>,\n Shuah Khan <shuah@kernel.org>,\n Maciej Fijalkowski <maciej.fijalkowski@intel.com>",
        "Cc": "Jakub Sitnicki <jakub@cloudflare.com>, netdev@vger.kernel.org,\n bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n linux-kselftest@vger.kernel.org, Lorenzo Bianconi <lorenzo@kernel.org>",
        "X-Mailer": "b4 0.14.2",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=kernel.org; s=k20201202; t=1771317282;\n bh=xV8R9m4GgTS/7b34Lu99I2P+APPYZq1SFLapip8d0GE=;\n h=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n b=f29LN/VD/cMIlNYGjO5ejm/K/H7BwJghQtchVSl3uIIZAnCSDg8k3mrgwBkg2Wazt\n V+HMIX58ruYtPWbJIFqtEitNu14vSnmUgzu/XTGP8EJ8yG2KpBPjS/SQqy45FA0vHd\n kA0RlK82uJ5zG+lXQ/2KhAMVsnnNaje43UNoMELlsM7O2R7B4QPYj4n8rTjOZjuSLW\n IMZG2BkenKn5jumz+L0qgCOR1M2XV+IJcKWZKeAlbpOxopJjiK8k1O4CCE8t9VTv0r\n pMiMx2TQN9IvekPoMj9wGQJus23VVAa9Cjr6KJp0t67Eo64/g+FAaCHv5P2ZyxAUxx\n lcanZ7KjAXmJw==",
        "X-Mailman-Original-Authentication-Results": [
            "smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org",
            "smtp4.osuosl.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.a=rsa-sha256 header.s=k20201202 header.b=f29LN/VD"
        ],
        "Subject": "[Intel-wired-lan] [PATCH bpf-next v3 3/5] net: ice: Add\n xmo_rx_checksum callback",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Implement xmo_rx_checksum callback in ice driver to report RX checksum\nresult to the eBPF program bounded to the NIC.\nIntroduce ice_get_rx_csum utility routine in order to make the rx checksum\ncode reusable from ice_rx_csum()\n\nSigned-off-by: Lorenzo Bianconi <lorenzo@kernel.org>\n---\n drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 118 +++++++++++++++++---------\n 1 file changed, 76 insertions(+), 42 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c\nindex 956da38d63b0032db238325dcff818bbd99478e9..65b34b29f396560739fc58293496a5e9ddf09b53 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c\n@@ -81,69 +81,47 @@ ice_rx_hash_to_skb(const struct ice_rx_ring *rx_ring,\n \t\tlibeth_rx_pt_set_hash(skb, hash, decoded);\n }\n \n-/**\n- * ice_rx_gcs - Set generic checksum in skb\n- * @skb: skb currently being received and modified\n- * @rx_desc: receive descriptor\n- */\n-static void ice_rx_gcs(struct sk_buff *skb,\n-\t\t       const union ice_32b_rx_flex_desc *rx_desc)\n-{\n-\tconst struct ice_32b_rx_flex_desc_nic *desc;\n-\tu16 csum;\n-\n-\tdesc = (struct ice_32b_rx_flex_desc_nic *)rx_desc;\n-\tskb->ip_summed = CHECKSUM_COMPLETE;\n-\tcsum = (__force u16)desc->raw_csum;\n-\tskb->csum = csum_unfold((__force __sum16)swab16(csum));\n-}\n-\n-/**\n- * ice_rx_csum - Indicate in skb if checksum is good\n- * @ring: the ring we care about\n- * @skb: skb currently being received and modified\n- * @rx_desc: the receive descriptor\n- * @ptype: the packet type decoded by hardware\n- *\n- * skb->protocol must be set before this function is called\n- */\n static void\n-ice_rx_csum(struct ice_rx_ring *ring, struct sk_buff *skb,\n-\t    union ice_32b_rx_flex_desc *rx_desc, u16 ptype)\n+ice_get_rx_csum(const union ice_32b_rx_flex_desc *rx_desc, u16 ptype,\n+\t\tstruct ice_rx_ring *ring, enum xdp_checksum *ip_summed,\n+\t\tu32 *cksum_meta)\n {\n-\tstruct libeth_rx_pt decoded;\n+\tstruct libeth_rx_pt decoded = libie_rx_pt_parse(ptype);\n \tu16 rx_status0, rx_status1;\n \tbool ipv4, ipv6;\n \n-\t/* Start with CHECKSUM_NONE and by default csum_level = 0 */\n-\tskb->ip_summed = CHECKSUM_NONE;\n-\n-\tdecoded = libie_rx_pt_parse(ptype);\n \tif (!libeth_rx_pt_has_checksum(ring->netdev, decoded))\n-\t\treturn;\n+\t\tgoto checksum_none;\n \n \trx_status0 = le16_to_cpu(rx_desc->wb.status_error0);\n \trx_status1 = le16_to_cpu(rx_desc->wb.status_error1);\n-\n \tif ((ring->flags & ICE_RX_FLAGS_RING_GCS) &&\n \t    rx_desc->wb.rxdid == ICE_RXDID_FLEX_NIC &&\n \t    (decoded.inner_prot == LIBETH_RX_PT_INNER_TCP ||\n \t     decoded.inner_prot == LIBETH_RX_PT_INNER_UDP ||\n \t     decoded.inner_prot == LIBETH_RX_PT_INNER_ICMP)) {\n-\t\tice_rx_gcs(skb, rx_desc);\n+\t\tconst struct ice_32b_rx_flex_desc_nic *desc;\n+\t\t__wsum wcsum;\n+\t\tu16 csum;\n+\n+\t\tdesc = (struct ice_32b_rx_flex_desc_nic *)rx_desc;\n+\t\t*ip_summed = XDP_CHECKSUM_COMPLETE;\n+\t\tcsum = (__force u16)desc->raw_csum;\n+\t\twcsum = csum_unfold((__force __sum16)swab16(csum));\n+\t\t*cksum_meta = (__force u32)wcsum;\n \t\treturn;\n \t}\n \n \t/* check if HW has decoded the packet and checksum */\n \tif (!(rx_status0 & BIT(ICE_RX_FLEX_DESC_STATUS0_L3L4P_S)))\n-\t\treturn;\n+\t\tgoto checksum_none;\n \n \tipv4 = libeth_rx_pt_get_ip_ver(decoded) == LIBETH_RX_PT_OUTER_IPV4;\n \tipv6 = libeth_rx_pt_get_ip_ver(decoded) == LIBETH_RX_PT_OUTER_IPV6;\n \n \tif (ipv4 && (rx_status0 & (BIT(ICE_RX_FLEX_DESC_STATUS0_XSUM_EIPE_S)))) {\n \t\tring->vsi->back->hw_rx_eipe_error++;\n-\t\treturn;\n+\t\tgoto checksum_none;\n \t}\n \n \tif (ipv4 && (rx_status0 & (BIT(ICE_RX_FLEX_DESC_STATUS0_XSUM_IPE_S))))\n@@ -167,14 +145,45 @@ ice_rx_csum(struct ice_rx_ring *ring, struct sk_buff *skb,\n \t * we need to bump the checksum level by 1 to reflect the fact that\n \t * we are indicating we validated the inner checksum.\n \t */\n-\tif (decoded.tunnel_type >= LIBETH_RX_PT_TUNNEL_IP_GRENAT)\n-\t\tskb->csum_level = 1;\n-\n-\tskb->ip_summed = CHECKSUM_UNNECESSARY;\n+\t*cksum_meta = decoded.tunnel_type >= LIBETH_RX_PT_TUNNEL_IP_GRENAT;\n+\t*ip_summed = XDP_CHECKSUM_UNNECESSARY;\n \treturn;\n \n checksum_fail:\n \tring->vsi->back->hw_csum_rx_error++;\n+checksum_none:\n+\t*ip_summed = XDP_CHECKSUM_NONE;\n+\t*cksum_meta = 0;\n+}\n+\n+/**\n+ * ice_rx_csum - Indicate in skb if checksum is good\n+ * @ring: the ring we care about\n+ * @skb: skb currently being received and modified\n+ * @rx_desc: the receive descriptor\n+ * @ptype: the packet type decoded by hardware\n+ *\n+ * skb->protocol must be set before this function is called\n+ */\n+static void\n+ice_rx_csum(struct ice_rx_ring *ring, struct sk_buff *skb,\n+\t    union ice_32b_rx_flex_desc *rx_desc, u16 ptype)\n+{\n+\tenum xdp_checksum ip_summed;\n+\tu32 cksum_meta;\n+\n+\tice_get_rx_csum(rx_desc, ptype, ring, &ip_summed, &cksum_meta);\n+\tswitch (ip_summed) {\n+\tcase XDP_CHECKSUM_UNNECESSARY:\n+\t\tskb->csum_level = cksum_meta;\n+\t\tbreak;\n+\tcase XDP_CHECKSUM_COMPLETE:\n+\t\tskb->csum = (__force __wsum)cksum_meta;\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\tskb->ip_summed = ip_summed;\n }\n \n /**\n@@ -569,6 +578,30 @@ static int ice_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash,\n \treturn 0;\n }\n \n+/**\n+ * ice_xdp_rx_checksum - RX checksum XDP hint handler\n+ * @ctx: XDP buff pointer\n+ * @ip_summed: RX checksum result destination address\n+ * @cksum_meta: XDP RX checksum metadata destination address\n+ *\n+ * Copy RX checksum result (if available) and its metadata to the\n+ * destination address.\n+ */\n+static int ice_xdp_rx_checksum(const struct xdp_md *ctx,\n+\t\t\t       enum xdp_checksum *ip_summed,\n+\t\t\t       u32 *cksum_meta)\n+{\n+\tconst struct libeth_xdp_buff *xdp_ext = (void *)ctx;\n+\tconst union ice_32b_rx_flex_desc *rx_desc = xdp_ext->desc;\n+\tstruct ice_rx_ring *ring;\n+\n+\tring = libeth_xdp_buff_to_rq(xdp_ext, typeof(*ring), xdp_rxq);\n+\tice_get_rx_csum(rx_desc, ice_get_ptype(rx_desc), ring, ip_summed,\n+\t\t\tcksum_meta);\n+\n+\treturn 0;\n+}\n+\n /**\n  * ice_xdp_rx_vlan_tag - VLAN tag XDP hint handler\n  * @ctx: XDP buff pointer\n@@ -601,4 +634,5 @@ const struct xdp_metadata_ops ice_xdp_md_ops = {\n \t.xmo_rx_timestamp\t\t= ice_xdp_rx_hw_ts,\n \t.xmo_rx_hash\t\t\t= ice_xdp_rx_hash,\n \t.xmo_rx_vlan_tag\t\t= ice_xdp_rx_vlan_tag,\n+\t.xmo_rx_checksum\t\t= ice_xdp_rx_checksum,\n };\n",
    "prefixes": [
        "bpf-next",
        "v3",
        "3/5"
    ]
}