search for: net_failover_op

Displaying 11 results from an estimated 11 matches for "net_failover_op".

Did you mean: net_failover_ops
2018 May 07
2
[PATCH net-next v10 2/4] net: Introduce generic failover module
On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > +static struct net_device *net_failover_get_bymac(u8 *mac, > + struct net_failover_ops **ops) > +{ > + struct net_device *failover_dev; > + struct net_failover *failover; > + > + spin_lock(&net_failover_lock); > + list_for_each_entry(failover, &net_failover_list, list) { > + failover_dev = rtnl_dereference(failover->failover_dev); > + if (ether_a...
2018 May 07
2
[PATCH net-next v10 2/4] net: Introduce generic failover module
On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > +static struct net_device *net_failover_get_bymac(u8 *mac, > + struct net_failover_ops **ops) > +{ > + struct net_device *failover_dev; > + struct net_failover *failover; > + > + spin_lock(&net_failover_lock); > + list_for_each_entry(failover, &net_failover_list, list) { > + failover_dev = rtnl_dereference(failover->failover_dev); > + if (ether_a...
2018 May 07
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
...file mode 100644 index 000000000000..221c2aff7531 --- /dev/null +++ b/include/net/net_failover.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018, Intel Corporation. */ + +#ifndef _NET_FAILOVER_H +#define _NET_FAILOVER_H + +#include <linux/netdevice.h> + +struct net_failover_ops { + int (*slave_register)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_unregister)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_link_change)(struct net_device *slave_dev, + struct net_device *failover_dev); +}; +...
2018 Apr 25
5
[PATCH net-next v8 0/4] Enable virtio_net to act as a standby for a passthru device
This is another update based on feedback from MST and Stephen on the last patchset. Hopefully this series can be integrated and any further enhancements can be made on top of this patchset. v8: - Made the failover managment routines more robust by updating the feature bits/other fields in the failover netdev when slave netdevs are registered/unregistered. (mst) - added support for handling
2018 May 07
9
[PATCH net-next v10 0/4] Enable virtio_net to act as a standby for a passthru device
...ied static ip and dhcp configurations using 'network' scripts and Network Manager. - To avoid dhcp requests to be sent over the lower 'standby' and 'primary' netdevs, ifcfg-xxx scripts for the lower devices can be created. - Build tested netvsc module. Updates: - fix net_failover_open() to update failover CARRIER correctly based on standby and primary states. - fix net_failover_handle_frame() to handle frames received on standby when primary is present. - replace netdev_upper_dev_link with netdev_master_upper_dev_link and handle lower dev state changes. - fix net_failve...
2018 May 08
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
On 5/7/2018 4:53 PM, Stephen Hemminger wrote: > On Mon, 7 May 2018 15:10:44 -0700 > Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > >> +static struct net_device *net_failover_get_bymac(u8 *mac, >> + struct net_failover_ops **ops) >> +{ >> + struct net_device *failover_dev; >> + struct net_failover *failover; >> + >> + spin_lock(&net_failover_lock); >> + list_for_each_entry(failover, &net_failover_list, list) { >> + failover_dev = rtnl_dereference(failover->failov...
2018 Apr 25
0
[PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...= get_netvsc_byref(vf_netdev); - if (!ndev) - return NOTIFY_DONE; - net_device_ctx = netdev_priv(ndev); cancel_delayed_work_sync(&net_device_ctx->vf_takeover); @@ -1993,6 +1937,12 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev) return NOTIFY_OK; } +static struct net_failover_ops netvsc_failover_ops = { + .slave_register = netvsc_register_vf, + .slave_unregister = netvsc_unregister_vf, + .slave_link_change = netvsc_vf_changed, +}; + static int netvsc_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) { @@ -2082,8 +2032,15 @@ static int netvsc_prob...
2018 May 07
0
[PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...= get_netvsc_byref(vf_netdev); - if (!ndev) - return NOTIFY_DONE; - net_device_ctx = netdev_priv(ndev); cancel_delayed_work_sync(&net_device_ctx->vf_takeover); @@ -1993,6 +1937,12 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev) return NOTIFY_OK; } +static struct net_failover_ops netvsc_failover_ops = { + .slave_register = netvsc_register_vf, + .slave_unregister = netvsc_unregister_vf, + .slave_link_change = netvsc_vf_changed, +}; + static int netvsc_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) { @@ -2082,8 +2032,15 @@ static int netvsc_prob...
2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
...if_vlan.h> +#include <linux/pci.h> +#include <net/sch_generic.h> +#include <uapi/linux/if_arp.h> +#include <net/net_failover.h> + +static bool net_failover_xmit_ready(struct net_device *dev) +{ + return netif_running(dev) && netif_carrier_ok(dev); +} + +static int net_failover_open(struct net_device *dev) +{ + struct net_failover_info *nfo_info = netdev_priv(dev); + struct net_device *primary_dev, *standby_dev; + int err; + + primary_dev = rtnl_dereference(nfo_info->primary_dev); + if (primary_dev) { + err = dev_open(primary_dev); + if (err) + goto err_primary_open;...
2018 May 22
7
[PATCH net-next v11 0/5] Enable virtio_net to act as a standby for a passthru device
...ied static ip and dhcp configurations using 'network' scripts and Network Manager. - To avoid dhcp requests to be sent over the lower 'standby' and 'primary' netdevs, ifcfg-xxx scripts for the lower devices can be created. - Build tested netvsc module. Updates: - fix net_failover_open() to update failover CARRIER correctly based on standby and primary states. - fix net_failover_handle_frame() to handle frames received on standby when primary is present. - replace netdev_upper_dev_link with netdev_master_upper_dev_link and handle lower dev state changes. - fix net_failve...
2018 May 24
11
[PATCH net-next v12 0/5] Enable virtio_net to act as a standby for a passthru device
...;failover' module that provides generic failover infrastructure to register a failover instance and listen for slave events. 2. 'net_failover' driver that provides APIs to create/destroy upper netdev and supports 3-netdev model used by virtio-net. - Added documentation v10: - fix net_failover_open() to update failover CARRIER correctly based on standby and primary states. - fix net_failover_handle_frame() to handle frames received on standby when primary is present. - replace netdev_upper_dev_link with netdev_master_upper_dev_link and handle lower dev state changes. - fix net_failve...