]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: Introduce net_failover driver
authorSridhar Samudrala <sridhar.samudrala@intel.com>
Thu, 24 May 2018 16:55:15 +0000 (09:55 -0700)
committerBrian Maly <brian.maly@oracle.com>
Tue, 20 Nov 2018 22:12:43 +0000 (17:12 -0500)
commit639f1b31fdb3363b921d24f6a89943146bb70bd0
tree7b93d898093ddbb18a510f7960585420a86f2b28
parentb3bc7c163fc927349f18cf287df9358e1eca8546
net: Introduce net_failover driver

The net_failover driver provides an automated failover mechanism via APIs
to create and destroy a failover master netdev and manages a primary and
standby slave netdevs that get registered via the generic failover
infrastructure.

The failover netdev acts a master device and controls 2 slave devices. The
original paravirtual interface gets registered as 'standby' slave netdev and
a passthru/vf device with the same MAC gets registered as 'primary' slave
netdev. Both 'standby' and 'failover' netdevs are associated with the same
'pci' device. The user accesses the network interface via 'failover' netdev.
The 'failover' netdev chooses 'primary' netdev as default for transmits when
it is available with link up and running.

This can be used by paravirtual drivers to enable an alternate low latency
datapath. It also enables hypervisor controlled live migration of a VM with
direct attached VF by failing over to the paravirtual datapath when the VF
is unplugged.

Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cfc80d9a11635404a40199a1c9471c96890f3f74)
Orabug: 28122104
Signed-off-by: Vijay Balakrishna <vijay.balakrishna@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
drivers/net/Kconfig
(a missing config in UEK5 needed manual conflict merge)

drivers/net/Makefile
(not all upstream network device driver objects present in UEK5,
cherry-pick fails to merge, resolved manually)

(cherry picked from commit 0a251fd907bd530b28076cb272110faa4b1f3103)
Signed-off-by: Vijay Balakrishna <vijay.balakrishna@oracle.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
drivers/net/net_failover.c
- new ETHTOOL_xLINKSETTINGS API are not present in UEK4,
  continue to use ethtool get_settings
- centralized net_device min/max MTU checking not present in UEK4,
  lines referencing min/max MTU are removed

Conflicts:
drivers/net/Makefile
(insignificant manual merge after cherry-pick)

Signed-off-by: Brian Maly <brian.maly@oracle.com>
Documentation/networking/net_failover.rst [new file with mode: 0644]
MAINTAINERS
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/net_failover.c [new file with mode: 0644]
include/net/net_failover.h [new file with mode: 0644]