Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4295545pxb; Mon, 21 Feb 2022 17:12:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLERWkQ73WlKVRVLP1dIy3iZECk4Q0uz39SkncYbsKUHCphi1Mcva+AL1VaDwxVYfoVkCU X-Received: by 2002:a63:1a52:0:b0:36c:6f66:ea54 with SMTP id a18-20020a631a52000000b0036c6f66ea54mr17898814pgm.446.1645492352987; Mon, 21 Feb 2022 17:12:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645492352; cv=none; d=google.com; s=arc-20160816; b=kW4AUsSKmp9kZCPAzydJdVr1V2aUyfmEQXU7zfIxUmUGHTFGTUfeKIsg//d27Jzxj7 M7adYk+j4wiULveGYQaNIBuHYl2TdkMEwR4IfktMhz1oml+yciJkBm12zMGOeOAPkoci sAMv4ad+ftNa28Q1yo7tNHXdBdm955aBGJqUZjEZ9+tfGYhwFp7sxqcNt56upuD3BysX dstKiZwW577rN4eJ80rgJ+ghZLPWWiuujJuAP7rW3/7UI47xKhdrGkYRjguTLQg0MH7C +jm7JP81j/EpIS4DozLbiH68Fgt2xrjzw/Qiv5JaEGctg5R4GS4gmUPsLiCKcZlxaMtE kZVQ== 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=V9Y0aMUYHoxDUjucoxLUoyDrdDFBnSbiTwU4Pu0uuFw=; b=ieTv4yjzW4ZMghuAU3xE1/3EOEO9WlNIerAuVbBu0w5j3Npf2B9cx94c1DhVmkKQxf H5eM1EbClWf1U4PbzpxgAs637fabhVnl+QLw2fsowaVMFozT2Qci0WujS6wyvg+3WVPH MFKs18X3r0+m/frBeE+61jGmaf0VxaU/BsoiuJICDUAxb9vL+KWTMd/cXSEQDJ9T2Hyg REc1T5GHmeVA43NhIIk7WyaBq06x+uvZ49a4MJ8PGqCl0AOw8FksKSY1PNpBuAduDtPI nCLmaHX+WLBMOJcEnugQxh0UOHax7pIrxFtX8daPDA+/JF7xPggXDpy4fxTVuRV+nYsr eCSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Lk7v6cS8; 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 z8si1380620pgs.393.2022.02.21.17.12.17; Mon, 21 Feb 2022 17:12:32 -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=Lk7v6cS8; 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 S237694AbiBVATZ (ORCPT + 99 others); Mon, 21 Feb 2022 19:19:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237768AbiBVATL (ORCPT ); Mon, 21 Feb 2022 19:19:11 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE17925C6B; Mon, 21 Feb 2022 16:18:28 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7647D3200E18; Mon, 21 Feb 2022 19:18:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 21 Feb 2022 19:18:28 -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=V9Y0aM UYHoxDUjucoxLUoyDrdDFBnSbiTwU4Pu0uuFw=; b=Lk7v6cS86buxdL8uLglrJ8 gc9GPXof0oIZU84PNZS0mRqvfXb64ccuVy9qySymDTnYJcySt/ZwrRz0HTeVk1CR l61CGJ2G87b0Pmmse9ZprfW4w2/RH/6jCsvVm61jxpFdSGc5RjuFjUeL2rNr5RDd ulmpGv/OUnMLQSxHyTbIRZStwuzcYkBsljArWHqMossMrQZUttPK/t2pHvrOjPuy 6E1VIMgHN8sQnTbsOHtm6FuwU4Zxeh//vY9jr50+jJCSvZYMn7ouk1S09tIEsv0S YSaXnVWcxH0WIEAPaz0ZMsMN6fbmZ49DeZHEVxgKSVw9CR8N5QcZdtFF1lVZnadQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofggtghogfesthekredtredtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhephefhfeet ueelvddvtedttdevieeluedtvedtfeejieelhedutdeuheduieejgfegnecuffhomhgrih hnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrg gsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 19:18:25 -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 v2 1/2] Revert "xen-netback: remove 'hotplug-status' once it has served its purpose" Date: Tue, 22 Feb 2022 01:18:16 +0100 Message-Id: <20220222001817.2264967-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 Changes in v2: - build fix, reported by kernel test robot --- 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..3fad58d22155 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, be->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