From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: netdev <netdev@vger.kernel.org>,
"devel\@linuxdriverproject.org" <devel@linuxdriverproject.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Haiyang Zhang <haiyangz@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>
Subject: Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal
Date: Thu, 11 Aug 2016 14:09:53 +0200 [thread overview]
Message-ID: <87lh038q26.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <CO2PR11MB008839DC3A61A4F211CC148F971E0@CO2PR11MB0088.namprd11.prod.outlook.com> (Yuval Mintz's message of "Thu, 11 Aug 2016 11:46:18 +0000")
Yuval Mintz <Yuval.Mintz@qlogic.com> writes:
>> +static void netvsc_inject_enable(struct net_device_context
>> +*net_device_ctx) {
>> + net_device_ctx->vf_inject = true;
>> +}
>> +
>> +static void netvsc_inject_disable(struct net_device_context
>> +*net_device_ctx) {
>> + net_device_ctx->vf_inject = false;
>> +
>> + /* Wait for currently active users to drain out. */
>> + while (atomic_read(&net_device_ctx->vf_use_cnt) != 0)
>> + udelay(50);
>> +}
>
> That was already the behavior before, but are you certain you
> want to unconditionally block without any possible timeout?
Yes, this is OK. After PATCH4 of this series there is only one place
which takes the vf_use_cnt (netvsc_recv_callback()) and it is an
interrupt handler, there are no sleepable operations there.
--
Vitaly
next prev parent reply other threads:[~2016-08-11 12:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 10:58 [PATCH net 0/4] hv_netvsc: fixes for VF removal path Vitaly Kuznetsov
2016-08-11 10:58 ` [PATCH net 1/4] hv_netvsc: don't lose VF information Vitaly Kuznetsov
2016-08-11 15:38 ` Haiyang Zhang
2016-08-11 10:58 ` [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal Vitaly Kuznetsov
2016-08-11 11:46 ` Yuval Mintz
2016-08-11 12:09 ` Vitaly Kuznetsov [this message]
2016-08-12 14:47 ` Stephen Hemminger
2016-08-11 15:38 ` Haiyang Zhang
2016-08-13 3:40 ` David Miller
2016-08-13 18:35 ` [RFC 1/2] netvsc: reference counting fix Stephen Hemminger
2016-08-13 18:38 ` [RFC 2/2] netvsc: use RCU for VF net device reference Stephen Hemminger
2016-08-15 10:06 ` Vitaly Kuznetsov
2016-08-15 4:31 ` [RFC 1/2] netvsc: reference counting fix David Miller
2016-08-11 10:58 ` [PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev Vitaly Kuznetsov
2016-08-11 15:38 ` Haiyang Zhang
2016-08-11 10:58 ` [PATCH net 4/4] hv_netvsc: avoid deadlocks between rtnl lock and netvsc_inject_disable() Vitaly Kuznetsov
2016-08-11 15:38 ` Haiyang Zhang
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=87lh038q26.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox