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

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

2018-04-22 Thread kbuild test robot
Hi Sridhar, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] [also build test WARNING on v4.17-rc1] [cannot apply to net-next/master next-20180420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

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

2018-04-22 Thread Michael S. Tsirkin
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 net_failover? It's possible to extend the

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

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 08:56:57AM -0700, Alexander Duyck wrote: > On Fri, Apr 20, 2018 at 8:34 AM, Michael S. Tsirkin wrote: > > On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: > >> > > + finfo = netdev_priv(failover_dev); > >> > > + > >> > > + primary_dev =

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

2018-04-20 Thread Alexander Duyck
On Fri, Apr 20, 2018 at 8:34 AM, Michael S. Tsirkin wrote: > On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: >> > > + finfo = netdev_priv(failover_dev); >> > > + >> > > + primary_dev = rtnl_dereference(finfo->primary_dev); >> > > + standby_dev =

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

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: > > > + finfo = netdev_priv(failover_dev); > > > + > > > + primary_dev = rtnl_dereference(finfo->primary_dev); > > > + standby_dev = rtnl_dereference(finfo->standby_dev); > > > + > > > + if (slave_dev != primary_dev && slave_dev

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

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

2018-04-19 Thread Michael S. Tsirkin
On Thu, Apr 19, 2018 at 06:42:02PM -0700, Sridhar Samudrala wrote: > +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops > **ops) > +{ > + struct net_device *failover_dev; > + struct failover *failover; > + > + spin_lock(_lock); > +

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

2018-04-19 Thread Michael S. Tsirkin
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 datapath. The notifier and > event handling

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

2018-04-19 Thread Sridhar Samudrala
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 datapath. The notifier and event handling code is based on the existing netvsc implementation. It exposes 2 sets of