Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3602599pxb; Mon, 21 Feb 2022 01:32:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPzQbVcfvXjY03ki21Vkx29JQbiaHWaV53Jfu0eUONH9EwfYXrw302H7CYJDvP8/OKDwig X-Received: by 2002:a17:90b:ecf:b0:1bc:232d:a87d with SMTP id gz15-20020a17090b0ecf00b001bc232da87dmr6656582pjb.27.1645435927396; Mon, 21 Feb 2022 01:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645435927; cv=none; d=google.com; s=arc-20160816; b=zBeMxr/BVS28/6quZJhSlZj/g+FqpeN8rZZs5QvgXpWQFLs7GFhAWyXJLCpiZQ+ks4 d1a/xDgNfpUUH4Boo0707Unf2xG6bNlEG35zk4dn+zgSfCKHCgBWXntjek6fVm7d+Baq Y4cQ/M+NOHioTC369jTNHoy1DPbgqR5BJDUVWA3REQac5s1tlca3fnmbVubZc692xBC7 pZtYDBHarm59DKuStj1nEHPwsTKbG+jEJtRPy0qGIakdGMyBF5ybKRWPsk/krIJeJQFi Nz/n1KGoqOCcP/Y8xxQdaL/kdp2c1HrJl2dyzQlnFbklLO1/s3ouen/9RGQMQGMuNUZa EALA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=4Ftth8jIR9thK7FgELPaAjI8cJu47K8WHyuMsUo9B1g=; b=r9x3R9xMQu0YOCthx1WK3Y1j3CLNz5dTAn3eZYXpBwtCHyZA0LAQbEfxpEK7JhcXdn n/DtkwyuUPpM8G2UsiNVX03D5AMrCYvofIT4zg5csinLLOw6bhQz/6X8QyALFc+YhlKL d3UBzom69wKgwtZ5Y9sueqtGpsbuOmIBk6t9dRcxpb2V/rnScjzD+zutUK1pdZVqlokG WOw101l37+vLNexN7oWCmC+Mtp36LGz8ftVg1rGV/vuwN/bMp7CVXFr4iFDwzGkIkPrm 09lhCYqJH95Pf3ap5pEWhLOcksmX4a2msfuCHbStqsgPWDnDajPrkJ2POfXkzyAjXj0o QAkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=FdoiMWvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e27si17226773pgm.286.2022.02.21.01.31.53; Mon, 21 Feb 2022 01:32:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=FdoiMWvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344369AbiBUDnI (ORCPT + 99 others); Sun, 20 Feb 2022 22:43:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232812AbiBUDnG (ORCPT ); Sun, 20 Feb 2022 22:43:06 -0500 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCA073C70E; Sun, 20 Feb 2022 19:42:43 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id CAB523200258; Sun, 20 Feb 2022 22:42:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 20 Feb 2022 22:42:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=4Ftth8 jIR9thK7FgELPaAjI8cJu47K8WHyuMsUo9B1g=; b=FdoiMWvU0BfcBuxRwZU+21 YkXa3ru8QvLBJzmL/AR2f3zSpdyN/RArycC556yS3nEpHXST4J6m2eSpv6RsAfae HVDZ0tHyCtBHkF+ERY5MvQNm5iP2mhYt2LyddO0yYU4fvStJbC0IIM14aXMD33Fd gDIUNKDMi398RCkvE7HHV8/5mkBXoCY3qYqSkxKuCmIYRhjFNNNGujLo6iCqohEo jrcLXcM12/4ynXvJxVvUm8dAIn1OnnbIzU1WSBn6s6cGnMvOO95hNqMNJKpHSPZj kYpA/hauWPYnxQm0ebleiBxI0kcS2gkEmB3L2nA0ujfpiws/nhx5TNz9yHNa5flQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeehgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofggtghogfesthekredtredtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhephefhfeet ueelvddvtedttdevieeluedtvedtfeejieelhedutdeuheduieejgfegnecuffhomhgrih hnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrg gsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Feb 2022 22:42:38 -0500 (EST) From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , stable@vger.kernel.org, Michael Brown , Wei Liu , Paul Durrant , "David S. Miller" , Jakub Kicinski , xen-devel@lists.xenproject.org (moderated list:XEN NETWORK BACKEND DRIVER), netdev@vger.kernel.org (open list:XEN NETWORK BACKEND DRIVER) Subject: [PATCH 1/2] Revert "xen-netback: remove 'hotplug-status' once it has served its purpose" Date: Mon, 21 Feb 2022 04:42:12 +0100 Message-Id: <20220221034214.2237097-1-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Invisible Things Lab Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 1f2565780e9b7218cf92c7630130e82dcc0fe9c2. 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/afedd7cb-a291-e773-8b0d-4db9b291fa98@ipxe.org/T/#u Cc: stable@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- Cc: Michael Brown --- 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 d24b7a7993aa..ce0f3035bee8 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -256,6 +256,7 @@ static void backend_disconnect(struct backend_info *be) unsigned int queue_index; xen_unregister_watchers(vif); + xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status"); #ifdef CONFIG_DEBUG_FS xenvif_debugfs_delif(vif); #endif /* CONFIG_DEBUG_FS */ @@ -675,7 +676,6 @@ static void hotplug_status_changed(struct xenbus_watch *watch, /* Not interested in this watch anymore. */ unregister_hotplug_status_watch(be); - xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status"); } kfree(str); } -- 2.31.1