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

2018-05-11 Thread Michael S. Tsirkin
On Mon, May 07, 2018 at 03:39:19PM -0700, 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 + > >

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

2018-05-11 Thread Michael S. Tsirkin
On Mon, May 07, 2018 at 05:24:27PM -0700, Samudrala, Sridhar wrote: > > > 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, > > > +

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

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

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

2018-05-08 Thread kbuild test robot
Hi Sridhar, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Sridhar-Samudrala/Enable-virtio_net-to-act-as-a-standby-for-a-passthru-device/20180508-123531 reproduce: # apt-get install sparse

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

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)) { +

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

2018-05-07 Thread Stephen Hemminger
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, "Opening slave %s failed

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

2018-05-07 Thread Stephen Hemminger
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; > + struct

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

2018-05-07 Thread Stephen Hemminger
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 datapath. The

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

2018-05-07 Thread Randy Dunlap
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 + >

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

2018-05-07 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