All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 1/6] ice: initialize ring_stats->syncp
Date: Tue, 25 Nov 2025 10:15:58 +0000	[thread overview]
Message-ID: <aSWB3gsh4KpDZae9@horms.kernel.org> (raw)
In-Reply-To: <20251120-jk-refactor-queue-stats-v4-1-6e8b0cea75cc@intel.com>

On Thu, Nov 20, 2025 at 12:20:41PM -0800, Jacob Keller wrote:
> The u64_stats_sync structure is empty on 64-bit systems. However, on 32-bit
> systems it contains a seqcount_t which needs to be initialized. While the
> memory is zero-initialized, a lack of u64_stats_init means that lockdep
> won't get initialized properly. Fix this by adding u64_stats_init() calls
> to the rings just after allocation.
> 
> Fixes: 2b245cb29421 ("ice: Implement transmit and NAPI support")

I think that either this patch should be routed via net.  Or the Fixes tag
should be removed, and optionally something about commit 2b245cb29421
("ice: Implement transmit and NAPI support") included in the commit message
above the tags.

> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 44f3c2bab308..116a4f4ef91d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -400,7 +400,10 @@ static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi)
>  			if (!ring_stats)
>  				goto err_out;
>  
> +			u64_stats_init(&ring_stats->syncp);
> +
>  			WRITE_ONCE(tx_ring_stats[i], ring_stats);
> +

nit: perhaps adding this blank line is unintentional.

>  		}
>  
>  		ring->ring_stats = ring_stats;
> @@ -419,6 +422,8 @@ static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi)
>  			if (!ring_stats)
>  				goto err_out;
>  
> +			u64_stats_init(&ring_stats->syncp);
> +
>  			WRITE_ONCE(rx_ring_stats[i], ring_stats);
>  		}

The above comments not withstanding, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>


WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [PATCH iwl-next v4 1/6] ice: initialize ring_stats->syncp
Date: Tue, 25 Nov 2025 10:15:58 +0000	[thread overview]
Message-ID: <aSWB3gsh4KpDZae9@horms.kernel.org> (raw)
In-Reply-To: <20251120-jk-refactor-queue-stats-v4-1-6e8b0cea75cc@intel.com>

On Thu, Nov 20, 2025 at 12:20:41PM -0800, Jacob Keller wrote:
> The u64_stats_sync structure is empty on 64-bit systems. However, on 32-bit
> systems it contains a seqcount_t which needs to be initialized. While the
> memory is zero-initialized, a lack of u64_stats_init means that lockdep
> won't get initialized properly. Fix this by adding u64_stats_init() calls
> to the rings just after allocation.
> 
> Fixes: 2b245cb29421 ("ice: Implement transmit and NAPI support")

I think that either this patch should be routed via net.  Or the Fixes tag
should be removed, and optionally something about commit 2b245cb29421
("ice: Implement transmit and NAPI support") included in the commit message
above the tags.

> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 44f3c2bab308..116a4f4ef91d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -400,7 +400,10 @@ static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi)
>  			if (!ring_stats)
>  				goto err_out;
>  
> +			u64_stats_init(&ring_stats->syncp);
> +
>  			WRITE_ONCE(tx_ring_stats[i], ring_stats);
> +

nit: perhaps adding this blank line is unintentional.

>  		}
>  
>  		ring->ring_stats = ring_stats;
> @@ -419,6 +422,8 @@ static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi)
>  			if (!ring_stats)
>  				goto err_out;
>  
> +			u64_stats_init(&ring_stats->syncp);
> +
>  			WRITE_ONCE(rx_ring_stats[i], ring_stats);
>  		}

The above comments not withstanding, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-11-25 10:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 20:20 [Intel-wired-lan] [PATCH iwl-next v4 0/6] ice: properly use u64_stats API for all ring stats Jacob Keller
2025-11-20 20:20 ` Jacob Keller
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 1/6] ice: initialize ring_stats->syncp Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:15   ` Simon Horman [this message]
2025-11-25 10:15     ` Simon Horman
2025-12-03 22:23     ` [Intel-wired-lan] " Jacob Keller
2025-12-03 22:23       ` Jacob Keller
2025-12-04 12:13       ` [Intel-wired-lan] " Simon Horman
2025-12-04 12:13         ` Simon Horman
2025-12-18 10:50   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:50     ` Rinitha, SX
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 2/6] ice: pass pointer to ice_fetch_u64_stats_per_ring Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:16   ` [Intel-wired-lan] " Simon Horman
2025-11-25 10:16     ` Simon Horman
2025-12-03 22:12     ` [Intel-wired-lan] " Jacob Keller
2025-12-03 22:12       ` Jacob Keller
2025-12-18 10:50   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:50     ` Rinitha, SX
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 3/6] ice: remove ice_q_stats struct and use struct_group Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:16   ` [Intel-wired-lan] " Simon Horman
2025-11-25 10:16     ` Simon Horman
2025-12-03 22:14     ` [Intel-wired-lan] " Jacob Keller
2025-12-03 22:14       ` Jacob Keller
2025-12-18 10:50   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:50     ` Rinitha, SX
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 4/6] ice: use u64_stats API to access pkts/bytes in dim sample Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:17   ` [Intel-wired-lan] " Simon Horman
2025-11-25 10:17     ` Simon Horman
2025-12-18 10:51   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:51     ` Rinitha, SX
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 5/6] ice: shorten ring stat names and add accessors Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:17   ` [Intel-wired-lan] " Simon Horman
2025-11-25 10:17     ` Simon Horman
2025-12-03 22:17     ` [Intel-wired-lan] " Jacob Keller
2025-12-03 22:17       ` Jacob Keller
2025-12-18 10:51   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:51     ` Rinitha, SX
2025-11-20 20:20 ` [Intel-wired-lan] [PATCH iwl-next v4 6/6] ice: convert all ring stats to u64_stats_t Jacob Keller
2025-11-20 20:20   ` Jacob Keller
2025-11-25 10:17   ` [Intel-wired-lan] " Simon Horman
2025-11-25 10:17     ` Simon Horman
2025-12-03 22:21     ` [Intel-wired-lan] " Jacob Keller
2025-12-03 22:21       ` Jacob Keller
2025-12-18 10:51   ` [Intel-wired-lan] " Rinitha, SX
2025-12-18 10:51     ` Rinitha, SX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aSWB3gsh4KpDZae9@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.