Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Siwei Liu
On Wed, Dec 20, 2017 at 8:52 PM, Jakub Kicinski wrote: > On Wed, 20 Dec 2017 18:16:30 -0800, Siwei Liu wrote: >> > The plan is to remove the delay and do the naming in the kernel. >> > This was suggested by Lennart since udev is only doing naming policy >> > because kernel names

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Siwei Liu
On Tue, Dec 19, 2017 at 10:41 AM, Stephen Hemminger wrote: > On Tue, 19 Dec 2017 13:21:17 -0500 (EST) > David Miller wrote: > >> From: Stephen Hemminger >> Date: Tue, 19 Dec 2017 09:55:48 -0800 >> >> > could be 10ms,

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Siwei Liu
On Tue, Dec 19, 2017 at 10:41 AM, Stephen Hemminger < step...@networkplumber.org> wrote: > On Tue, 19 Dec 2017 13:21:17 -0500 (EST) > David Miller wrote: > > > From: Stephen Hemminger > > Date: Tue, 19 Dec 2017 09:55:48 -0800 > > > > > could be

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Samudrala, Sridhar
On 12/19/2017 2:53 PM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 14:37:50 -0800 "Samudrala, Sridhar" wrote: On 12/19/2017 11:46 AM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 11:42:33 -0800 "Samudrala, Sridhar" wrote: On

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Samudrala, Sridhar
On 12/19/2017 11:46 AM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 11:42:33 -0800 "Samudrala, Sridhar" wrote: On 12/19/2017 10:41 AM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 13:21:17 -0500 (EST) David Miller wrote: From: Stephen

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Samudrala, Sridhar
On 12/19/2017 10:41 AM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 13:21:17 -0500 (EST) David Miller wrote: From: Stephen Hemminger Date: Tue, 19 Dec 2017 09:55:48 -0800 could be 10ms, just enough to let udev do its renaming Please,

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Samudrala, Sridhar
On 12/19/2017 7:47 AM, Michael S. Tsirkin wrote: I'll need to look at this more, in particular the feature bit is missing here. For now one question: On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); */

[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2018-01-10 Thread Sridhar Samudrala
This patch enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-20 Thread Jakub Kicinski
On Wed, 20 Dec 2017 18:16:30 -0800, Siwei Liu wrote: > > The plan is to remove the delay and do the naming in the kernel. > > This was suggested by Lennart since udev is only doing naming policy > > because kernel names were not repeatable. > > > > This makes the VF show up as "ethN_vf" on Hyper-V

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-20 Thread Jakub Kicinski
On Thu, 21 Dec 2017 02:15:31 +0200, Michael S. Tsirkin wrote: > On Wed, Dec 20, 2017 at 02:33:34PM -0800, Jakub Kicinski wrote: > > On Mon, 18 Dec 2017 16:40:36 -0800, Sridhar Samudrala wrote: > > > +static int virtio_netdev_event(struct notifier_block *this, > > > +

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-20 Thread Michael S. Tsirkin
On Wed, Dec 20, 2017 at 02:33:34PM -0800, Jakub Kicinski wrote: > On Mon, 18 Dec 2017 16:40:36 -0800, Sridhar Samudrala wrote: > > +static int virtio_netdev_event(struct notifier_block *this, > > + unsigned long event, void *ptr) > > +{ > > + struct net_device *event_dev

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-20 Thread Michael S. Tsirkin
On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: > This patch enables virtio to switch over to a VF datapath when a VF netdev > is present with the same MAC address. I prefer saying "a passthrough device" here. Does not have to be a VF at all. > It allows live migration of a

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-20 Thread Vitaly Kuznetsov
David Miller writes: > From: "Samudrala, Sridhar" > Date: Tue, 19 Dec 2017 09:41:39 -0800 > >> This is based on netvsc implementation and here is the commit that >> added this delay.  Not sure if this needs to be 100ms. >> >> commit

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 14:37:50 -0800 "Samudrala, Sridhar" wrote: > On 12/19/2017 11:46 AM, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 11:42:33 -0800 > > "Samudrala, Sridhar" wrote: > > > >> On 12/19/2017 10:41 AM, Stephen Hemminger

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 11:42:33 -0800 "Samudrala, Sridhar" wrote: > On 12/19/2017 10:41 AM, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 13:21:17 -0500 (EST) > > David Miller wrote: > > > >> From: Stephen Hemminger

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 13:21:17 -0500 (EST) David Miller wrote: > From: Stephen Hemminger > Date: Tue, 19 Dec 2017 09:55:48 -0800 > > > could be 10ms, just enough to let udev do its renaming > > Please, move to some kind of notification or event

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread David Miller
From: Stephen Hemminger Date: Tue, 19 Dec 2017 09:55:48 -0800 > could be 10ms, just enough to let udev do its renaming Please, move to some kind of notification or event based handling of this problem. No delay is safe, what if userspace gets swapped out or whatever

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread David Miller
From: "Samudrala, Sridhar" Date: Tue, 19 Dec 2017 09:41:39 -0800 > This is based on netvsc implementation and here is the commit that > added this delay.  Not sure if this needs to be 100ms. > > commit 6123c66854c174e4982f98195100c1d990f9e5e6 > Author: stephen

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 20:07:01 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 19, 2017 at 09:55:48AM -0800, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 09:41:39 -0800 > > "Samudrala, Sridhar" wrote: > > > > > On 12/19/2017 7:47 AM, Michael S.

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Michael S. Tsirkin
On Tue, Dec 19, 2017 at 09:55:48AM -0800, Stephen Hemminger wrote: > On Tue, 19 Dec 2017 09:41:39 -0800 > "Samudrala, Sridhar" wrote: > > > On 12/19/2017 7:47 AM, Michael S. Tsirkin wrote: > > > I'll need to look at this more, in particular the feature > > > bit is