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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A11A2C433B4 for ; Tue, 18 May 2021 10:42:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3ED5E610CC for ; Tue, 18 May 2021 10:42:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ED5E610CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.129049.242248 (Exim 4.92) (envelope-from ) id 1lixB4-00014x-QL; Tue, 18 May 2021 10:42:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 129049.242248; Tue, 18 May 2021 10:42:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lixB4-00014q-NH; Tue, 18 May 2021 10:42:18 +0000 Received: by outflank-mailman (input) for mailman id 129049; Tue, 18 May 2021 10:42:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lixB3-00014k-DU for xen-devel@lists.xenproject.org; Tue, 18 May 2021 10:42:17 +0000 Received: from out1-smtp.messagingengine.com (unknown [66.111.4.25]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 373ad088-adaa-49b7-803f-4f692d7a1945; Tue, 18 May 2021 10:42:15 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 04EE35C00CC; Tue, 18 May 2021 06:42:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 18 May 2021 06:42:15 -0400 Received: from mail-itl (ip5b434f04.dynamic.kabel-deutschland.de [91.67.79.4]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 May 2021 06:42:12 -0400 (EDT) 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: 373ad088-adaa-49b7-803f-4f692d7a1945 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=A1IP30 HlocCCSSewwTTQKoI3s1gaJPVsV9LOgsd0CWU=; b=PDd2AlXO81dFZXzywDoRBh a63zAUk2V9q1iSsGg5X1gFq3efI4ALWqUkn4508HsyVIA5G94DTpbUkGnBl0fCQF G5ej9sK73N4brI2B2w2edoTXNKYjjLFlT39RTJp2dTpSAE+bHgX0pBdzw6KgHZwd TAnY5WG1SNX/KSs2lifgfPIOWeNWDqkse2xPnGhIDsU1506qk/S3ntKyswn6R7lP ITFPcGGVvCAsG5YoVkkooMHwSnhS8K2FvyuUhOdIMStteNld/tlBkl9Gv1Km2vXH tfOOGLac9Wci1w7H88ecY53DxGxZ8AtC/pWn2wBY4g26ooK7a8pZXMUfElBjz2fg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeetveff iefghfekhffggeeffffhgeevieektedthfehveeiheeiiedtudegfeetffenucfkpheple durdeijedrjeelrdegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtg homh X-ME-Proxy: Date: Tue, 18 May 2021 12:42:09 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: "Durrant, Paul" Cc: Michael Brown , "xen-devel@lists.xenproject.org" , "netdev@vger.kernel.org" , "wei.liu@kernel.org" , Ian Jackson , Wei Liu , Anthony PERARD Subject: Re: [PATCH] xen-netback: Check for hotplug-status existence before watching Message-ID: References: <9edd6873034f474baafd70b1df693001@EX13D32EUC003.ant.amazon.com> <8b7a9cd5-3696-65c2-5656-a1c8eb174344@xen.org> <887f9533f5c54bfabfbff7231eb99b08@EX13D32EUC003.ant.amazon.com> <2c23e102b6254e42877eb1e8fe68a4f7@EX13D32EUC003.ant.amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6EOIiVkRIQqWqOV/" Content-Disposition: inline In-Reply-To: <2c23e102b6254e42877eb1e8fe68a4f7@EX13D32EUC003.ant.amazon.com> --6EOIiVkRIQqWqOV/ Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Tue, 18 May 2021 12:42:09 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: "Durrant, Paul" Cc: Michael Brown , "xen-devel@lists.xenproject.org" , "netdev@vger.kernel.org" , "wei.liu@kernel.org" , Ian Jackson , Wei Liu , Anthony PERARD Subject: Re: [PATCH] xen-netback: Check for hotplug-status existence before watching On Tue, May 18, 2021 at 09:48:25AM +0000, Durrant, Paul wrote: > > -----Original Message----- > > From: Marek Marczykowski-G=C3=B3recki > >=20 > > On Tue, May 18, 2021 at 09:34:45AM +0000, Durrant, Paul wrote: > > > > -----Original Message----- > > > > From: Marek Marczykowski-G=C3=B3recki > > > > > > > > On Tue, May 18, 2021 at 07:57:16AM +0100, Paul Durrant wrote: > > > > > Why is that missing? We're going behind the back of the toolstack= to do the > > > > > unbind and bind so why should we expect it to re-execute a hotplu= g script? > > > > > > > > Ok, then simply execute the whole hotplug script (instead of its su= bset) > > > > after re-loading the backend module and everything will be fine. > > > > > > > > For example like this: > > > > XENBUS_PATH=3Dbackend/vif/$DOMID/$VIF \ > > > > XENBUS_TYPE=3Dvif \ > > > > XENBUS_BASE_PATH=3Dbackend \ > > > > script=3D/etc/xen/scripts/vif-bridge \ > > > > vif=3Dvif.$DOMID.$VIF \ > > > > /etc/xen/scripts/vif-bridge online > > > > > > > > > > ... as long as there's no xenstore fall-out that the guest can observ= e. > >=20 > > Backend will set state to XenbusStateInitWait on load anyway... > >=20 >=20 > Oh, that sounds like a bug then... It ought to go straight to connected i= f the frontend is already there. To me this sounds very suspicious. But if that's really what should backend do, then it would "solve" also hotplug-status node issue. See the end of netback_probe() function. But I think if you start processing traffic before hotplug script configures the interface (so - without switching to XenbusStateInitWait and waiting for hotplug-status node), you'll post some packets into not enabled interface, which I think will drop them (not queue). TCP will be fine with that, but many other protocols not. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --6EOIiVkRIQqWqOV/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmCjmgEACgkQ24/THMrX 1yzCmwf/QjWF5aAIE38gHNVk+1kC9JDgsgIoaXSFus+0rK5dcZvAPXv15NxNpSeF IGm9jhgEylYrv/cj/bwx8Wq1H2bKS2Dr3s3qxr3nP7MSCHxn3EmhaPy+5ZzhHkY4 nrlD6xqRSEV1aPoNVX97oASD5eLIZCai21T36fqk4ZH1YJfVy29mqI695ZRR0IFP 5wkIu7JgRyCGrqWVB0/RWjCuw3A2vGU3lIe4wKkS67K6EjCSh26V+/GDtKoJA07i RH0W3V5iwOvsw0S9PtSDGelb+9SUP8gbqvcJ2akMLyxhOxVkM6ao0/1Xc+IwHxbt xdURruEb31oJbMXvIC4caVACSmN9dQ== =2E+b -----END PGP SIGNATURE----- --6EOIiVkRIQqWqOV/--