netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: alexanderduyck@fb.com, kuba@kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, suhui@nfschina.com,
	sanman.p211993@gmail.com, vadim.fedorenko@linux.dev,
	horms@kernel.org, kalesh-anakkur.purayil@broadcom.com,
	kernel-team@meta.com
Subject: Re: [PATCH net-next 2/5] eth: fbnic: add coverage for hw queue stats
Date: Wed, 9 Apr 2025 17:18:46 -0700	[thread overview]
Message-ID: <0a5fee34-5798-49f5-af3f-c6e56987da62@gmail.com> (raw)
In-Reply-To: <103301d3-4c38-428d-aa31-501654064183@redhat.com>

>>   
>> +	for (i = 0; i < fbd->max_num_queues; i++) {
>> +		/* Report packets dropped due to CQ/BDQ being full/empty */
>> +		rx_over += fbd->hw_stats.hw_q[i].rde_pkt_cq_drop.value;
>> +		rx_over += fbd->hw_stats.hw_q[i].rde_pkt_bdq_drop.value;
> 
> I'm possibly missing something, but AFAICS the above statements can be
> executed without any lock held. Another thread can concurrently call
> fbnic_get_hw_stats() leading to an inconsistent snapshot.
> 
> Should fbnic_get_hw_stats() store the values in a local(ly allocated)
> struct?
> 

Thanks for pointing it out. You are right. Let me fix and resubmit.

  reply	other threads:[~2025-04-10  0:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 17:21 [PATCH net-next 0/5] eth: fbnic: extend hardware stats coverage Mohsin Bashir
2025-04-07 17:21 ` [PATCH net-next 1/5] eth: fbnic: add locking support for hw stats Mohsin Bashir
2025-04-08 16:40   ` Simon Horman
2025-04-07 17:21 ` [PATCH net-next 2/5] eth: fbnic: add coverage for hw queue stats Mohsin Bashir
2025-04-08 16:40   ` Simon Horman
2025-04-09  7:32   ` Paolo Abeni
2025-04-10  0:18     ` Mohsin Bashir [this message]
2025-04-07 17:21 ` [PATCH net-next 3/5] eth: fbnic: add coverage for RXB stats Mohsin Bashir
2025-04-08 16:42   ` Simon Horman
2025-04-07 17:21 ` [PATCH net-next 4/5] eth: fbnic: add support for TMI stats Mohsin Bashir
2025-04-08 16:43   ` Simon Horman
2025-04-07 17:21 ` [PATCH net-next 5/5] eth: fbnic: add support for TTI HW stats Mohsin Bashir
2025-04-08 16:43   ` Simon Horman

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=0a5fee34-5798-49f5-af3f-c6e56987da62@gmail.com \
    --to=mohsin.bashr@gmail.com \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sanman.p211993@gmail.com \
    --cc=suhui@nfschina.com \
    --cc=vadim.fedorenko@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).