From: David Miller <davem@davemloft.net>
To: dmitry@broadcom.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net v3 2/6] bnx2x: prevent statistics update flow to act before statistics are started
Date: Wed, 17 Jul 2013 18:17:47 -0700 (PDT) [thread overview]
Message-ID: <20130717.181747.1265135119980557818.davem@davemloft.net> (raw)
In-Reply-To: <1374098440-27877-3-git-send-email-dmitry@broadcom.com>
From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Thu, 18 Jul 2013 01:00:36 +0300
> @@ -1830,6 +1830,7 @@ struct bnx2x {
>
> int fp_array_size;
> u32 dump_preset_idx;
> + atomic_t stats_started;
The only uses of those stats_started member are with atomic_set()
and atomic_read(), neither of which are atomic operations.
If there is existing locking which protects this value, then
a simple "bool stats_started;" would work.
Otherwise, you'll need to use an "unsigned long" set of atomic
bits and operations such as test_and_set_bit().
next prev parent reply other threads:[~2013-07-18 1:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 22:00 [PATCH net v3 0/6] bnx2x: fixes Dmitry Kravkov
2013-07-17 22:00 ` [PATCH net v3 1/6] bnx2x: properly initialize statistic counters Dmitry Kravkov
2013-07-18 1:16 ` David Miller
2013-07-17 22:00 ` [PATCH net v3 2/6] bnx2x: prevent statistics update flow to act before statistics are started Dmitry Kravkov
2013-07-18 1:17 ` David Miller [this message]
2013-07-17 22:00 ` [PATCH net v3 3/6] bnx2x: update fairness parameters following DCB negotiation Dmitry Kravkov
2013-07-17 22:00 ` [PATCH net v3 4/6] bnx2x: fix memory leak in VF Dmitry Kravkov
2013-07-17 22:00 ` [PATCH net v3 5/6] bnx2x: fix PTE write access error Dmitry Kravkov
2013-07-17 22:00 ` [PATCH net v3 6/6] bnx2x: prevent crash in shutdown flow with CNIC Dmitry Kravkov
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=20130717.181747.1265135119980557818.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=netdev@vger.kernel.org \
/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.