From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E8F8EF48DB for ; Fri, 13 Feb 2026 07:12:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 84BAA407C1; Fri, 13 Feb 2026 07:12:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qghVZTiWUOVV; Fri, 13 Feb 2026 07:12:09 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A7D504088A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770966729; bh=WFllcNF1m/veazpXfhkGge2XTmCfSEav8feNbAw2Nvs=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=KBrAZ4EjRPuEAjtzM8ug/80xAX/P0zoIJhjSgLg8izFJlEVj602cy9NcwiARiWhvY BxlzF9Ge9ojLpzmmcYbm3V0GJWVOQ1wb2SLLgJBP/nTmW5JIzO0uEjbwmdpkvsDV+6 toTKS61IMXvJtCqkL3BGBROuRxF5pP+JCCNHk7r0bMGW6+HHxp0giKpmcR9TKa3Sbb N8drvGyu6lC/Mc64q3FNQgFmpwfP1iUf111NRJx39GQQRhRrnotlwOz5wP35aZMIjO GRohH3FYMrgI1sodTxQxfN0qRbPub8wRPOZCqf3h0jcXCnYO48GYy6fXOAQlNi2Ydv 0b7GiVEN+c2RA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id A7D504088A; Fri, 13 Feb 2026 07:12:09 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id BF39F1D6 for ; Fri, 13 Feb 2026 07:12:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A047E4103D for ; Fri, 13 Feb 2026 07:12:08 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jUiJ3EUfxz7R for ; Fri, 13 Feb 2026 07:12:07 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::1230; helo=mail-dl1-x1230.google.com; envelope-from=stfomichev@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 8C22E400AE DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8C22E400AE Received: from mail-dl1-x1230.google.com (mail-dl1-x1230.google.com [IPv6:2607:f8b0:4864:20::1230]) by smtp2.osuosl.org (Postfix) with ESMTPS id 8C22E400AE for ; Fri, 13 Feb 2026 07:12:07 +0000 (UTC) Received: by mail-dl1-x1230.google.com with SMTP id a92af1059eb24-126ea4e9694so1691627c88.1 for ; Thu, 12 Feb 2026 23:12:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770966726; x=1771571526; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WFllcNF1m/veazpXfhkGge2XTmCfSEav8feNbAw2Nvs=; b=FybyNsDjCaNTFjhACgWkfkUbeV6/0mVVjOabpLtrjxKsLQgnulvWPN+PDUTyw+5/WN MHOwP0b+qghQaoSpVuyivVcG0RuguZUnSMs565UNijsR1JV0nWPHPnY1fOgqIXtfs8Gj QHLwMMbzaf6+lXnchAzlPHTxzzUFzfvHrOgszwdMyxv86u2LWAHCWYV8IRJ2zf33ZUAJ iwBmeGA517U32mybcafsDxEmflRfaohIoudQsPUeQG8qAdxa0AStpZhLO8vFFl3Il97N Jvbq3X6gfCW41mvbTutTmdvPzwvWcaO1t2HKCqbgBCRZwRQoOn1TyiqHuSb+ijxRR63C 5XJQ== X-Forwarded-Encrypted: i=1; AJvYcCVckU9RC6bKBnzjdfVz4w5XyvrKJ6HnZs3iUWfk2KnfGE46b8/npcRmeyM/dOivZs6ur95s0WgoPQrCnsEqrGY=@lists.osuosl.org X-Gm-Message-State: AOJu0YxRaazNGeFJuWWQwdZrDKrmNuisaguBYBADHk+0GayTpkMBuYxX mQ/uMjyr8QVC9Z5kj7B1/NpWlCenfj6a4hpaszSxgBflErFo9xreRjhZiJH2 X-Gm-Gg: AZuq6aK/KrctxD5yra19idseTmBhuO5yzMPoF135Q2WfT+sgUDcGRTEu4LCmeF/yKM2 R9Z7hiNDetTekahhkPqOqHnbg2GFek3tIVp/bNjIWZXgB9eKqeX31lJfTdHfbTLX8LDnKwPjet7 ynDATea0YLasTPuxC4wNEUE7BHhF3xfSDAippvzCsshXFCPsf+0LMTI80W6S7c20iL+xCjsRosS bmV+ZjT5EXgvCSv1JMSFAx+BNClfs2ja6ZUKfyFcX5jabxQaxgDXg/am2/0ej2FAyGC1YHphcul h/7+HGNugtekbQcf3ftYLdMQgGIfSY+9KJ1VFSsSsPh1KPqps9YUuooAvyX54UQTAY3fi/0KfWC 2kPh57gtvHUv0eH5eKqf0e+7YUi2megG5o+AKA+eVSm80E+XUs8UM5zmrerDgoe8XT7lkUurBr1 ftPTVHb4e8VSoWdRbb8UxC2t7Kzuj5FzkicbxVxA8BN0jeGXWEDsIYEuEHzbAvSiksC5NGRb82M 6yaIpqmKVztSjNxkkuheR9NrbD3 X-Received: by 2002:a05:7301:2f99:b0:2ba:7033:533b with SMTP id 5a478bee46e88-2babc47ff16mr240332eec.32.1770959815327; Thu, 12 Feb 2026 21:16:55 -0800 (PST) Received: from localhost (c-76-102-12-149.hsd1.ca.comcast.net. [76.102.12.149]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ba9dbe123asm5764986eec.13.2026.02.12.21.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 21:16:54 -0800 (PST) Date: Thu, 12 Feb 2026 21:16:54 -0800 From: Stanislav Fomichev To: Lorenzo Bianconi Message-ID: References: <20250925-bpf-xdp-meta-rxcksum-v2-0-6b3fe987ce91@kernel.org> <20250925-bpf-xdp-meta-rxcksum-v2-1-6b3fe987ce91@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770966726; x=1771571526; darn=lists.osuosl.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WFllcNF1m/veazpXfhkGge2XTmCfSEav8feNbAw2Nvs=; b=H9Gc2i0TAtP0dqmDehuTzZWgDKgLUdfZd63yDYrRPOYpdgCJr9qLhg9KEH36oJC3bT S9gNvwRSX84dlrt3wOBHg93xgxvK0/LU9dem8U3wzMsn9x9Jf9zeauYCxD1162ahLe04 NKULTPgEdqcQQsGXDW6VzjVA8PZM1jkVsbplvT4GHjgIul3ILKWhZgqx3mDcf1fDdEdG cpx6FMjKgQ3tGdo/R4+U63HJHN5SmLQXxGuOq5852TMjPWz04cl7GoiuCO9PSCXjbBz/ /C+nAaw3VC/bQewb+nvye06ob9vf1CQTavM0DO3SYeseNiqi5gc9WhhBL9u4CahqN/9W 7yLA== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=H9Gc2i0T Subject: Re: [Intel-wired-lan] [PATCH RFC bpf-next v2 1/5] netlink: specs: Add XDP RX checksum capability to XDP metadata specs X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kselftest@vger.kernel.org, Alexei Starovoitov , Song Liu , Eric Dumazet , Tony Nguyen , Yonghong Song , Shuah Khan , Jiri Olsa , Donald Hunter , Daniel Borkmann , Alexander Lobakin , Przemek Kitszel , John Fastabend , Andrii Nakryiko , Stanislav Fomichev , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Jesper Dangaard Brouer , KP Singh , Hao Luo , netdev@vger.kernel.org, Eduard Zingerman , Simon Horman , bpf@vger.kernel.org, Martin KaFai Lau , "David S. Miller" , Andrew Lunn Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 02/12, Lorenzo Bianconi wrote: > > On 02/10, Lorenzo Bianconi wrote: > > > > On 09/26, Jesper Dangaard Brouer wrote: > > > > > > > > > > > > > > > On 26/09/2025 06.20, Stanislav Fomichev wrote: > > > > > > On 09/25, Lorenzo Bianconi wrote: > > > > > > > Introduce XDP RX checksum capability to XDP metadata specs. XDP RX > > > > > > > checksum will be use by devices capable of exposing receive checksum > > > > > > > result via bpf_xdp_metadata_rx_checksum(). > > > > > > > Moreover, introduce xmo_rx_checksum netdev callback in order allow the > > > > > > > eBPF program bounded to the device to retrieve the RX checksum result > > > > > > > computed by the hw NIC. > > > > > > > > > > > > > > Signed-off-by: Lorenzo Bianconi > > > > > > > --- > > > > > > > Documentation/netlink/specs/netdev.yaml | 5 +++++ > > > > > > > include/net/xdp.h | 14 ++++++++++++++ > > > > > > > net/core/xdp.c | 29 +++++++++++++++++++++++++++++ > > > > > > > 3 files changed, 48 insertions(+) > > > > > > > > > > > > > > diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml > > > > > > > index e00d3fa1c152d7165e9485d6d383a2cc9cef7cfd..00699bf4a7fdb67c6b9ee3548098b0c933fd39a4 100644 > > > > > > > --- a/Documentation/netlink/specs/netdev.yaml > > > > > > > +++ b/Documentation/netlink/specs/netdev.yaml > > > > > > > @@ -61,6 +61,11 @@ definitions: > > > > > > > doc: | > > > > > > > Device is capable of exposing receive packet VLAN tag via > > > > > > > bpf_xdp_metadata_rx_vlan_tag(). > > > > > > > + - > > > > > > > + name: checksum > > > > > > > + doc: | > > > > > > > + Device is capable of exposing receive checksum result via > > > > > > > + bpf_xdp_metadata_rx_checksum(). > > > > > > > - > > > > > > > type: flags > > > > > > > name: xsk-flags > > > > > > > diff --git a/include/net/xdp.h b/include/net/xdp.h > > > > > > > index aa742f413c358575396530879af4570dc3fc18de..9ab9ac10ae2074b70618a9d4f32544d8b9a30b63 100644 > > > > > > > --- a/include/net/xdp.h > > > > > > > +++ b/include/net/xdp.h > > > > > > > @@ -586,6 +586,10 @@ void xdp_attachment_setup(struct xdp_attachment_info *info, > > > > > > > NETDEV_XDP_RX_METADATA_VLAN_TAG, \ > > > > > > > bpf_xdp_metadata_rx_vlan_tag, \ > > > > > > > xmo_rx_vlan_tag) \ > > > > > > > + XDP_METADATA_KFUNC(XDP_METADATA_KFUNC_RX_CHECKSUM, \ > > > > > > > + NETDEV_XDP_RX_METADATA_CHECKSUM, \ > > > > > > > + bpf_xdp_metadata_rx_checksum, \ > > > > > > > + xmo_rx_checksum) > > > > > > > enum xdp_rx_metadata { > > > > > > > #define XDP_METADATA_KFUNC(name, _, __, ___) name, > > > > > > > @@ -643,12 +647,22 @@ enum xdp_rss_hash_type { > > > > > > > XDP_RSS_TYPE_L4_IPV6_SCTP_EX = XDP_RSS_TYPE_L4_IPV6_SCTP | XDP_RSS_L3_DYNHDR, > > > > > > > }; > > > > > > > +enum xdp_checksum { > > > > > > > + XDP_CHECKSUM_NONE = CHECKSUM_NONE, > > > > > > > + XDP_CHECKSUM_UNNECESSARY = CHECKSUM_UNNECESSARY, > > > > > > > + XDP_CHECKSUM_COMPLETE = CHECKSUM_COMPLETE, > > > > > > > + XDP_CHECKSUM_PARTIAL = CHECKSUM_PARTIAL, > > > > > > > +}; > > > > > > > > > > > > Btw, might be worth mentioning, awhile ago we had settled on a smaller set of > > > > > > exposed types: > > > > > > > > > > > > https://lore.kernel.org/netdev/20230811161509.19722-13-larysa.zaremba@intel.com/ > > > > > > > > > > > > Maybe go through the previous postings and check if the arguments are > > > > > > still relevant? (or explain why we want more checksum now) > > > > > > > > > > IHMO the linked proposal reduced the types too much. > > > > > > > > IIRC, PARTIAL was removed because it's mostly (or only) a TX feature? > > > > So no real need to expose it as an rx hint. And I think empty xdp_csum_status > > > > in that proposal might have indicated NONE? > > > > > > Sorry for the (very) late reply. According to [0] CHECKSUM_PARTIAL can be used > > > even on Rx side, right? > > > > So is this for virtio (which I don't think you need)? Or something else? > > I forgot to mention before CHECKSUM_PARTIAL is used for the veth use-case > when the packet is coming from the networking stack. But what do you do with that partial state in BPF? I doubt you're calculating/verifying it? Can we treat/export it as NONE/UNNECESSARY for now?