* [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
@ 2022-09-01 11:55 Paul Durrant
2022-09-03 9:40 ` patchwork-bot+netdevbpf
2022-09-14 9:45 ` Juergen Gross
0 siblings, 2 replies; 3+ messages in thread
From: Paul Durrant @ 2022-09-01 11:55 UTC (permalink / raw)
To: netdev, xen-devel
Cc: Paul Durrant, Wei Liu, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Marek Marczykowski-Górecki
Removing 'hotplug-status' in backend_disconnected() means that it will be
removed even in the case that the frontend unilaterally disconnects (which
it is free to do at any time). The consequence of this is that, when the
frontend attempts to re-connect, the backend gets stuck in 'InitWait'
rather than moving straight to 'Connected' (which it can do because the
hotplug script has already run).
Instead, the 'hotplug-status' mode should be removed in netback_remove()
i.e. when the vif really is going away.
Fixes: 0f4558ae9187 ("Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"")
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
---
Cc: Wei Liu <wei.liu@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
---
drivers/net/xen-netback/xenbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 990360d75cb6..e85b3c5d4acc 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -256,7 +256,6 @@ static void backend_disconnect(struct backend_info *be)
unsigned int queue_index;
xen_unregister_watchers(vif);
- xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
#ifdef CONFIG_DEBUG_FS
xenvif_debugfs_delif(vif);
#endif /* CONFIG_DEBUG_FS */
@@ -984,6 +983,7 @@ static int netback_remove(struct xenbus_device *dev)
struct backend_info *be = dev_get_drvdata(&dev->dev);
unregister_hotplug_status_watch(be);
+ xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status");
if (be->vif) {
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
backend_disconnect(be);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
2022-09-01 11:55 [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed Paul Durrant
@ 2022-09-03 9:40 ` patchwork-bot+netdevbpf
2022-09-14 9:45 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-03 9:40 UTC (permalink / raw)
To: Paul Durrant
Cc: netdev, xen-devel, wei.liu, davem, edumazet, kuba, pabeni,
marmarek
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 1 Sep 2022 12:55:54 +0100 you wrote:
> Removing 'hotplug-status' in backend_disconnected() means that it will be
> removed even in the case that the frontend unilaterally disconnects (which
> it is free to do at any time). The consequence of this is that, when the
> frontend attempts to re-connect, the backend gets stuck in 'InitWait'
> rather than moving straight to 'Connected' (which it can do because the
> hotplug script has already run).
> Instead, the 'hotplug-status' mode should be removed in netback_remove()
> i.e. when the vif really is going away.
>
> [...]
Here is the summary with links:
- [net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
https://git.kernel.org/netdev/net/c/c55f34b6aec2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
2022-09-01 11:55 [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed Paul Durrant
2022-09-03 9:40 ` patchwork-bot+netdevbpf
@ 2022-09-14 9:45 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2022-09-14 9:45 UTC (permalink / raw)
To: Paul Durrant, netdev, xen-devel
Cc: Wei Liu, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Marek Marczykowski-Górecki
[-- Attachment #1.1.1: Type: text/plain, Size: 796 bytes --]
On 01.09.22 13:55, Paul Durrant wrote:
> Removing 'hotplug-status' in backend_disconnected() means that it will be
> removed even in the case that the frontend unilaterally disconnects (which
> it is free to do at any time). The consequence of this is that, when the
> frontend attempts to re-connect, the backend gets stuck in 'InitWait'
> rather than moving straight to 'Connected' (which it can do because the
> hotplug script has already run).
> Instead, the 'hotplug-status' mode should be removed in netback_remove()
> i.e. when the vif really is going away.
>
> Fixes: 0f4558ae9187 ("Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"")
> Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-14 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-01 11:55 [PATCH net] xen-netback: only remove 'hotplug-status' when the vif is actually destroyed Paul Durrant
2022-09-03 9:40 ` patchwork-bot+netdevbpf
2022-09-14 9:45 ` Juergen Gross
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).