From: Benjamin Poirier <bpoirier@suse.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Sathya Perla <sathya.perla@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Firo Yang <firo.yang@suse.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] be2net: Synchronize be_update_queues with dev_watchdog
Date: Fri, 19 Jul 2019 14:26:52 +0900 [thread overview]
Message-ID: <20190719052652.GA19727@f1> (raw)
In-Reply-To: <42269a37-0353-29c8-ce13-51cb2feeb9af@gmail.com>
On 2019/07/18 10:23, Florian Fainelli wrote:
> On 7/17/19 6:42 PM, Benjamin Poirier wrote:
> > As pointed out by Firo Yang, a netdev tx timeout may trigger just before an
> > ethtool set_channels operation is started. be_tx_timeout(), which dumps
> > some queue structures, is not written to run concurrently with
> > be_update_queues(), which frees/allocates those queues structures. Add some
> > synchronization between the two.
> >
> > Message-id: <CH2PR18MB31898E033896F9760D36BFF288C90@CH2PR18MB3189.namprd18.prod.outlook.com>
> > Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
>
> Would not moving the netif_tx_disable() in be_close() further up in the
> function resolve that problem as well?
Thanks for your review Florian,
No, netif_tx_disable() doesn't provide mutual exclusion with
dev_watchdog(). You can have:
cpu0 cpu1
\ dev_watchdog
\ netif_tx_lock
\ be_tx_timeout
...
\ be_set_channels
\ be_update_queues
\ netif_carrier_off
\ netif_tx_disable
...
\ be_clear_queues
still running in
be_tx_timeout(),
boom!
next prev parent reply other threads:[~2019-07-19 5:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 1:42 [PATCH net] be2net: Synchronize be_update_queues with dev_watchdog Benjamin Poirier
2019-07-18 17:23 ` Florian Fainelli
2019-07-19 5:26 ` Benjamin Poirier [this message]
2019-07-21 20:22 ` David Miller
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=20190719052652.GA19727@f1 \
--to=bpoirier@suse.com \
--cc=ajit.khaparde@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=firo.yang@suse.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=sathya.perla@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.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 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).