From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63EE0C43217 for ; Tue, 1 Mar 2022 20:18:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.281746.480211 (Exim 4.92) (envelope-from ) id 1nP8wc-0000Av-M3; Tue, 01 Mar 2022 20:18:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 281746.480211; Tue, 01 Mar 2022 20:18:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nP8wc-0000An-J8; Tue, 01 Mar 2022 20:18:02 +0000 Received: by outflank-mailman (input) for mailman id 281746; Tue, 01 Mar 2022 20:18:01 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nP8wb-0000Ah-0Y for xen-devel@lists.xenproject.org; Tue, 01 Mar 2022 20:18:01 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id af626cfe-999c-11ec-8539-5f4723681683; Tue, 01 Mar 2022 21:17:59 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7FAA761774; Tue, 1 Mar 2022 20:17:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 162F8C340EE; Tue, 1 Mar 2022 20:17:53 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: af626cfe-999c-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646165877; bh=ktPF91zrjQqYukHJvi8JLaQ23mLJd5oC5eRxAgYO28Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CP935D0wG5TwqsAcWuYjMySe/Jun2DWqSzaCQpAZu0fpL95jZmJwxywMTaSTbzVRj tqdqJRY31l4U+DpDkPXL31nCmw1SRYPIuqRAFM5ozaYf421VoKGBuv6TfZmgSin8a6 5OEHS2ZvR8EygJKIjBCJfxL9x2ziqIjXvdIIVQANhpEyvdt+OgnWGIDUjov9y859ZE ErJQJ8vzXDNWph7LKktEK95Xnr1uek4AMdb9Ek+xFw51QwyJJy3T8v+ZhzMjKH0g6A KxBiZPlsYg6+R6vWbAciBo6oUt3KinACWwH+hApxukht0vyb+y2FiK7FG8YevVDCvY qR+zcYu4R3WuQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Paul Durrant , Jakub Kicinski , Sasha Levin , wei.liu@kernel.org, davem@davemloft.net, xen-devel@lists.xenproject.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 17/23] Revert "xen-netback: remove 'hotplug-status' once it has served its purpose" Date: Tue, 1 Mar 2022 15:16:16 -0500 Message-Id: <20220301201629.18547-17-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220301201629.18547-1-sashal@kernel.org> References: <20220301201629.18547-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Marek Marczykowski-Górecki [ Upstream commit 0f4558ae91870692ce7f509c31c9d6ee721d8cdc ] 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 Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Paul Durrant Link: https://lore.kernel.org/r/20220222001817.2264967-1-marmarek@invisiblethingslab.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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 d24b7a7993aa0..3fad58d22155b 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.34.1