Re: [PATCH net v8] failover: allow name change on IFF_UP slave interfaces

2019-04-09 Thread Samudrala, Sridhar
On 4/8/2019 4:45 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (

Re: [PATCH net v6] failover: allow name change on IFF_UP slave interfaces

2019-04-06 Thread Samudrala, Sridhar
On 4/6/2019 12:21 AM, si-wei liu wrote: Stephen are you happy with this approach? I think it is the best solution for what you want to do. Since you're asking specifically, I tried what you suggested below. Did you test with some things like Free Range Routing, Although there might be

Re: [PATCH net v5] failover: allow name change on IFF_UP slave interfaces

2019-04-02 Thread Samudrala, Sridhar
On 4/2/2019 8:14 PM, Stephen Hemminger wrote: On Tue, 2 Apr 2019 15:23:29 -0700 si-wei liu wrote: On 4/2/2019 2:53 PM, Stephen Hemminger wrote: On Mon, 1 Apr 2019 19:04:53 -0400 Si-Wei Liu wrote: + if (dev->flags & IFF_UP && + likely(!(dev->priv_flags & IFF_FAILOVER_S

Re: [PATCH net v5] failover: allow name change on IFF_UP slave interfaces

2019-04-02 Thread Samudrala, Sridhar
On 4/1/2019 4:04 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (

Re: [PATCH net v4] failover: allow name change on IFF_UP slave interfaces

2019-03-28 Thread Samudrala, Sridhar
On 3/28/2019 4:47 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kern

Re: [PATCH net v2] failover: allow name change on IFF_UP slave interfaces

2019-03-20 Thread Samudrala, Sridhar
where we want a IFF_FAILOVER_SLAVE type of device to support 2 different behaviors. (rename_ok and rename_not_ok) Thanks Sridhar Thanks, -Siwei On 3/6/2019 8:54 PM, si-wei liu wrote: On 3/6/2019 8:13 PM, Samudrala, Sridhar wrote: On 3/6/2019 7:08 PM, Si-Wei Liu wrote: When a netdev

Re: [PATCH net v2] failover: allow name change on IFF_UP slave interfaces

2019-03-06 Thread Samudrala, Sridhar
On 3/6/2019 7:08 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel

Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-06 Thread Samudrala, Sridhar
On 3/6/2019 1:26 PM, si-wei liu wrote: On 3/6/2019 4:04 AM, Jiri Pirko wrote: --- a/net/core/failover.c +++ b/net/core/failover.c @@ -16,6 +16,11 @@ static LIST_HEAD(failover_list); static DEFINE_SPINLOCK(failover_lock); +static bool slave_rename_ok = true; + +module_param(slave_rename_ok,

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-21 Thread Samudrala, Sridhar
On 2/21/2019 7:33 PM, si-wei liu wrote: On 2/21/2019 5:39 PM, Michael S. Tsirkin wrote: On Thu, Feb 21, 2019 at 05:14:44PM -0800, Siwei Liu wrote: Sorry for replying to this ancient thread. There was some remaining issue that I don't think the initial net_failover patch got addressed cleanly

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-26 Thread Samudrala, Sridhar
On 6/26/2018 11:21 PM, Siwei Liu wrote: On Tue, Jun 26, 2018 at 5:29 PM, Michael S. Tsirkin wrote: On Tue, Jun 26, 2018 at 04:38:26PM -0700, Siwei Liu wrote: On Mon, Jun 25, 2018 at 6:50 PM, Michael S. Tsirkin wrote: On Mon, Jun 25, 2018 at 10:54:09AM -0700, Samudrala, Sridhar wrote: Might

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-25 Thread Samudrala, Sridhar
On 6/22/2018 5:17 PM, Siwei Liu wrote: On Fri, Jun 22, 2018 at 4:40 PM, Siwei Liu wrote: On Fri, Jun 22, 2018 at 3:25 PM, Michael S. Tsirkin wrote: On Fri, Jun 22, 2018 at 02:51:11PM -0700, Siwei Liu wrote: On Fri, Jun 22, 2018 at 2:29 PM, Michael S. Tsirkin wrote: On Fri, Jun 22, 2018 at

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-12 Thread Samudrala, Sridhar
t will enslave the primary via the call to failover_existing_slave_register() as part of failover_register() routine. Thanks Thanks We can move some of this code to management as well, architecturally it does not make too much sense but it might be easier implementation-wise. HTH On Mo

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-12 Thread Samudrala, Sridhar
evice driver? Thanks We can move some of this code to management as well, architecturally it does not make too much sense but it might be easier implementation-wise. HTH On Mon, Jun 04, 2018 at 06:41:48PM -0700, Samudrala, Sridhar wrote: Ping on this patch now that the kernel patches are accept

Re: [virtio-dev] Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-12 Thread Samudrala, Sridhar
On 6/12/2018 4:34 AM, Michael S. Tsirkin wrote: On Mon, Jun 11, 2018 at 10:02:45PM -0700, Samudrala, Sridhar wrote: On 6/11/2018 7:17 PM, Michael S. Tsirkin wrote: On Tue, Jun 12, 2018 at 09:54:44AM +0800, Jason Wang wrote: On 2018年06月12日 01:26, Michael S. Tsirkin wrote: On Mon, May 07, 2018

Re: [Qemu-devel] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-11 Thread Samudrala, Sridhar
On 6/11/2018 7:17 PM, Michael S. Tsirkin wrote: On Tue, Jun 12, 2018 at 09:54:44AM +0800, Jason Wang wrote: On 2018年06月12日 01:26, Michael S. Tsirkin wrote: On Mon, May 07, 2018 at 04:09:54PM -0700, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net devi

Re: [libvirt] [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-06 Thread Samudrala, Sridhar
On 6/6/2018 11:52 AM, Ján Tomko wrote: On Wed, Jun 06, 2018 at 11:17:36AM -0700, Samudrala, Sridhar wrote: On 6/4/2018 7:06 PM, Jason Wang wrote: On 2018年06月05日 09:41, Samudrala, Sridhar wrote: Ping on this patch now that the kernel patches are accepted into davem's net-next tree.

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-06 Thread Samudrala, Sridhar
On 6/4/2018 7:06 PM, Jason Wang wrote: On 2018年06月05日 09:41, Samudrala, Sridhar wrote: Ping on this patch now that the kernel patches are accepted into davem's net-next tree. https://patchwork.ozlabs.org/cover/920005/ On 5/7/2018 4:09 PM, Sridhar Samudrala wrote: This feature bit c

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-05 Thread Samudrala, Sridhar
implementation-wise. HTH On Mon, Jun 04, 2018 at 06:41:48PM -0700, Samudrala, Sridhar wrote: Ping on this patch now that the kernel patches are accepted into davem's net-next tree. https://patchwork.ozlabs.org/cover/920005/ On 5/7/2018 4:09 PM, Sridhar Samudrala wrote: This feature bit

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-04 Thread Samudrala, Sridhar
Ping on this patch now that the kernel patches are accepted into davem's net-next tree. https://patchwork.ozlabs.org/cover/920005/ On 5/7/2018 4:09 PM, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-30 Thread Samudrala, Sridhar
On 5/30/2018 7:06 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:14 -0700 Sridhar Samudrala wrote: Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala Why was this merged? It was never signed off by any of

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-30 Thread Samudrala, Sridhar
On 5/30/2018 7:52 PM, Stephen Hemminger wrote: On Fri, 25 May 2018 16:06:58 -0700 "Samudrala, Sridhar" wrote: On 5/25/2018 3:38 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:13 -0700 Sridhar Samudrala wrote: diff --git a/include/linux/netdevice.h b/include/linux/n

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-26 Thread Samudrala, Sridhar
'On 5/26/2018 12:51 AM, Jiri Pirko wrote: Sat, May 26, 2018 at 09:22:18AM CEST, sridhar.samudr...@intel.com wrote: On 5/25/2018 4:28 PM, Stephen Hemminger wrote: On Fri, 25 May 2018 16:11:47 -0700 "Samudrala, Sridhar" wrote: On 5/25/2018 3:34 PM, Stephen Hemminger wrote:

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-26 Thread Samudrala, Sridhar
On 5/25/2018 4:28 PM, Stephen Hemminger wrote: On Fri, 25 May 2018 16:11:47 -0700 "Samudrala, Sridhar" wrote: On 5/25/2018 3:34 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:14 -0700 Sridhar Samudrala wrote: --- a/drivers/net/hyperv/Kconfig +++ b/drivers/net/hype

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-25 Thread Samudrala, Sridhar
On 5/25/2018 3:34 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:14 -0700 Sridhar Samudrala wrote: --- a/drivers/net/hyperv/Kconfig +++ b/drivers/net/hyperv/Kconfig @@ -2,5 +2,6 @@ config HYPERV_NET tristate "Microsoft Hyper-V virtual network driver" depends on HYPERV

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-25 Thread Samudrala, Sridhar
On 5/25/2018 3:38 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:13 -0700 Sridhar Samudrala wrote: diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 03ed492c4e14..0f4ba52b641d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1421,6 +142

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-25 Thread Samudrala, Sridhar
On 5/25/2018 3:37 PM, Stephen Hemminger wrote: On Thu, 24 May 2018 09:55:13 -0700 Sridhar Samudrala wrote: + spin_lock(&failover_lock); Since register is not in fast path, this should be a mutex? This is Jiri's comment which made me to switch to spinlock from mutex >> Why mutex?

Re: [PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-23 Thread Samudrala, Sridhar
On 5/22/2018 11:27 PM, Jiri Pirko wrote: Tue, May 22, 2018 at 10:54:29PM CEST, sridhar.samudr...@intel.com wrote: On 5/22/2018 9:12 AM, Jiri Pirko wrote: Fixing the subj, sorry about that. Tue, May 22, 2018 at 05:46:21PM CEST, m...@redhat.com wrote: On Tue, May 22, 2018 at 05:36:14PM +0200,

Re: [PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-22 Thread Samudrala, Sridhar
On 5/22/2018 9:12 AM, Jiri Pirko wrote: Fixing the subj, sorry about that. Tue, May 22, 2018 at 05:46:21PM CEST, m...@redhat.com wrote: On Tue, May 22, 2018 at 05:36:14PM +0200, Jiri Pirko wrote: Tue, May 22, 2018 at 05:28:42PM CEST, sridhar.samudr...@intel.com wrote: On 5/22/2018 2:08 AM,

Re: [PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-22 Thread Samudrala, Sridhar
On 5/22/2018 2:08 AM, Jiri Pirko wrote: Tue, May 22, 2018 at 11:06:37AM CEST, j...@resnulli.us wrote: Tue, May 22, 2018 at 04:06:18AM CEST, sridhar.samudr...@intel.com wrote: Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar S

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-11 Thread Samudrala, Sridhar
On 5/7/2018 3:39 PM, Randy Dunlap wrote: Hi, On 05/07/2018 03:10 PM, Sridhar Samudrala wrote: Signed-off-by: Sridhar Samudrala --- MAINTAINERS|7 + include/linux/netdevice.h | 16 + include/net/net_failover.h | 52 +++ net/Kconfig| 10 + net/cor

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-11 Thread Samudrala, Sridhar
On 5/7/2018 4:46 PM, Stephen Hemminger wrote: On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their datapat

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Samudrala, Sridhar
On 5/7/2018 4:53 PM, Stephen Hemminger wrote: On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: +static struct net_device *net_failover_get_bymac(u8 *mac, +struct net_failover_ops **ops) +{ + struct net_device *failover_dev; +

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Samudrala, Sridhar
On 5/7/2018 4:59 PM, Stephen Hemminger wrote: On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: + if (netif_running(failover_dev)) { + err = dev_open(slave_dev); + if (err && (err != -EBUSY)) { + netdev_err(failover_dev, "Openin

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-05-02 Thread Samudrala, Sridhar
On 5/2/2018 1:30 PM, Michael S. Tsirkin wrote: On Wed, May 02, 2018 at 10:51:12AM -0700, Samudrala, Sridhar wrote: On 5/2/2018 9:15 AM, Jiri Pirko wrote: Sat, Apr 28, 2018 at 11:06:01AM CEST, j...@resnulli.us wrote: Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudr...@intel.com wrote

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-05-02 Thread Samudrala, Sridhar
On 5/2/2018 9:15 AM, Jiri Pirko wrote: Sat, Apr 28, 2018 at 11:06:01AM CEST, j...@resnulli.us wrote: Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudr...@intel.com wrote: [...] + + err = netdev_rx_handler_register(slave_dev, net_failover_handle_frame, +

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-05-02 Thread Samudrala, Sridhar
On 5/2/2018 12:50 AM, Jiri Pirko wrote: Wed, May 02, 2018 at 02:20:26AM CEST, sridhar.samudr...@intel.com wrote: On 4/30/2018 12:20 AM, Jiri Pirko wrote: Now I try to change mac of the failover master: [root@test1 ~]# ip link set ens3 addr 52:54:00:b2:a7:f3 RTNETLINK answers: Operation not supp

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-05-01 Thread Samudrala, Sridhar
On 4/30/2018 12:20 AM, Jiri Pirko wrote: Now I try to change mac of the failover master: [root@test1 ~]# ip link set ens3 addr 52:54:00:b2:a7:f3 RTNETLINK answers: Operation not supported That I did expect to work. I would expect this would change the mac of the master and both standby and pri

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-30 Thread Samudrala, Sridhar
On 4/30/2018 12:12 AM, Jiri Pirko wrote: Mon, Apr 30, 2018 at 05:00:33AM CEST, sridhar.samudr...@intel.com wrote: On 4/28/2018 1:24 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:59PM CEST, sridhar.samudr...@intel.com wrote: This patch enables virtio_net to switch over to a VF datapath when

Re: [PATCH net-next v9 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-30 Thread Samudrala, Sridhar
On 4/30/2018 12:03 AM, Jiri Pirko wrote: Mon, Apr 30, 2018 at 04:47:03AM CEST, sridhar.samudr...@intel.com wrote: On 4/28/2018 12:50 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:57PM CEST,sridhar.samudr...@intel.com wrote: This feature bit can be used by hypervisor to indicate virtio_net

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-29 Thread Samudrala, Sridhar
On 4/28/2018 2:42 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:59PM CEST,sridhar.samudr...@intel.com wrote: This patch enables virtio_net 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

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-04-29 Thread Samudrala, Sridhar
On 4/28/2018 2:06 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their da

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-29 Thread Samudrala, Sridhar
On 4/28/2018 1:24 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:59PM CEST, sridhar.samudr...@intel.com wrote: This patch enables virtio_net 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 withou

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-04-29 Thread Samudrala, Sridhar
On 4/28/2018 1:15 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:58PM CEST,sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their da

Re: [PATCH net-next v9 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-29 Thread Samudrala, Sridhar
On 4/28/2018 12:50 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:57PM CEST,sridhar.samudr...@intel.com wrote: This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62

Re: [PATCH net-next v9 0/4] Enable virtio_net to act as a standby for a passthru device

2018-04-27 Thread Samudrala, Sridhar
On 4/27/2018 10:45 AM, Jiri Pirko wrote: Fri, Apr 27, 2018 at 07:06:56PM CEST, sridhar.samudr...@intel.com wrote: v9: Select NET_FAILOVER automatically when VIRTIO_NET/HYPERV_NET are enabled. (stephen) Tested live migration with virtio-net/AVF(i40evf) configured in failover mode while running i

Re: [PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-26 Thread Samudrala, Sridhar
On 4/26/2018 5:09 PM, Michael S. Tsirkin wrote: On Thu, Apr 26, 2018 at 03:33:26PM -0700, Stephen Hemminger wrote: On Thu, 26 Apr 2018 05:30:05 +0300 "Michael S. Tsirkin" wrote: On Wed, Apr 25, 2018 at 05:08:37PM -0700, Stephen Hemminger wrote: On Wed, 25 Apr 2018 16:59:28 -0700 Sridhar Sam

Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-23 Thread Samudrala, Sridhar
On 4/22/2018 10:06 AM, Michael S. Tsirkin wrote: On Thu, Apr 19, 2018 at 06:42:02PM -0700, Sridhar Samudrala wrote: +#if IS_ENABLED(CONFIG_NET_FAILOVER) + +int failover_create(struct net_device *standby_dev, + struct failover **pfailover); Should we rename all these structs ne

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Samudrala, Sridhar
On 4/20/2018 8:28 AM, Stephen Hemminger wrote: On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala wrote: Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala Do what you want to other devices but leave netvsc alon

Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-20 Thread Samudrala, Sridhar
On 4/19/2018 7:44 PM, Michael S. Tsirkin wrote: On Thu, Apr 19, 2018 at 06:42:02PM -0700, Sridhar Samudrala wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 10:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 18, 2018 at 10:00:51PM -0700, Samudrala, Sridhar wrote: On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a few folks offline and gathered some good feedbacks that I'd like to share thus revive the discussion. First of al

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a few folks offline and gathered some good feedbacks that I'd like to share thus revive the discussion. First of all, as illustrated in the reply below, cloud service providers require transparent live migration. Specifically, the main targe

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 1:32 PM, Jiri Pirko wrote: You still use "active"/"backup" names which is highly misleading as it has completely different meaning that in bond for example. I noted that in my previous review already. Please change it. I guess the issue is with only the 'active'  name. 'backup' shou

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 2:25 AM, Jiri Pirko wrote: Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: On 4/11/2018 8:51 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-11 Thread Samudrala, Sridhar
On 4/11/2018 8:51 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their da

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 11:03 PM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:43 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 2:26 PM, Stephen Hemminger wrote: On Tue, 10 Apr 2018 11:59:50 -0700 Sridhar Samudrala wrote: Use the registration/notification framework supported by the generic bypass infrastructure. Signed-off-by: Sridhar Samudrala --- Thanks for doing this. Your current version has couple

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 8:43 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@intel.com wrote: On 4/9/2018 1:07 AM, Jiri Pirko wrote: Sat, Apr 07, 2018 at 12:59:1

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@intel.com wrote: On 4/9/2018 1:07 AM, Jiri Pirko wrote: Sat, Apr 07, 2018 at 12:59:14AM CEST, sridhar.samudr...@intel.com wrote: On 4/6/2018 5:48 AM, Jiri Pirko wrote: Thu, Apr 05, 2018 at 11:08:22

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-09 Thread Samudrala, Sridhar
On 4/9/2018 1:07 AM, Jiri Pirko wrote: Sat, Apr 07, 2018 at 12:59:14AM CEST, sridhar.samudr...@intel.com wrote: On 4/6/2018 5:48 AM, Jiri Pirko wrote: Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudr...@intel.com wrote: [...] +static int virtnet_bypass_join_child(struct net_device *bypas

Re: [RFC PATCH net-next v5 2/4] net: Introduce generic bypass module

2018-04-06 Thread Samudrala, Sridhar
On 4/6/2018 5:57 AM, Jiri Pirko wrote: Thu, Apr 05, 2018 at 11:08:21PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their dat

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-06 Thread Samudrala, Sridhar
On 4/6/2018 5:48 AM, Jiri Pirko wrote: Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudr...@intel.com wrote: + +static void virtnet_bypass_set_rx_mode(struct net_device *dev) +{ + struct virtnet_bypass_info *vbi = netdev_priv(dev); + struct net_device *child_netdev; +

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-21 Thread Samudrala, Sridhar
On 2/21/2018 6:35 PM, Samudrala, Sridhar wrote: On 2/21/2018 5:59 PM, Siwei Liu wrote: On Wed, Feb 21, 2018 at 4:17 PM, Alexander Duyck wrote: On Wed, Feb 21, 2018 at 3:50 PM, Siwei Liu wrote: I haven't checked emails for days and did not realize the new revision had already came out

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-21 Thread Samudrala, Sridhar
On 2/21/2018 5:59 PM, Siwei Liu wrote: On Wed, Feb 21, 2018 at 4:17 PM, Alexander Duyck wrote: On Wed, Feb 21, 2018 at 3:50 PM, Siwei Liu wrote: I haven't checked emails for days and did not realize the new revision had already came out. And thank you for the effort, this revision really look

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-21 Thread Samudrala, Sridhar
On 2/21/2018 6:02 PM, Jakub Kicinski wrote: On Wed, 21 Feb 2018 12:57:09 -0800, Alexander Duyck wrote: I don't see why the team cannot be there always. It is more the logistical nightmare. Part of the goal here was to work with the cloud base images that are out there such as https://alt.fedora

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-20 Thread Samudrala, Sridhar
On 2/20/2018 8:29 AM, Jiri Pirko wrote: Tue, Feb 20, 2018 at 05:04:29PM CET, alexander.du...@gmail.com wrote: On Tue, Feb 20, 2018 at 2:42 AM, Jiri Pirko wrote: Fri, Feb 16, 2018 at 07:11:19PM CET, sridhar.samudr...@intel.com wrote: Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP tha

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-20 Thread Samudrala, Sridhar
On 2/18/2018 10:11 PM, Jakub Kicinski wrote: On Sat, 17 Feb 2018 09:12:01 -0800, Alexander Duyck wrote: We noticed a couple of issues with this approach during testing. - As both 'bypass' and 'backup' netdevs are associated with the same virtio pci device, udev tries to rename both of them wi

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-28 Thread Samudrala, Sridhar
On 1/28/2018 12:18 PM, Alexander Duyck wrote: On Sun, Jan 28, 2018 at 11:18 AM, Samudrala, Sridhar wrote: On 1/28/2018 9:35 AM, Alexander Duyck wrote: On Fri, Jan 26, 2018 at 9:58 PM, Jakub Kicinski wrote: On Fri, 26 Jan 2018 21:33:01 -0800, Samudrala, Sridhar wrote: 3 netdev model

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-28 Thread Samudrala, Sridhar
On 1/28/2018 9:35 AM, Alexander Duyck wrote: On Fri, Jan 26, 2018 at 9:58 PM, Jakub Kicinski wrote: On Fri, 26 Jan 2018 21:33:01 -0800, Samudrala, Sridhar wrote: 3 netdev model breaks this configuration starting with the creation and naming of the 2 devices to udev needing to be aware of

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-26 Thread Samudrala, Sridhar
On 1/26/2018 6:30 PM, Jakub Kicinski wrote: On Fri, 26 Jan 2018 15:30:35 -0800, Samudrala, Sridhar wrote: On 1/26/2018 2:47 PM, Jakub Kicinski wrote: On Sat, 27 Jan 2018 00:14:20 +0200, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 01:46:42PM -0800, Siwei Liu wrote: and the VM is not

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-26 Thread Samudrala, Sridhar
On 1/26/2018 2:47 PM, Jakub Kicinski wrote: On Sat, 27 Jan 2018 00:14:20 +0200, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 01:46:42PM -0800, Siwei Liu wrote: and the VM is not expected to do any tuning/optimizations on the VF driver directly, i think the current patch that follows the n

Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-26 Thread Samudrala, Sridhar
On 1/26/2018 8:58 AM, Michael S. Tsirkin wrote: On Thu, Jan 11, 2018 at 09:58:39PM -0800, Sridhar Samudrala wrote: @@ -2859,6 +3123,42 @@ static struct virtio_driver virtio_net_driver = { #endif }; +static int virtio_netdev_event(struct notifier_block *this, +

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-26 Thread Samudrala, Sridhar
On 1/26/2018 12:14 AM, Siwei Liu wrote: On Tue, Jan 23, 2018 at 2:58 PM, Michael S. Tsirkin wrote: On Tue, Jan 23, 2018 at 12:24:47PM -0800, Siwei Liu wrote: On Mon, Jan 22, 2018 at 1:41 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 12:27:14PM -0800, Siwei Liu wrote: First off, as

Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-23 Thread Samudrala, Sridhar
On 1/23/2018 2:33 AM, Jason Wang wrote: On 2018年01月12日 13:58, Sridhar Samudrala wrote:   static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)   {   struct virtnet_info *vi = netdev_priv(dev);   int qnum = skb_get_queue_mapping(skb);   struct send_queue *sq

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 7:36 PM, Alexander Duyck wrote: On Mon, Jan 22, 2018 at 6:04 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 05:34:37PM -0800, Samudrala, Sridhar wrote: On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 4:02 PM, Stephen Hemminger wrote: In the case of SwitchDev it should be possible for the port representors and the switch to provide data on which interfaces are bonded on the host side and which aren't. With that data it would be pretty easy to just put together a list of addr

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: You could probably even handle the Tx queue selection via a simple eBPF program and map since the input for whatever is used to select Tx should be pretty simple, destination MAC

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 1:31 PM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:49:58PM -0800, Alexander Duyck wrote: On Wed, Jan 17, 2018 at 11:57 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 11:25:41AM -0800, Samudrala, Sridhar wrote: On 1/17/2018 11:02 AM, Michael S. Tsirkin wrote

Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 12:27 PM, Siwei Liu wrote: First off, as mentioned in another thread, the model of stacking up virt-bond functionality over virtio seems a wrong direction to me. Essentially the migration process would need to carry over all guest side configurations previously done on the VF/PT and

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-17 Thread Samudrala, Sridhar
On 1/17/2018 11:02 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 10:15:52AM -0800, Alexander Duyck wrote: On Thu, Jan 11, 2018 at 9:58 PM, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the

Re: [PATCH net-next 1/2] virtio_net: Introduce VIRTIO_NET_F_MASTER feature bit

2018-01-10 Thread Samudrala, Sridhar
On 1/3/2018 9:43 AM, Michael S. Tsirkin wrote: On Tue, Jan 02, 2018 at 04:35:37PM -0800, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net device to act as a master for a directly attached passthru device with the same MAC address. Signed-off-by: Sridh

Re: [PATCH net-next 0/2] Enable virtio to act as a master for a passthru device

2018-01-10 Thread Samudrala, Sridhar
On 1/3/2018 10:28 AM, Alexander Duyck wrote: On Wed, Jan 3, 2018 at 10:14 AM, Samudrala, Sridhar wrote: On 1/3/2018 8:59 AM, Alexander Duyck wrote: On Tue, Jan 2, 2018 at 6:16 PM, Jakub Kicinski wrote: On Tue, 2 Jan 2018 16:35:36 -0800, Sridhar Samudrala wrote: This patch series enables

Re: [PATCH net-next 0/2] Enable virtio to act as a master for a passthru device

2018-01-10 Thread Samudrala, Sridhar
On 1/3/2018 8:59 AM, Alexander Duyck wrote: On Tue, Jan 2, 2018 at 6:16 PM, Jakub Kicinski wrote: On Tue, 2 Jan 2018 16:35:36 -0800, Sridhar Samudrala wrote: This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows liv

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 Hemminger Date: Tue, 19 Dec 2017 09:5

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 12/19/2017 10:41 AM, Stephen Hemminger wr

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, move to some kind of notification or event based hand

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); */ DECLARE_EWMA(pkt