From: Stephen Hemminger <stephen@networkplumber.org>
To: Mohammed Gamal <mgamal@redhat.com>
Cc: netdev@vger.kernel.org, otubo@redhat.com, sthemmin@microsoft.com,
haiyangz@microsoft.com, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, vkuznets@redhat.com
Subject: Re: [RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts
Date: Tue, 23 Jan 2018 08:33:36 -0800 [thread overview]
Message-ID: <20180123083336.7e66881e@xeon-e3> (raw)
In-Reply-To: <1516700045-32142-1-git-send-email-mgamal@redhat.com>
On Tue, 23 Jan 2018 10:34:03 +0100
Mohammed Gamal <mgamal@redhat.com> wrote:
> Commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") introduced
> a regression that caused VMs not to shutdown after netvsc_device_remove() is
> called. This is caused by GPADL teardown sequence change, and while that was
> necessary to fix issues with Win2016 hosts, it did introduce a regression for
> earlier versions.
>
> Prior to commit 0cf737808 the call sequence in netvsc_device_remove() was as
> follows (as implemented in netvsc_destroy_buf()):
> 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message
> 2- Teardown receive buffer GPADL
> 3- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message
> 4- Teardown send buffer GPADL
> 5- Close vmbus
>
> This didn't work for WS2016 hosts. Commit 0cf737808 split netvsc_destroy_buf()
> into two functions and rearranged the order as follows
> 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message
> 2- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message
> 3- Close vmbus
> 4- Teardown receive buffer GPADL
> 5- Teardown send buffer GPADL
>
> That worked well for WS2016 hosts, but for WS2012 hosts it prevented VMs from
> shutting down.
>
> This patch series works around this problem. The first patch splits
> netvsc_revoke_buf() and netvsc_teardown_gpadl() into two finer grained
> functions for tearing down send and receive buffers individally. The second patch
> uses the finer grained functions to implement the teardown sequence according to
> the host's version. We keep the behavior introduced in 0cf737808ae7 for Windows
> 2016 hosts, while we re-introduce the old sequence for earlier verions.
>
> Mohammed Gamal (2):
> hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()
> hv_netvsc: Change GPADL teardown order according to Hyper-V version
>
> drivers/net/hyperv/netvsc.c | 50 +++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 42 insertions(+), 8 deletions(-)
>
The problem the original commit was trying to solve was actions in flight
in the receive buffer on shutdown. Having different ordering for each version of Hyper-V
seems unnecessary. There should be a way to get a stable sequence here.
Let me see if I can shake more information out of the Windows team to see what
the handshake on the other side is. Let's not apply this until then.
next prev parent reply other threads:[~2018-01-23 16:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 9:34 [RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts Mohammed Gamal
2018-01-23 9:34 ` [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() Mohammed Gamal
2018-01-30 19:29 ` Stephen Hemminger
2018-01-31 11:16 ` Mohammed Gamal
2018-01-31 23:01 ` Stephen Hemminger
2018-02-01 8:37 ` Mohammed Gamal
2018-02-01 22:34 ` Mohammed Gamal
2018-02-01 22:38 ` Stephen Hemminger
2018-01-23 9:34 ` [RFC PATCH 2/2] hv_netvsc: Change GPADL teardown order according to Hyper-V version Mohammed Gamal
2018-01-30 19:30 ` Stephen Hemminger
2018-01-23 15:43 ` [RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts Haiyang Zhang
2018-01-23 16:33 ` Stephen Hemminger [this message]
2018-01-26 18:10 ` Stephen Hemminger
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=20180123083336.7e66881e@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgamal@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=otubo@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.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).