From: David Miller <davem@davemloft.net>
To: yevgenyp@mellanox.co.il
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 4/4] net/mlx4_en: Use atomic counter to decide when queue is full
Date: Fri, 22 Jun 2012 17:23:53 -0700 (PDT) [thread overview]
Message-ID: <20120622.172353.1092394608024377078.davem@davemloft.net> (raw)
In-Reply-To: <1340270358-19504-5-git-send-email-yevgenyp@mellanox.co.il>
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Thu, 21 Jun 2012 12:19:17 +0300
> The Transmit and transmit completion flows execute from different contexts,
> which are not synchronized. Hence naive reading the of consumer index might
> give wrong value by the time it is being used, That could lead to a state of transmit timeout.
> Fix that by using atomic variable to maintain that index.
>
> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
I'm not convinced. There is only one place that actually changes
the counter.
So it seems more like you have a missing memory barrier somewhere.
Other drivers do not need to use something as expansive as an atomic
variable for this and neither should you.
I'm not applying this patch series, you'll need to resubmit it in
it's entirety once you fix this patch.
next prev parent reply other threads:[~2012-06-23 0:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 9:19 [PATCH net 0/4] net/mlx4: Bug fixes for the mlx4_en driver Yevgeny Petrilin
2012-06-21 9:19 ` [PATCH 1/4] net/mlx4_en: Set correct port parameters during device initialization Yevgeny Petrilin
2012-06-21 9:19 ` [PATCH 2/4] net/mlx4: Use single completion vector after NOP failure Yevgeny Petrilin
2012-06-21 9:19 ` [PATCH 3/4] net/mlx4_en: Release QP range in free_resources Yevgeny Petrilin
2012-06-21 9:19 ` [PATCH 4/4] net/mlx4_en: Use atomic counter to decide when queue is full Yevgeny Petrilin
2012-06-23 0:23 ` David Miller [this message]
2012-06-25 9:00 ` David Laight
2012-06-25 10:12 ` Eric Dumazet
2012-06-25 13:06 ` Yevgeny Petrilin
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=20120622.172353.1092394608024377078.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yevgenyp@mellanox.co.il \
/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