Skip to content

Commit 0f4558a

Browse files
marmarekkuba-moo
authored andcommitted
Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"
This reverts commit 1f25657. The 'hotplug-status' node should not be removed as long as the vif device remains configured. Otherwise the xen-netback would wait for re-running the network script even if it was already called (in case of the frontent re-connecting). But also, it _should_ be removed when the vif device is destroyed (for example when unbinding the driver) - otherwise hotplug script would not configure the device whenever it re-appear. Moving removal of the 'hotplug-status' node was a workaround for nothing calling network script after xen-netback module is reloaded. But when vif interface is re-created (on xen-netback unbind/bind for example), the script should be called, regardless of who does that - currently this case is not handled by the toolstack, and requires manual script call. Keeping hotplug-status=connected to skip the call is wrong and leads to not configured interface. More discussion at https://lore.kernel.org/xen-devel/[email protected]/T/#u Signed-off-by: Marek Marczykowski-Górecki <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5facf49 commit 0f4558a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/xen-netback/xenbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ static void backend_disconnect(struct backend_info *be)
256256
unsigned int queue_index;
257257

258258
xen_unregister_watchers(vif);
259+
xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
259260
#ifdef CONFIG_DEBUG_FS
260261
xenvif_debugfs_delif(vif);
261262
#endif /* CONFIG_DEBUG_FS */
@@ -675,7 +676,6 @@ static void hotplug_status_changed(struct xenbus_watch *watch,
675676

676677
/* Not interested in this watch anymore. */
677678
unregister_hotplug_status_watch(be);
678-
xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
679679
}
680680
kfree(str);
681681
}

0 commit comments

Comments
 (0)