From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CD441C84BD for ; Sat, 15 Nov 2025 07:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763193534; cv=none; b=tTQXfexleEqBSbF7wHIXIvuJp+sTD8vD58B5r95TwBfCkt/rshzE74tAaMaZXMejnRL3JtkWk36vzKM6dnv7/0ZQj5MH54RfT/zGphAyTYiN+zz9jvJAdi+FWuyDRq7mPnRqhVJzutoHTZArhheRG27/n7jm0pjwTBDL9UpCe/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763193534; c=relaxed/simple; bh=7IA24hssfbm9kgS+7AETJvRObZ5S/rQnPGOyauw47VE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nGJWAn4Ijh3M3hh4ek1lN0kfUiiQx3wdccsX7hxLH762wL/wpqzuF9uDuKJ5QsraEWyJ+5+/3WxWSz0a6HzrhDzyFB/P/9TO2RjPt12+UQWwU1ncsc4SsX/eUO2rj/9ozz3XJMXRV6OQogR1WLs2UUpeDXb3pOFzP+HaMj7sC6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OzW0R3+e; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OzW0R3+e" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-343806688c5so2613520a91.0 for ; Fri, 14 Nov 2025 23:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763193532; x=1763798332; darn=vger.kernel.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=MF0CNlB09dDx8CZgE5eg3pyjdHElMh021rKPfz1W410=; b=OzW0R3+e0oa+av7r0wlfZt60wp2JakbpSIdq0xD8yB9cs0C8eh0ADZQQVUUl19nML/ QA6/IO06HsAlw76MJ5ZoNcF5HDrvxJkp8/mQ69UjCi70/pe8yRqw+j9QuqGzTVADtx/2 ua2iQMjBWYqMVwFqFWz7eHznHeIV9wJ22P+qIYCK5h+jJCX1GByz7JGtuFI/akqHqRTX nuDgNxz5KpTnhuQY8PujU/l1c1oGqDEIRJ2yK+aLC5AkWxX+t/E2gvOBC6W/XjP1lEE1 jMUEx7Vi7S/NaiSPRGUQspjZ/h2zTqt88htJmIDZctQTW5KJlgwBP8So83B6dGJz216K q3Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763193532; x=1763798332; 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=MF0CNlB09dDx8CZgE5eg3pyjdHElMh021rKPfz1W410=; b=ofecnVj8IFICZzokVFo5JJPACne9yXDPkZE9LtBP8jvsvFRJas5OWxlFvaFhSm0Pvz nEcnRqLU3yD3lxOBfRExIx8DnLoSWkK2jbz7KwsO123KYIKwRCO1R6bD9VvNX9EnawqL f7e8Kv1PG67lylFJacEsnnDS2apc1GDPzBYcBRmlW45z4UFNHayzZE5yPtUwCAjkVWAm NGRGnOE5j09sveEyy+C0yCgW6ncyC9lP/+8HFnV+yp9tF0nLXuRu0Im2mT8FD2bmRunF t9kI7xNI0R0w2YwyYBKhLDpe9uFv0JPyHG9GhoCd7pJnCck/QjRNvzkgRJrtXk5Rf3Zq cA6g== X-Forwarded-Encrypted: i=1; AJvYcCXMe6WYAX6eXZyUYH7VD1sXHwXozvEXAlAPvk/yMnkTYZWHctPjx5h5yT59zN9iz/OcSZ8=@vger.kernel.org X-Gm-Message-State: AOJu0YwO+ykgpkKZGcAaZ90ZdBjJF95VD3ih5oGeLVNh56C5geTT9s5A fi567DAIZ23TXckrhGhKrrbwQTm3JmVW9EejEnGvSiQ20/gQL6pe9b0B X-Gm-Gg: ASbGncstdHM42fhaKv2aNB0yr1/QL0ip3My4CkEc2+NcnllhkhJDY7HOSPyP4XHXoB+ t+ldVVnDgu16eNX4oSqVZmNKrykRqYYipN/+3NXO+HoRraUm4h6o8GWaNKISRRmeqPqgxHTy++J Kt2XEVYhrCg7qsELuQ0DSNSvYlcwOUaIlYsNY/E4kyIN4OJcazlnI44biqqnxVSWa2uJgisWIDN SkVKSzWcx+CvrG31R+eKXqWxfOGCjHiJwq7lSXkr/Bpjpr0aibp2RrwEkhbNTq/puxFEOPYBmdC bf5M5JL1kTciah3TxpwxC7Z5Si9j5hWdIqGk97O8t9f4ptqAZf0RdGm3ynjqL9XozJ2kJXDSSLH aaATuFHuw2tMZzuIrC+D9YMi1hQJW2IFZXM8WxuHrnNoJud3bxB2uJ5NCHjUcQNNJkReBlmfndo nAgtu97aBnF0SmcR/vGcUgvxz3GMuCDhL62aWsEg== X-Google-Smtp-Source: AGHT+IF5RfVfdoSR8epRBvO25wL7MVlPY9GHcuOfhGeoJp77hSo38v+4EuRhPqUWE1eLEn1PhRthJQ== X-Received: by 2002:a17:90b:1d0a:b0:32e:3552:8c79 with SMTP id 98e67ed59e1d1-343fa73faebmr6776084a91.29.1763193532599; Fri, 14 Nov 2025 23:58:52 -0800 (PST) Received: from lima-default ([103.246.102.164]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-343e07156absm11518522a91.5.2025.11.14.23.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 23:58:51 -0800 (PST) Date: Sat, 15 Nov 2025 18:58:41 +1100 From: Alessandro Decina To: Maciej Fijalkowski Cc: netdev@vger.kernel.org, "David S. Miller" , Alexei Starovoitov , Andrew Lunn , Daniel Borkmann , Eric Dumazet , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Paolo Abeni , Przemek Kitszel , Stanislav Fomichev , Tirthendu Sarkar , Tony Nguyen , bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v3 1/1] i40e: xsk: advance next_to_clean on status descriptors Message-ID: References: <20251113082438.54154-1-alessandro.d@gmail.com> <20251113082438.54154-2-alessandro.d@gmail.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Nov 14, 2025 at 02:01:14PM +0100, Maciej Fijalkowski wrote: > Woah, that's not what I had on mind...I meant to pull whole block that > takes care of FDIR descriptors onto common function. That logic should be > shared between normal Rx and ZC Rx. The only different action we need to > take is how we release the buffer. > > Could you try pulling whole i40e_rx_is_programming_status() branch onto > function within i40e_txrx_common.h and see how much of a work would it > take to have this as a common function? Just before I send another rev, you mean something like this? https://github.com/alessandrod/linux/commit/a6fa91d5b5d1cc283a2f1faa378085c44bda8b4a My rationale for i40e_inc_ntp_ntc was that _that_ is where the bug lies: letting ntp and ntc get out of sync. By introducing a function that forces you to _have_ to think about ntc and explicitly pass NULL if you don't want to sync it, bugs like this become less easy to introduce. That said I don't mind either way! Let me know if you want me to send v4 with the i40e_clean_programming_status() change. Ciao, Alessandro 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 030C6CEB2C7 for ; Sat, 15 Nov 2025 07:58:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9AD3F84114; Sat, 15 Nov 2025 07:58:56 +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 EqbW5GAsl3KI; Sat, 15 Nov 2025 07:58:55 +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 D64BE842F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1763193535; bh=MF0CNlB09dDx8CZgE5eg3pyjdHElMh021rKPfz1W410=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=V5dDjan/wrnasBIsjBwKvAJNjdVgTPCQxqOTB9IX6Vt1dmGfxzmI9jAGH8qPC7GXB jQ8u8VK/RrpEUxtvJ2bj15RUEIbu+PDuDOg0sNe4PM/AeuQwOmgO7SrZIIjftnhSEb Xl+zATwXdFH7rlHWfOPYEMUl4Nq1fcQVeEPPH8Y8am0TT8Rz9RvmWVlq3gCKEbByKa OFHQEGOutSI8q8X9Mt4ana45xp+ucI9I4RZ/+FLivtX+ccjRMjwA16SK0bwQho/I1K v2ZigLgh/5W3eVTBPq69JOSKyRyvks0tk4zvGVFxcWV/AiAuaOKWUnEAW5L5t8+9Vi n793p37amg84Q== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id D64BE842F7; Sat, 15 Nov 2025 07:58:55 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 287EBD5 for ; Sat, 15 Nov 2025 07:58:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 196B5842F7 for ; Sat, 15 Nov 2025 07:58:54 +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 ABEicRyDvj3e for ; Sat, 15 Nov 2025 07:58:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::1030; helo=mail-pj1-x1030.google.com; envelope-from=alessandro.d@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 511D084114 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 511D084114 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by smtp1.osuosl.org (Postfix) with ESMTPS id 511D084114 for ; Sat, 15 Nov 2025 07:58:53 +0000 (UTC) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-343806688c5so2613522a91.0 for ; Fri, 14 Nov 2025 23:58:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763193532; x=1763798332; 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=MF0CNlB09dDx8CZgE5eg3pyjdHElMh021rKPfz1W410=; b=rLG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google-Smtp-Source: AGHT+IF5RfVfdoSR8epRBvO25wL7MVlPY9GHcuOfhGeoJp77hSo38v+4EuRhPqUWE1eLEn1PhRthJQ== X-Received: by 2002:a17:90b:1d0a:b0:32e:3552:8c79 with SMTP id 98e67ed59e1d1-343fa73faebmr6776084a91.29.1763193532599; Fri, 14 Nov 2025 23:58:52 -0800 (PST) Received: from lima-default ([103.246.102.164]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-343e07156absm11518522a91.5.2025.11.14.23.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 23:58:51 -0800 (PST) Date: Sat, 15 Nov 2025 18:58:41 +1100 From: Alessandro Decina To: Maciej Fijalkowski Cc: netdev@vger.kernel.org, "David S. Miller" , Alexei Starovoitov , Andrew Lunn , Daniel Borkmann , Eric Dumazet , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Paolo Abeni , Przemek Kitszel , Stanislav Fomichev , Tirthendu Sarkar , Tony Nguyen , bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Message-ID: References: <20251113082438.54154-1-alessandro.d@gmail.com> <20251113082438.54154-2-alessandro.d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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=1763193532; x=1763798332; 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=MF0CNlB09dDx8CZgE5eg3pyjdHElMh021rKPfz1W410=; b=PB8Ke3IsxUHeJ3vWyOLvDXl5exPKAjZV7/Ru0Yu+IZlpc8A1pM+p/caKzcux79B/EN FyxRbLjVWOyproT1Y2hTn7CNjyRHi3uyuAryMj21GSFz7ngTNy7uC1axNVxEO+AugakS mv0QFpy8MeACpSd5Ab/JtbHuNZoUWNeJ1Q7XjnrnHn+knEymGPUKSC6F9xxdvH03XVBh G+lU64NumLAIIfPOjwIIjTgtPjIwP/tX/4vx2xqJLCGcRwb2qHSjm+sv0fZ56tIQeERq I9AKrOU6jDY1UDrCo8DjrdJsa8j63i+hrS5YNwYcA1OzcEVCJY9t5GGZ3lbkzRo0Wm2t NZFg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PB8Ke3Is Subject: Re: [Intel-wired-lan] [PATCH net v3 1/1] i40e: xsk: advance next_to_clean on status descriptors 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 Fri, Nov 14, 2025 at 02:01:14PM +0100, Maciej Fijalkowski wrote: > Woah, that's not what I had on mind...I meant to pull whole block that > takes care of FDIR descriptors onto common function. That logic should be > shared between normal Rx and ZC Rx. The only different action we need to > take is how we release the buffer. > > Could you try pulling whole i40e_rx_is_programming_status() branch onto > function within i40e_txrx_common.h and see how much of a work would it > take to have this as a common function? Just before I send another rev, you mean something like this? https://github.com/alessandrod/linux/commit/a6fa91d5b5d1cc283a2f1faa378085c44bda8b4a My rationale for i40e_inc_ntp_ntc was that _that_ is where the bug lies: letting ntp and ntc get out of sync. By introducing a function that forces you to _have_ to think about ntc and explicitly pass NULL if you don't want to sync it, bugs like this become less easy to introduce. That said I don't mind either way! Let me know if you want me to send v4 with the i40e_clean_programming_status() change. Ciao, Alessandro