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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 732D0EDF026 for ; Thu, 12 Feb 2026 03:41:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1860C611CA; Thu, 12 Feb 2026 03:41:01 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 4BG9LMTfAiGu; Thu, 12 Feb 2026 03:41:00 +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 smtp3.osuosl.org 2FE99611EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770867660; bh=tK21a4JoivTAPugf5a0tgKET71snd9+E0xX3YsV0FIM=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F09vhUhU6IdkF31EnF/c08RcSxMKaK6mH4cMoLydeTKwX2AJutpXTlF09y3vJwh8z hI9+xL4dIsLC2WJ7qc1TTeDdJEOINNPqvTyTomcHZOrAahxxtAOH2U2LxJ9uocz1cp /CnB89CvF2SN6OEiC+NM3YBMXI+hnrXdHn1sjguVJQ/OtjtLzw0yr6+p/ytFBE4XFh 6+PfcazaC5czHB6wEAvGQAlU1uve1ikVosoj9gd/OO36zzEtqEC7xLyUV9sL+zX1wO 6vTHVSQ33vn7v0j0F2lZrdhdw1POEoLm2tjsiTCRJYdU62+DA4HkexeJ4BxTOmIiM7 vaTQOsDWMXH7w== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 2FE99611EE; Thu, 12 Feb 2026 03:41:00 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 05CCEBE for ; Thu, 12 Feb 2026 03:40:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DE20E4028B for ; Thu, 12 Feb 2026 03:40:58 +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 3QtEZ4tx53OE for ; Thu, 12 Feb 2026 03:40:58 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4860:4864:20::32; helo=mail-oa1-x32.google.com; envelope-from=stfomichev@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org AB1C74016B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AB1C74016B Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by smtp2.osuosl.org (Postfix) with ESMTPS id AB1C74016B for ; Thu, 12 Feb 2026 03:40:57 +0000 (UTC) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-404254ffe8aso1014166fac.0 for ; Wed, 11 Feb 2026 19:40:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770867656; x=1771472456; 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=tK21a4JoivTAPugf5a0tgKET71snd9+E0x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AXE5FHLie93pGMI3OtjIGAwAfsD9s3WAIBYHw82cC+73WkXBYDQ yLbRQHt9uIY59YIrw== X-Received: by 2002:a05:7022:249f:b0:121:d898:edae with SMTP id a92af1059eb24-1272fd99529mr389245c88.24.1770861432625; Wed, 11 Feb 2026 17:57:12 -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 a92af1059eb24-1272a6e943fsm2870384c88.11.2026.02.11.17.57.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 17:57:12 -0800 (PST) Date: Wed, 11 Feb 2026 17:57:11 -0800 From: Stanislav Fomichev To: Lorenzo Bianconi Cc: Jesper Dangaard Brouer , Lorenzo Bianconi , Donald Hunter , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Stanislav Fomichev , Andrew Lunn , Tony Nguyen , Przemek Kitszel , Alexander Lobakin , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Shuah Khan , Maciej Fijalkowski , netdev@vger.kernel.org, bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kselftest@vger.kernel.org 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=1770867656; x=1771472456; 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=tK21a4JoivTAPugf5a0tgKET71snd9+E0xX3YsV0FIM=; b=J1QaE16Bk2YpFc2ibycAUK8whN8yiPHh4fzGLT9hrlj6aDUnIBMsyhXFLcPdB+4m8+ oYxiDV0LnLNjkzRxoPEw0AC6wjBMQX3gIZ2x5alHSdlWagq2lEDt3QZLBwySuk8v0wwT t6MpShFT/AlBxO1QNaAFKAF+D9DC5y8CN5IAcmpO6gsrsYMA6LEh3c+CtJ09Je8DPJp9 FHPMlQOpIX+H1tvvvOOkhbWQQDRpLAy/JK1QcdckUlUfQS6Ue0VcI0UsYkrDxKXlhdq2 5NTquYl+jPknmPU4W4QduglI5jRJuhLg1GbiOs6P/pphdpD5PYQ+z9Eqvoe+9W3lcfpY asPQ== 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=J1QaE16B 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: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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? Can we start with the "easy" cases of UNNECESSARY/COMPLETE/NONE? I'm not even sure we need to expose the csum_level (start with level=0 and handle encap if/when there is a real usecase). With kfuncs we should be able to change/extend the API when needed. (for PARTIAL, not even sure what the BPF prog is supposed to do with it)