All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: <netdev@vger.kernel.org>, <xen-devel@lists.xen.org>,
	David Vrabel <david.vrabel@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH net-next 2/2] xen-netback: handle frontends that fail to transition through Closing
Date: Fri, 20 Sep 2013 14:34:48 +0100	[thread overview]
Message-ID: <20130920133448.GC457@zion.uk.xensource.com> (raw)
In-Reply-To: <1379681791-21842-3-git-send-email-paul.durrant@citrix.com>

On Fri, Sep 20, 2013 at 01:56:31PM +0100, Paul Durrant wrote:
> Some old Windows frontends fail to transition through the xenbus Closing
> state and move directly from Connected to Closed. Handle this case properly.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: David Vrabel <david.vrabel@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> ---
>  drivers/net/xen-netback/xenbus.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
> index a53782e..bcaa25b 100644
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -265,6 +265,8 @@ static void frontend_changed(struct xenbus_device *dev,
>  		break;
>  
>  	case XenbusStateClosed:
> +		if (dev->state == XenbusStateConnected)
> +			disconnect_backend(dev);

Could you please add a comment above this change stating that this is a
workaround for some old frontend that we cannot fix / upgrade.

We would still like to later frontend goes through the normal connected
-> closing -> closed path.

Wei.

>  		xenbus_switch_state(dev, XenbusStateClosed);
>  		if (xenbus_dev_is_online(dev))
>  			break;
> -- 
> 1.7.10.4

  reply	other threads:[~2013-09-20 13:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 12:56 [PATCH net-next 0/2] xen-netback: windows frontend compatibility fixes Paul Durrant
2013-09-20 12:56 ` [PATCH net-next 1/2] xen-netback: add a vif-is-connected flag Paul Durrant
2013-09-20 13:31   ` Wei Liu
2013-09-20 14:28     ` David Vrabel
2013-09-20 14:28     ` David Vrabel
2013-09-20 15:02       ` Paul Durrant
2013-09-20 15:02       ` Paul Durrant
2013-09-20 13:31   ` Wei Liu
2013-09-20 12:56 ` Paul Durrant
2013-09-20 12:56 ` [PATCH net-next 2/2] xen-netback: handle frontends that fail to transition through Closing Paul Durrant
2013-09-20 12:56 ` Paul Durrant
2013-09-20 13:34   ` Wei Liu [this message]
2013-09-20 13:38     ` Paul Durrant
2013-09-20 13:38     ` Paul Durrant
2013-09-20 13:38     ` David Vrabel
2013-09-20 13:38     ` David Vrabel
2013-09-20 13:40       ` Paul Durrant
2013-09-20 13:40       ` Paul Durrant
2013-09-20 13:48       ` Wei Liu
2013-09-20 13:48       ` Wei Liu
2013-09-20 13:34   ` Wei Liu

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=20130920133448.GC457@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xen.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.