search for: failover_get_bymac

Displaying 12 results from an estimated 12 matches for "failover_get_bymac".

2018 May 24
0
[PATCH net-next v12 1/5] net: Introduce generic failover module
...ux/module.h> +#include <linux/etherdevice.h> +#include <uapi/linux/if_arp.h> +#include <linux/rtnetlink.h> +#include <linux/if_vlan.h> +#include <net/failover.h> + +static LIST_HEAD(failover_list); +static DEFINE_SPINLOCK(failover_lock); + +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) +{ + struct net_device *failover_dev; + struct failover *failover; + + spin_lock(&failover_lock); + list_for_each_entry(failover, &failover_list, list) { + failover_dev = rtnl_dereference(failover->failover_dev); + if (ether_addr_equal(failover_dev-&...
2018 May 25
2
[PATCH net-next v12 1/5] net: Introduce generic failover module
...hould be a mutex? > +int failover_slave_unregister(struct net_device *slave_dev) > +{ > + struct net_device *failover_dev; > + struct failover_ops *fops; > + > + if (!netif_is_failover_slave(slave_dev)) > + goto done; > + > + ASSERT_RTNL(); > + > + failover_dev = failover_get_bymac(slave_dev->perm_addr, &fops); > + if (!failover_dev) > + goto done; Since the slave device must have a master device set already, why not use that instead of searching by MAC address on unregister or link change.
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...ult_t failover_handle_frame(struct sk_buff **pskb) > +{ > + struct sk_buff *skb = *pskb; > + struct net_device *ndev = rcu_dereference(skb->dev->rx_handler_data); > + > + skb->dev = ndev; > + > + return RX_HANDLER_ANOTHER; > +} > + > +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) > +{ > + struct net_device *failover_dev; > + struct failover *failover; > + > + spin_lock(&failover_lock); > + list_for_each_entry(failover, &failover_list, list) { > + failover_dev = rtnl_dereference(failover->failover_dev); &gt...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...ult_t failover_handle_frame(struct sk_buff **pskb) > +{ > + struct sk_buff *skb = *pskb; > + struct net_device *ndev = rcu_dereference(skb->dev->rx_handler_data); > + > + skb->dev = ndev; > + > + return RX_HANDLER_ANOTHER; > +} > + > +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) > +{ > + struct net_device *failover_dev; > + struct failover *failover; > + > + spin_lock(&failover_lock); > + list_for_each_entry(failover, &failover_list, list) { > + failover_dev = rtnl_dereference(failover->failover_dev); &gt...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...led with rcu_read_lock + */ +static rx_handler_result_t failover_handle_frame(struct sk_buff **pskb) +{ + struct sk_buff *skb = *pskb; + struct net_device *ndev = rcu_dereference(skb->dev->rx_handler_data); + + skb->dev = ndev; + + return RX_HANDLER_ANOTHER; +} + +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) +{ + struct net_device *failover_dev; + struct failover *failover; + + spin_lock(&failover_lock); + list_for_each_entry(failover, &failover_list, list) { + failover_dev = rtnl_dereference(failover->failover_dev); + if (ether_addr_equal(failover_dev-&...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...ff **pskb) >> +{ >> + struct sk_buff *skb = *pskb; >> + struct net_device *ndev = rcu_dereference(skb->dev->rx_handler_data); >> + >> + skb->dev = ndev; >> + >> + return RX_HANDLER_ANOTHER; >> +} >> + >> +static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) >> +{ >> + struct net_device *failover_dev; >> + struct failover *failover; >> + >> + spin_lock(&failover_lock); >> + list_for_each_entry(failover, &failover_list, list) { >> + failover_dev = rtnl_dereference(fai...
2018 Apr 20
13
[PATCH net-next v7 0/4] Enable virtio_net to act as a standby for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a new feature bit VIRTIO_NET_F_STANDBY that can be used
2019 Mar 06
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
...m(slave_rename_ok, bool, (S_IRUGO | S_IWUSR)); >+MODULE_PARM_DESC(slave_rename_ok, >+ "If set allow renaming the slave when failover master is up"); No module parameters please. If you need to set something do it using rtnl_link_ops. Thanks. > > static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) > { >@@ -81,13 +86,15 @@ static int failover_slave_register(struct net_device *slave_dev) > } > > slave_dev->priv_flags |= IFF_FAILOVER_SLAVE; >+ if (slave_rename_ok) >+ slave_dev->priv_flags |= IFF_SLAVE_RENAME_OK; > > if (...
2019 Mar 05
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
..._SPINLOCK(failover_lock); > +static bool slave_rename_ok = true; > + > +module_param(slave_rename_ok, bool, (S_IRUGO | S_IWUSR)); > +MODULE_PARM_DESC(slave_rename_ok, > + "If set allow renaming the slave when failover master is up"); > > static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) > { > @@ -81,13 +86,15 @@ static int failover_slave_register(struct net_device *slave_dev) > } > > slave_dev->priv_flags |= IFF_FAILOVER_SLAVE; > + if (slave_rename_ok) > + slave_dev->priv_flags |= IFF_SLAVE_RENAME_OK; > &g...
2018 May 24
11
[PATCH net-next v12 0/5] Enable virtio_net to act as a standby for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a failover module that provides a generic interface for
2018 May 22
7
[PATCH net-next v11 0/5] Enable virtio_net to act as a standby for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a failover module that provides a generic interface for
2019 Mar 05
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
...slave_rename_ok = true; > > > + > > > +module_param(slave_rename_ok, bool, (S_IRUGO | S_IWUSR)); > > > +MODULE_PARM_DESC(slave_rename_ok, > > > + "If set allow renaming the slave when failover master is up"); > > > static struct net_device *failover_get_bymac(u8 *mac, struct failover_ops **ops) > > > { > > > @@ -81,13 +86,15 @@ static int failover_slave_register(struct net_device *slave_dev) > > > } > > > slave_dev->priv_flags |= IFF_FAILOVER_SLAVE; > > > + if (slave_rename_ok) > > > + sl...