From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available Date: Sun, 4 Mar 2018 06:00:07 +0200 Message-ID: <20180304055802-mutt-send-email-mst@kernel.org> References: <1519934923-39372-1-git-send-email-sridhar.samudrala@intel.com> <1519934923-39372-3-git-send-email-sridhar.samudrala@intel.com> <20180302083605.GD2099@nanopsycho> <20180302213920-mutt-send-email-mst@kernel.org> <04e6981c-bb8d-0af9-5fe3-b9a7f7def3f5@intel.com> <20180302220932-mutt-send-email-mst@kernel.org> <20180302233011-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Samudrala, Sridhar" , Alexander Duyck , Jiri Pirko , Stephen Hemminger , David Miller , Netdev , virtio-dev@lists.oasis-open.org, "Brandeburg, Jesse" , "Duyck, Alexander H" , Jakub Kicinski To: Siwei Liu Return-path: Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: List-Id: netdev.vger.kernel.org On Fri, Mar 02, 2018 at 02:26:48PM -0800, Siwei Liu wrote: > On Fri, Mar 2, 2018 at 1:31 PM, Michael S. Tsirkin wrote: > > On Fri, Mar 02, 2018 at 12:44:56PM -0800, Siwei Liu wrote: > >> On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: > >> > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: > >> >> > >> >> > >> >> On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: > >> >> > On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: > >> >> > > The design limits things to a 1:1 relationship since we just have the > >> >> > > child and backup pointers, but I don't think I am seeing exception > >> >> > > handling to prevent us from overwriting the child pointers so there > >> >> > > may be a leak there. > >> >> > > > >> >> > > Thanks. > >> >> > > > >> >> > > - Alex > >> >> > In fact maintaining a list in that case would be nicer, and > >> >> > just use an arbitrary one. > >> >> > E.g. one can see how a user wanting to swap device 1 for device 2 > >> >> > might first add device 2 with same MAC then drop device 1. > >> >> > >> >> It should be possible to swap VF1 with VF2 by > >> >> 1.- enabling virtio link > >> >> 2.- unplugging VF1 > >> >> 3.- plugging VF2 > >> >> 4.- disabling virtio link > >> >> > >> > > >> > True, but it isn't hard to avoid breakage if user > >> > swapped steps 2 and 3. No need to make it more > >> > fragile that it has to be. > >> > >> The migration case, VF2 is associated with another PF on another > >> machine (destination), I wonder how it is possible. > > > > E.g. you want to remove the PF so you unplug the VF > > then add another VF of the same PF. > > > >> Even with local plugging of VF2 on the same PF, the MAC address > >> requirement (VF1's == VF2's) would fail the MAC address assignment on > >> VF2. > >> > >> -Siwei > > > > Why would it fail? These are separate cards. > > OK. I realized that you may talk about assigning a VF on a diffferent > PF (VF1 on PF1 while VF2 on PF2). And we might assign a pass-through > device rather than a VF. Yes, it's indeed possible that may happen but > I take it as a further step down (another patch maybe) as it would > involve changes to notify the network with gratuituious ARP and/or > unsolicited ND advertisement of the MAC address association with the > new port. > > -Siwei Interesting point. I guess that's a limitation in the curent patch then: virtio and PT device must be connected to the same physical NIC. Worth documenting. > > > >> > > >> > -- > >> > MST > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > >> > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > >> > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-3405-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [66.179.20.138]) by lists.oasis-open.org (Postfix) with ESMTP id 445965818F0F for ; Sat, 3 Mar 2018 20:00:23 -0800 (PST) Date: Sun, 4 Mar 2018 06:00:07 +0200 From: "Michael S. Tsirkin" Message-ID: <20180304055802-mutt-send-email-mst@kernel.org> References: <1519934923-39372-1-git-send-email-sridhar.samudrala@intel.com> <1519934923-39372-3-git-send-email-sridhar.samudrala@intel.com> <20180302083605.GD2099@nanopsycho> <20180302213920-mutt-send-email-mst@kernel.org> <04e6981c-bb8d-0af9-5fe3-b9a7f7def3f5@intel.com> <20180302220932-mutt-send-email-mst@kernel.org> <20180302233011-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available To: Siwei Liu Cc: "Samudrala, Sridhar" , Alexander Duyck , Jiri Pirko , Stephen Hemminger , David Miller , Netdev , virtio-dev@lists.oasis-open.org, "Brandeburg, Jesse" , "Duyck, Alexander H" , Jakub Kicinski List-ID: On Fri, Mar 02, 2018 at 02:26:48PM -0800, Siwei Liu wrote: > On Fri, Mar 2, 2018 at 1:31 PM, Michael S. Tsirkin wrote: > > On Fri, Mar 02, 2018 at 12:44:56PM -0800, Siwei Liu wrote: > >> On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: > >> > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: > >> >> > >> >> > >> >> On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: > >> >> > On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: > >> >> > > The design limits things to a 1:1 relationship since we just have the > >> >> > > child and backup pointers, but I don't think I am seeing exception > >> >> > > handling to prevent us from overwriting the child pointers so there > >> >> > > may be a leak there. > >> >> > > > >> >> > > Thanks. > >> >> > > > >> >> > > - Alex > >> >> > In fact maintaining a list in that case would be nicer, and > >> >> > just use an arbitrary one. > >> >> > E.g. one can see how a user wanting to swap device 1 for device 2 > >> >> > might first add device 2 with same MAC then drop device 1. > >> >> > >> >> It should be possible to swap VF1 with VF2 by > >> >> 1.- enabling virtio link > >> >> 2.- unplugging VF1 > >> >> 3.- plugging VF2 > >> >> 4.- disabling virtio link > >> >> > >> > > >> > True, but it isn't hard to avoid breakage if user > >> > swapped steps 2 and 3. No need to make it more > >> > fragile that it has to be. > >> > >> The migration case, VF2 is associated with another PF on another > >> machine (destination), I wonder how it is possible. > > > > E.g. you want to remove the PF so you unplug the VF > > then add another VF of the same PF. > > > >> Even with local plugging of VF2 on the same PF, the MAC address > >> requirement (VF1's == VF2's) would fail the MAC address assignment on > >> VF2. > >> > >> -Siwei > > > > Why would it fail? These are separate cards. > > OK. I realized that you may talk about assigning a VF on a diffferent > PF (VF1 on PF1 while VF2 on PF2). And we might assign a pass-through > device rather than a VF. Yes, it's indeed possible that may happen but > I take it as a further step down (another patch maybe) as it would > involve changes to notify the network with gratuituious ARP and/or > unsolicited ND advertisement of the MAC address association with the > new port. > > -Siwei Interesting point. I guess that's a limitation in the curent patch then: virtio and PT device must be connected to the same physical NIC. Worth documenting. > > > >> > > >> > -- > >> > MST > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > >> > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > >> > --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org