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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 1A2E0C4452D for ; Tue, 21 Jul 2026 23:04:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B9AF480B6E; Tue, 21 Jul 2026 23:04:26 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qZ1lOLwNdeL1; Tue, 21 Jul 2026 23:04:26 +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 smtp1.osuosl.org 1D08580B89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1784675066; bh=78htSqZa+5pBteZG4UB1DmemzqB0eVW2EvSwVDuZiqs=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P0a0GY5t1sGwEJUpnZqBx6XRgkkywKdow0IJgkr8dOluJDeyItMoPASDBv3Ma3+qu GeGUqlVOicfVj/Heja3or3oyibI/wRxeug98S2m6YsNAxJjq+5PPIsYLLHBBwcn2Fr /5in9nsq+TRNjQsl9sv+95ZIJZOx1TwT36H339hRVWTBN/TEuPL8n75aze2wztXxFF oykP49N3rtROYCc413IhWd/fcM/7hB5c1gt+wAPG2Byp50HpVHt2QuDVO/l5azOwwi rqjBipLGp+oSyCyIqs7qYLuv7r1nbyiZ+d65jSvPTzImS7CrMpwN0AqXqXmDjPv8EJ frUM/J/ZRFsTQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 1D08580B89; Tue, 21 Jul 2026 23:04:26 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id DDF97313 for ; Tue, 21 Jul 2026 23:04:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C7B9A40A3A for ; Tue, 21 Jul 2026 23:04:24 +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 nNnDbDKUJCFI for ; Tue, 21 Jul 2026 23:04:24 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:39::7; helo=mail-pj2-x07.google.com; envelope-from=sdf.kernel@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 1D01C40A40 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1D01C40A40 Received: from mail-pj2-x07.google.com (mail-pj2-x07.google.com [IPv6:2607:f8b0:4864:39::7]) by smtp4.osuosl.org (Postfix) with ESMTPS id 1D01C40A40 for ; Tue, 21 Jul 2026 23:04:23 +0000 (UTC) Received: by mail-pj2-x07.google.com with SMTP id 98e67ed59e1d1-38dcd98e5easo5996429a91.0 for ; Tue, 21 Jul 2026 16:04:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784675063; x=1785279863; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=78ht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HARsQ== X-Received: by 2002:a17:90b:38ca:b0:387:e0db:3d8f with SMTP id 98e67ed59e1d1-38e4b5b4fadmr19229906a91.42.1784675063089; Tue, 21 Jul 2026 16:04:23 -0700 (PDT) Received: from localhost ([2a03:2880:2ff:4::]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38ea81b2c92sm24438a91.14.2026.07.21.16.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 16:04:22 -0700 (PDT) Date: Tue, 21 Jul 2026 16:03:37 -0700 From: Stanislav Fomichev To: Jakub Kicinski Cc: Lorenzo Bianconi , Donald Hunter , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , 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 , Jonathan Corbet , Shuah Khan , Kumar Kartikeya Dwivedi , Emil Tsalapatis , Vladimir Vdovin , Jakub Sitnicki , netdev@vger.kernel.org, bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Message-ID: References: <20260715-bpf-xdp-meta-rxcksum-v5-0-623d5c0d0ab7@kernel.org> <20260715-bpf-xdp-meta-rxcksum-v5-8-623d5c0d0ab7@kernel.org> <20260721082728.74142e6c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260721082728.74142e6c@kernel.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784675063; x=1785279863; darn=lists.osuosl.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=78htSqZa+5pBteZG4UB1DmemzqB0eVW2EvSwVDuZiqs=; b=QhgxUxfcDla09eYz8t4hHS5hXq2z337zPER1ZbXPysYdMusgbSTEHFw9odbAuEc189 WxcxgSYxzqPgNm3BGcFap/3nLPAztc3/W5P9F0djaDhAE3i4rJWi8g6UwHYeS+2WLz5Z 6chBflIC328f87FFjysD4qpM4bpBxi9qRNXhL03Ds6L1P7b+7Z0pCPkXJ/P63wkTBMJ/ bnsWfj7dhyzsmcbQUvDaqWrx9z6ruJJj7Jbn9LofT5iCXESHH6xzzbqt3+TNAGE8QlCh csBr2YY6McIKcYzO7mrqCJwUZAWK6IUxWpkPy4rR/wxZ3x3OfVv4b3z4iG7G6/64sCT8 rmhw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=QhgxUxfc Subject: Re: [Intel-wired-lan] [PATCH bpf-next v5 8/8] selftests: net: add test for XDP_PASS skb checksum invalidation 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 07/21, Jakub Kicinski wrote: > On Mon, 20 Jul 2026 12:32:55 -0700 Stanislav Fomichev wrote: > > > > (although for gve I might be wrong, there is also gve_rx_skb_csum that only > > > > does UNNECESSARY). > > > > > > > > I'd wait for Jakub to chime in, but it feels like we should just document > > > > what we currently do as a recommended approach: for the drivers > > > > that support COMPLETE, do not report it when the bpf program is attached. > > > > Both NONE and UNNECESSARY are ok. > > > > > > I am not completely sure the UNNECESSARY case is different from the COMPLETE > > > one. What are we supposed to do if the driver reports UNNECESSARY and the ebpf > > > program modifies some fields covered by the rx-checksum? > > > > For unnecessary, I think the safe expectation is that the bpf program > > will update the value of the checksum in the packet if it touches the data? > > Documenting as expected behavior which no driver currently follows > is a bit silly. I thought the ask was to sketch out the plan of > explicitly updating/invalidating the checksum even if we don't > implement it today? This is about current drivers that only report UNNECESSARY with xdp: the xdp prog has to maintain in-packet checksum if it changes the payload. I think it's a fair assumption? In terms of documentation, here is what I have on my side, lmk if that makes sense, roughly: - TODAY - some drivers (correctly) disable reporting COMPLETE when XDP is attached - the xdp program has to modify the packet checksum value if it changes the payload - some drivers (incorrectly?) report COMPLETE for xdp-to-skb path -> unsafe, needs to be fixed - updating the payload doesn't update skb->csum, so the safest option right now is to only do UNNECESSARY with xdp for all drivers - the hw test needs to make sure that the csum is either NONE or UNNECESSARY, and will error out on COMPLETE - TOMORROW - if we want to properly support COMPLETE, we need a new set of kfuncs to update skb->csum value in the skb Does that make sense?