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 0E323CFD377 for ; Tue, 25 Nov 2025 10:16:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C40886072D; Tue, 25 Nov 2025 10:16:24 +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 iMPWqfXFnp8t; Tue, 25 Nov 2025 10:16:24 +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 010F961018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1764065784; bh=iUhJd6NxAvevHlST64UaYTjD+yjmtlesUdlh7v+jLZA=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=urpziRgeZXN/sK8ArfWu//ktnkCJM9tH1SnJLQ5JirFuhOlpDs0D5iKfP0FuKI50P xVNwYQt06R9U4hxI6PBR6lnn9RgEeMD2ysGC+xjWk6f8JFGRuG/CjvLdNi4I3EBP0M WKo4Q6HWtT0kMehrmdKoScV+YbbC2Ag0nAWu360JeFFvqruibOz933UO3liyIgP7m0 Ko4GXhNooiOlFg22gRE3rX9T6XQxKofvgp35qyNAR/+6YcHYl6X9EC98IbW0E0e7Fd 6TcmZxUnjCKYtxM49AE+jvvc4F4UiCGC9xVfWvn7RD4LrNqzOJtUew4PgRfnUjbuoh U1eO3RbUd3xXw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 010F961018; Tue, 25 Nov 2025 10:16:24 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 40C33E4 for ; Tue, 25 Nov 2025 10:16:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 32A9182348 for ; Tue, 25 Nov 2025 10:16:23 +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 txTL2M1OoxJc for ; Tue, 25 Nov 2025 10:16:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 8A3AF81767 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A3AF81767 Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A3AF81767 for ; Tue, 25 Nov 2025 10:16:22 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E998C4065A; Tue, 25 Nov 2025 10:16:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BB26C4CEF1; Tue, 25 Nov 2025 10:16:20 +0000 (UTC) Date: Tue, 25 Nov 2025 10:16:18 +0000 From: Simon Horman To: Jacob Keller Cc: Aleksandr Loktionov , Alexander Lobakin , Tony Nguyen , Przemek Kitszel , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Message-ID: References: <20251120-jk-refactor-queue-stats-v4-0-6e8b0cea75cc@intel.com> <20251120-jk-refactor-queue-stats-v4-2-6e8b0cea75cc@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251120-jk-refactor-queue-stats-v4-2-6e8b0cea75cc@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764065781; bh=kUniJafciv27Xvx3LLc76+RtUt+Q5LB696ZK63CIuBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qxiMyivbYMU3Zko+9SnrDqE8PTPwt0wQ65N6xKMonvXm3aCfi3hO3/Gx7KhmvrbJs Mls7iEZ7PdcOrexJTKyU+OuamKLbsl5xtAudQVXN2tpy7JTVYgk/c40eIHUEUsTuMe ut5dtx9QXbEspGZEreIEv4phPKSUvyBAuxFErupzQPgQf6TOPQd4O0X0smKsbHe60+ Uvl8bnGZUTkSDcwDA/4IcM/hN6IUd3/nUgjGIYrnHzru5t/IsxvEzUE4LOUIXQQA+A cocHyUOxjc9O8hDDQTioomwFQvLZT7HNt+95VZeXQ9k6C+ynKrZTA1c/MogNNn1uBY /yZ/wysZDFyqg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qxiMyivb Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 2/6] ice: pass pointer to ice_fetch_u64_stats_per_ring 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 Thu, Nov 20, 2025 at 12:20:42PM -0800, Jacob Keller wrote: > The ice_fetch_u64_stats_per_ring function takes a pointer to the syncp from > the ring stats to synchronize reading of the packet stats. It also takes a > *copy* of the ice_q_stats fields instead of a pointer to the stats. This > completely defeats the point of using the u64_stats API. We pass the stats > by value, so they are static at the point of reading within the > u64_stats_fetch_retry loop. > > Simplify the function to take a pointer to the ice_ring_stats instead of > two separate parameters. Additionally, since we never call this outside of > ice_main.c, make it a static function. > > Reviewed-by: Aleksandr Loktionov > Signed-off-by: Jacob Keller The *copy* was certainly working against us here. But TBH, C syntax led me to read the code more than once before seeing it. Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E851CA4E for ; Tue, 25 Nov 2025 10:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764065782; cv=none; b=XeZw2ot5dALhacBaVTEFHbavnCApol4sB/zH0506N8xVeuFd0j9WqKXLTyzrcIFx4TxZvUW/Pjb8kcnI1/zZJ61tt86hzg6iGa127WLuPkbsRQ+0Rl+mLbEc7bRRAXfkJvlM8bT+cMVakNa+TcjQTP//Z859SO0sVhn72+EPrf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764065782; c=relaxed/simple; bh=kUniJafciv27Xvx3LLc76+RtUt+Q5LB696ZK63CIuBQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EKzIcLiBJPgjWtj8rxIe8vyhdWLxt5vy4gh0YHvBuYyrbkgmr40DAv7twA6IuwAqcvSQviUi6qM10TcalPXX6tkxEok/B/FV4+7caysqoLPWt+4BO8NpZxPDk6oqUrL/Iun8DmyU/JC4r2u+wvxI8ox/BfrI/sOYRfmJcYvWOrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qxiMyivb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qxiMyivb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BB26C4CEF1; Tue, 25 Nov 2025 10:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764065781; bh=kUniJafciv27Xvx3LLc76+RtUt+Q5LB696ZK63CIuBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qxiMyivbYMU3Zko+9SnrDqE8PTPwt0wQ65N6xKMonvXm3aCfi3hO3/Gx7KhmvrbJs Mls7iEZ7PdcOrexJTKyU+OuamKLbsl5xtAudQVXN2tpy7JTVYgk/c40eIHUEUsTuMe ut5dtx9QXbEspGZEreIEv4phPKSUvyBAuxFErupzQPgQf6TOPQd4O0X0smKsbHe60+ Uvl8bnGZUTkSDcwDA/4IcM/hN6IUd3/nUgjGIYrnHzru5t/IsxvEzUE4LOUIXQQA+A cocHyUOxjc9O8hDDQTioomwFQvLZT7HNt+95VZeXQ9k6C+ynKrZTA1c/MogNNn1uBY /yZ/wysZDFyqg== Date: Tue, 25 Nov 2025 10:16:18 +0000 From: Simon Horman To: Jacob Keller Cc: Aleksandr Loktionov , Alexander Lobakin , Tony Nguyen , Przemek Kitszel , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: Re: [PATCH iwl-next v4 2/6] ice: pass pointer to ice_fetch_u64_stats_per_ring Message-ID: References: <20251120-jk-refactor-queue-stats-v4-0-6e8b0cea75cc@intel.com> <20251120-jk-refactor-queue-stats-v4-2-6e8b0cea75cc@intel.com> Precedence: bulk X-Mailing-List: netdev@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: <20251120-jk-refactor-queue-stats-v4-2-6e8b0cea75cc@intel.com> On Thu, Nov 20, 2025 at 12:20:42PM -0800, Jacob Keller wrote: > The ice_fetch_u64_stats_per_ring function takes a pointer to the syncp from > the ring stats to synchronize reading of the packet stats. It also takes a > *copy* of the ice_q_stats fields instead of a pointer to the stats. This > completely defeats the point of using the u64_stats API. We pass the stats > by value, so they are static at the point of reading within the > u64_stats_fetch_retry loop. > > Simplify the function to take a pointer to the ice_ring_stats instead of > two separate parameters. Additionally, since we never call this outside of > ice_main.c, make it a static function. > > Reviewed-by: Aleksandr Loktionov > Signed-off-by: Jacob Keller The *copy* was certainly working against us here. But TBH, C syntax led me to read the code more than once before seeing it. Reviewed-by: Simon Horman