From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 0FAF42EA15C for ; Tue, 18 Nov 2025 06:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763447847; cv=none; b=XMg8DE3ahpyQIAb15RtDLmugaPE29Tngw0taUVdVmc+2qrC1oNxjB6jElo+nZqfrmMZA05skojs+ygQPFgQgk38fZB4QJsSrCuWG8fyqBS0iicU8PwelJV3RgcaQRioaTA4vz4z72W+r8AiodbqONAp/OL5yov/NFT4QhoGs+ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763447847; c=relaxed/simple; bh=RY1GxG6MBqh6NCveOLSrf90a2ONzNoxjMM6LXqGyRiY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DuWT8jjEOr3b2pryemrBHu9M99M879wJk7tVUza1yZ8j7/jHkZsey/kGGdUvwt2CGxqbSWM1MZueWRZedjnmsVgCRcAWDCb4gKfiRmFaPsbdwv7tTbsKEJbSlJ0moLUdz0mKrrLeD3MgyCfch8zgU4UAmkszv4KToRU5thHcod0= 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=Mc/ODZev; arc=none smtp.client-ip=209.85.210.172 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="Mc/ODZev" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7bf0ad0cb87so2067653b3a.2 for ; Mon, 17 Nov 2025 22:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763447845; x=1764052645; 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=rKXeu+SiVQVquAoWhSPWf0RcZCWL+HzPZuMMI7btDH4=; b=Mc/ODZeveQVtJhS+j7s+6Dkxi3/KBiwE1B3HKZii02X+XfUCpUZqcwzspsnzgbv8x/ st1F21oraNhSAnB+XmH3F07a/c/5McEGpce5+dIQ5EcajwiS5KJ3fMT0riZg0I7rLZAi tiMNurTSGAqeVdsqzCtPk4EBB8CtB5hzp6BJdoWrNyXLnX9Jxmqs+OKVPrGWzF2PHcQT 3G9LYlnC8AL1kYvryAR4tkY0xarlGsCGrO6z+zOQJdI/1cO3myXytD93xB57xUnCyNsA 0ZZz+f62NK7Mf+3G2Ds6APEAn8u05qH5+mPmpWe1aRyJ/5OriCMoYQpdS54iPVU4csyy AI2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763447845; x=1764052645; 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=rKXeu+SiVQVquAoWhSPWf0RcZCWL+HzPZuMMI7btDH4=; b=Jhn9d4zKrRFrWY4QFbhq4kxip6ww04z4afbD7N8Gaz8sZfMJg7cDUg9Ox9YBApuCbg 8g1IzsoY83LaRb5JguFw+XiS4BuscMeU7LsHhBm8sMJ9G7rgWocQ5w2XUJItbF5T8EpH hRZJAPPtJKYNinjqiW59jRPxZZbnz4aRSPSJOm1Bb+MU+geKWfUR67Egx8V99vtX8AFP CbGwSmJWL9gsKrKJKpoyA/tA+wd/7/qYNermy8qDNV9zpm9pN6EpmZoaAPs8GrEpVfPs WwmW1/IflHa9/yrT8sybflnGaeQ2zJnECz2qYOxl+oeb2rRp3OUtTQnFUXVGANtyoEHt bupg== X-Forwarded-Encrypted: i=1; AJvYcCXJ1eREocqaRi8JfvX4zrd+TFzA/qHZYlr9PAd2yj5KD3TtKFrOvFyFhwfczTUqpan6Q5s=@vger.kernel.org X-Gm-Message-State: AOJu0YyyjGcMtavsBLlsGP7+zcI7YKyrdKOdp5vWwSNmOjHXrinA3o8s 0fyiKthI5lfSFdd8LSF8QltP+ad5rsDNmNRbMsLSNRGnK5FJXlUll4yp X-Gm-Gg: ASbGncuqzqbAGH8JPeEwa+ytGr2QWUCZ/CGBd+eBhgTxyojaWcW8BqfAI6mnhmiwRbm q15slg2xMwIHGyq/hiQF23erw+v39oA/3mqqLFN7hPgxMrveWkAjfdKliYbqE/RwDVTx1+uy7SM Gz2P9xVkEBet/NwmgWdnZn3REUo5bkA+pIBX9Fbroje33x/JJBVUMlmyjpg29GCHmQl/3BkiJrC zjzYeEU4koh9Y2PtCJABOVdwQo05FPDg+4XglAjkVErgEULYdfZ24E+HQosnjrhUL68u2XLiJUB c+ra57xXnTYVJobDNFV1GAOHOB2fpNvgTj7Qo2XAH/ks6vjObb2MobgUansVoCFhPHQg8HlNHqP BbJDvvvMWxYvjFW1r00WfVkQpKAQe2c15UQ6WkxuebZizevvH8Jvh5o6L25i6PdFJRZix3fZ5J5 5AA7SC/4ZJAQW6+et8jIZvp5XJi5Q2hSrhJQQ7Ng+fdNZnrU59 X-Google-Smtp-Source: AGHT+IHXALiriWwJLx7SmcMxCfVQY5rBvQyEVgIoRqwO0R8z37/xvVCwrwjnmjxza5ZezAx2KyQwnw== X-Received: by 2002:a05:6a00:2405:b0:7a2:8d06:fa0e with SMTP id d2e1a72fcca58-7ba3bb8ed5bmr18001534b3a.26.1763447845354; Mon, 17 Nov 2025 22:37:25 -0800 (PST) Received: from lima-default ([103.246.102.164]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b9251c99aasm15364262b3a.28.2025.11.17.22.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Nov 2025 22:37:24 -0800 (PST) Date: Tue, 18 Nov 2025 17:37:14 +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 Mon, Nov 17, 2025 at 05:37:49PM +0100, Maciej Fijalkowski wrote: > This revision is much more clear to me. Only thing that might be bothering > someone is doubled i40e_rx_bi() call in i40e_get_rx_buffer(). Not sure if > we can do about it though as we need to use ntp from before potential > increment. > > ...maybe pass rx_buffer to i40e_get_rx_buffer() ? Surely the compiler isn't going to actually reload here, but yeah not great code wise. How about I pass it the buffer and rename to i40e_prepare_rx_buffer to better match what's happening now? 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 0E16ECEBF93 for ; Tue, 18 Nov 2025 06:37:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B02EA82294; Tue, 18 Nov 2025 06:37:29 +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 85COvCOGCfgM; Tue, 18 Nov 2025 06:37:28 +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 0491C821EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1763447848; bh=rKXeu+SiVQVquAoWhSPWf0RcZCWL+HzPZuMMI7btDH4=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qLOKcYLEneoupvMy3ZrlEQdYQuILCu3Dx0prLAucf64c5sGipJPSw3a+z1399t0cr gNQQttrxgdmHOmVpNSduNfh3SWt+Wr6HDcHOvm3rLvRgIjxPrLLcqaPyaMP8TZmnKy btnm+lO1DaJHglaonqqNOpm42T86x6aNVN3/6Yf9jqBX4yM+OFh45/o+C1OyNpV0Ly 8jamvm8d0/zUW/NkyQzyLYwkKvZGSYakbi8/nwLxJsz2518l1kBJGiTA6/sQ0qVgDN U/fm8dfQraFsLvoEBc2g1Bwcf7MEcnEARz1lkcrORdtBh/Ef3Sj1xeV/T5FqbuUcqT y2eh9INdSGk1g== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 0491C821EE; Tue, 18 Nov 2025 06:37:28 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id 0AC1CD5 for ; Tue, 18 Nov 2025 06:37:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E744F606DF for ; Tue, 18 Nov 2025 06:37:26 +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 nqja2qxYrQx5 for ; Tue, 18 Nov 2025 06:37:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::42a; helo=mail-pf1-x42a.google.com; envelope-from=alessandro.d@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 265286065C DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 265286065C Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by smtp3.osuosl.org (Postfix) with ESMTPS id 265286065C for ; Tue, 18 Nov 2025 06:37:25 +0000 (UTC) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7b852bb31d9so5756885b3a.0 for ; Mon, 17 Nov 2025 22:37:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763447845; x=1764052645; 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=rKXeu+SiVQVquAoWhSPWf0RcZCWL+HzPZuMMI7btDH4=; b=PEuZwF0FOYryrHTbevI6F7B8abtIvOJ6E3VlkgWvrF6G5/S0ksYVeMh3Lj2iEE4prz HsU+n8kf938JPrShGy1dzxUuE3EAi22PSZyT9mPidUmbkgqp2GJWlVS8t7rzTsqWM0VK fMjE7TsS7EsfUF4GLmWjp4SDCpaaA8cM311eFHBg3t5sXmoAfikk0nNilG7dPUUIXHFC 5of36lPciqmf7GRiL/JZchhMLSJYLsOIbLKeHoFXsNQhwiqZxj7LvtohQu/tW3pQXyVV VVDZG5H41D5Oqv0P5imD+v2ASCZdm2L+3AGBqc0WpAb/K9VvHCwFkZCsAPzHkP38JhgN 0Khg== X-Forwarded-Encrypted: i=1; AJvYcCXBbgoNMQb7daifPqs/816+cUyDHl9RDLzW3t2aUsfrfBx1bDy7HhEWTGDoUcUTNqjEyvFR7OSWMA46gFtJAqQ=@lists.osuosl.org X-Gm-Message-State: AOJu0YybwayugPq80yPeEsZVwICFwUUJfe/MfBme6uG/ZGfcA3JCHS3d umFCcoFpq8E2eMnjpNCrdIuaTEWrLBnUwkb7BZtudtpuOfE4lloxi1o+ X-Gm-Gg: ASbGncs/RHfmFkXO/JoUiKgk48tv65TW511yPWQfEOOVmermHnA24scf7S/8QJO9q+I UrpjkkDSAqYTrC6HTbZSnXRqxoYbCbX/WkB8x/g09aOcG7YKDHsrzXC+SHrJed3YQXN1Ku5/wIV KSPAO93tM6PtOD446E7Jb68q8WEPdp5+p075lTqtWnwaf24XcUSBXLDrlUBaUELqhCvszEjRTXE zYTwInj77YSyW4A/B0hCjFtxX54pRmEJINZuG9w8geLwyQSs9Sv+enQJPMb+WDH+RF5rV2I3Skd QV670TUM3lgLpvdJczz7YUp02KAuxNx0WypcOU988l3W8DN0yRBj/hHaxgnyKhgXtbDXc+boTzH e1lLBndjj7hQxqFpmGM9EFKVR1girJyIFhGdfpfClwdAxoiX1ARMxTHX7BU0Anldnb1CPmCdjWp Lwjv3HAP4leFQgsYez1citoH8BPbRWgWYFkaWNUv2nsNBsOX9K X-Google-Smtp-Source: AGHT+IHXALiriWwJLx7SmcMxCfVQY5rBvQyEVgIoRqwO0R8z37/xvVCwrwjnmjxza5ZezAx2KyQwnw== X-Received: by 2002:a05:6a00:2405:b0:7a2:8d06:fa0e with SMTP id d2e1a72fcca58-7ba3bb8ed5bmr18001534b3a.26.1763447845354; Mon, 17 Nov 2025 22:37:25 -0800 (PST) Received: from lima-default ([103.246.102.164]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b9251c99aasm15364262b3a.28.2025.11.17.22.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Nov 2025 22:37:24 -0800 (PST) Date: Tue, 18 Nov 2025 17:37:14 +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=1763447845; x=1764052645; 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=rKXeu+SiVQVquAoWhSPWf0RcZCWL+HzPZuMMI7btDH4=; b=Jz5QuwyetCN1HnsWkXsMfvY7WBUmYj7OPz/dIBUTu1nBNQ5rOdrVpyPDmq24ier2SN jPrGF2WDCOWjoX8vRQTqkoGyZWVc4RKD2a4HrLVB25f3297dUNAUt9Zi2fOPJDN5f5sk FQaVdAY6ZdHke2NwUm9b5XNCEn+0NLHm3aghKLQPYlbtr5UuMVTrEWGG0jOIXeqagFSJ dXdwDjIJC5KZYU/hqpIT55L79BmU7WKbu1L08M0SkoSVear4A1MJ88XhbIQH0ZqxX/Xq Zm0ZFVSSF0qfPzLQxccDb0dHkmubLZJhKcwpJGiHkAV1E8x/chxCvWdUUyR9V7t74oXp t4YQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp3.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=Jz5Quwye 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 Mon, Nov 17, 2025 at 05:37:49PM +0100, Maciej Fijalkowski wrote: > This revision is much more clear to me. Only thing that might be bothering > someone is doubled i40e_rx_bi() call in i40e_get_rx_buffer(). Not sure if > we can do about it though as we need to use ntp from before potential > increment. > > ...maybe pass rx_buffer to i40e_get_rx_buffer() ? Surely the compiler isn't going to actually reload here, but yeah not great code wise. How about I pass it the buffer and rename to i40e_prepare_rx_buffer to better match what's happening now?