search for: failover_ops

Displaying 19 results from an estimated 19 matches for "failover_ops".

2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...-- /dev/null > +++ b/include/net/failover.h > @@ -0,0 +1,96 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (c) 2018, Intel Corporation. */ > + > +#ifndef _NET_FAILOVER_H > +#define _NET_FAILOVER_H > + > +#include <linux/netdevice.h> > + > +struct failover_ops { > + int (*slave_pre_register)(struct net_device *slave_dev, > + struct net_device *failover_dev); > + int (*slave_join)(struct net_device *slave_dev, > + struct net_device *failover_dev); > + int (*slave_pre_unregister)(struct net_device *slave_dev, > + struct ne...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...-- /dev/null > +++ b/include/net/failover.h > @@ -0,0 +1,96 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (c) 2018, Intel Corporation. */ > + > +#ifndef _NET_FAILOVER_H > +#define _NET_FAILOVER_H > + > +#include <linux/netdevice.h> > + > +struct failover_ops { > + int (*slave_pre_register)(struct net_device *slave_dev, > + struct net_device *failover_dev); > + int (*slave_join)(struct net_device *slave_dev, > + struct net_device *failover_dev); > + int (*slave_pre_unregister)(struct net_device *slave_dev, > + struct ne...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...new file mode 100644 index 000000000000..0b8601043d90 --- /dev/null +++ b/include/net/failover.h @@ -0,0 +1,96 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018, Intel Corporation. */ + +#ifndef _NET_FAILOVER_H +#define _NET_FAILOVER_H + +#include <linux/netdevice.h> + +struct failover_ops { + int (*slave_pre_register)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_join)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_pre_unregister)(struct net_device *slave_dev, + struct net_device *failover_dev); + int...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...over.h >> @@ -0,0 +1,96 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* Copyright (c) 2018, Intel Corporation. */ >> + >> +#ifndef _NET_FAILOVER_H >> +#define _NET_FAILOVER_H >> + >> +#include <linux/netdevice.h> >> + >> +struct failover_ops { >> + int (*slave_pre_register)(struct net_device *slave_dev, >> + struct net_device *failover_dev); >> + int (*slave_join)(struct net_device *slave_dev, >> + struct net_device *failover_dev); >> + int (*slave_pre_unregister)(struct net_device *slave_dev, &gt...
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
2018 May 24
0
[PATCH net-next v12 1/5] net: Introduce generic failover module
...lover.h new file mode 100644 index 000000000000..bb15438f39c7 --- /dev/null +++ b/include/net/failover.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018, Intel Corporation. */ + +#ifndef _FAILOVER_H +#define _FAILOVER_H + +#include <linux/netdevice.h> + +struct failover_ops { + int (*slave_pre_register)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_register)(struct net_device *slave_dev, + struct net_device *failover_dev); + int (*slave_pre_unregister)(struct net_device *slave_dev, + struct net_device *failover_dev...
2018 Apr 22
1
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...ce *standby_dev, > + struct failover **pfailover); Should we rename all these structs net_failover? It's possible to extend the concept to storage I think. > +void failover_destroy(struct failover *failover); > + > +int failover_register(struct net_device *standby_dev, struct failover_ops *ops, > + struct failover **pfailover); > +void failover_unregister(struct failover *failover); > + > +int failover_slave_unregister(struct net_device *slave_dev); > + > +#else > + > +static inline > +int failover_create(struct net_device *standby_dev, > +...
2018 May 25
2
[PATCH net-next v12 1/5] net: Introduce generic failover module
...0700 Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > + spin_lock(&failover_lock); Since register is not in fast path, this should 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 alrea...
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
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
2019 Mar 06
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
...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 (fops && fops->slav...
2018 May 22
0
[PATCH net-next v11 2/5] 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); @@ -1994,6 +1938,12 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev) return NOTIFY_OK; } +static struct 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) { @@ -2083,8 +2033,14 @@ static int netvsc_probe...
2019 Mar 05
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
...tic 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; > > if (fops && fops...
2019 Mar 05
0
[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
...gt; + > > > +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...
2018 Apr 20
0
[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...evice *ndev) +{ + struct net_device_context *net_device_ctx; + + net_device_ctx = netdev_priv(ndev); + if (vf_netdev != rtnl_dereference(net_device_ctx->vf_netdev)) + return -EINVAL; + + netdev_info(ndev, "VF unregistering: %s\n", vf_netdev->name); + + return 0; +} + +static struct failover_ops netvsc_failover_ops = { + .slave_pre_register = netvsc_vf_pre_register, + .slave_join = netvsc_vf_join, + .slave_pre_unregister = netvsc_vf_pre_unregister, + .slave_release = netvsc_vf_release, + .slave_link_change = netvsc_vf_changed, + .handle_frame = netvsc_vf_handle_frame, +}; + static int...
2018 May 24
0
[PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...+ netdev_info(ndev, "VF unregistering: %s\n", vf_netdev->name); - netdev_rx_handler_unregister(vf_netdev); - netdev_upper_dev_unlink(vf_netdev, ndev); RCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL); dev_put(vf_netdev); - return NOTIFY_OK; + return 0; } +static struct failover_ops netvsc_failover_ops = { + .slave_pre_register = netvsc_pre_register_vf, + .slave_register = netvsc_register_vf, + .slave_pre_unregister = netvsc_pre_unregister_vf, + .slave_unregister = netvsc_unregister_vf, + .slave_link_change = netvsc_vf_changed, + .slave_handle_frame = netvsc_vf_handle_frame,...
2018 Apr 20
6
[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework
On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala <sridhar.samudrala at intel.com> Do what you want to other devices but leave netvsc alone. Adding these failover ops does not reduce the code
2018 Apr 20
6
[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework
On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala <sridhar.samudrala at intel.com> wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala <sridhar.samudrala at intel.com> Do what you want to other devices but leave netvsc alone. Adding these failover ops does not reduce the code
2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
...standby_dev); + + if (slave_dev != primary_dev && slave_dev != standby_dev) + goto done; + + /* We need to bring up the slave after the rename by udev in case + * open failed with EBUSY when it was registered. + */ + dev_open(slave_dev); + +done: + return NOTIFY_DONE; +} + +static struct failover_ops net_failover_ops = { + .slave_register = net_failover_slave_register, + .slave_unregister = net_failover_slave_unregister, + .slave_link_change = net_failover_slave_link_change, + .slave_name_change = net_failover_slave_name_change, +}; + +/** + * net_failover_create - Create and register a failov...