search for: child_netdev

Displaying 20 results from an estimated 29 matches for "child_netdev".

2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...r_ok(dev); +} + static void virtnet_config_changed_work(struct work_struct *work) { struct virtnet_info *vi = @@ -2647,6 +2677,601 @@ static int virtnet_validate(struct virtio_device *vdev) return 0; } +static void +virtnet_bypass_child_open(struct net_device *dev, + struct net_device *child_netdev) +{ + int err = dev_open(child_netdev); + + if (err) + netdev_warn(dev, "unable to open slave: %s: %d\n", + child_netdev->name, err); +} + +static int virtnet_bypass_open(struct net_device *dev) +{ + struct virtnet_bypass_info *vbi = netdev_priv(dev); + struct net_device *child_...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...turn 0; >+ >+err_backup_open: >+ dev_close(active_netdev); >+err_active_open: >+ netif_tx_disable(dev); >+ return err; >+} >+ >+static int virtnet_bypass_close(struct net_device *dev) >+{ >+ struct virtnet_bypass_info *vi = netdev_priv(dev); >+ struct net_device *child_netdev; >+ >+ netif_tx_disable(dev); >+ >+ child_netdev = rtnl_dereference(vi->active_netdev); >+ if (child_netdev) >+ dev_close(child_netdev); >+ >+ child_netdev = rtnl_dereference(vi->backup_netdev); >+ if (child_netdev) >+ dev_close(child_netdev); This should be m...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...turn 0; >+ >+err_backup_open: >+ dev_close(active_netdev); >+err_active_open: >+ netif_tx_disable(dev); >+ return err; >+} >+ >+static int virtnet_bypass_close(struct net_device *dev) >+{ >+ struct virtnet_bypass_info *vi = netdev_priv(dev); >+ struct net_device *child_netdev; >+ >+ netif_tx_disable(dev); >+ >+ child_netdev = rtnl_dereference(vi->active_netdev); >+ if (child_netdev) >+ dev_close(child_netdev); >+ >+ child_netdev = rtnl_dereference(vi->backup_netdev); >+ if (child_netdev) >+ dev_close(child_netdev); This should be m...
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...o wrote: > Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: <snip> > >> + >> +static void virtnet_bypass_set_rx_mode(struct net_device *dev) >> +{ >> + struct virtnet_bypass_info *vbi = netdev_priv(dev); >> + struct net_device *child_netdev; >> + >> + rcu_read_lock(); >> + >> + child_netdev = rcu_dereference(vbi->active_netdev); >> + if (child_netdev) { >> + dev_uc_sync_multiple(child_netdev, dev); >> + dev_mc_sync_multiple(child_netdev, dev); >> + } >> + >> + child_netd...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...+ if (err) + goto err_backup_open; + } + + return 0; + +err_backup_open: + dev_close(active_netdev); +err_active_open: + netif_tx_disable(dev); + return err; +} + +static int virtnet_bypass_close(struct net_device *dev) +{ + struct virtnet_bypass_info *vi = netdev_priv(dev); + struct net_device *child_netdev; + + netif_tx_disable(dev); + + child_netdev = rtnl_dereference(vi->active_netdev); + if (child_netdev) + dev_close(child_netdev); + + child_netdev = rtnl_dereference(vi->backup_netdev); + if (child_netdev) + dev_close(child_netdev); + + return 0; +} + +static netdev_tx_t virtnet_bypass_dro...
2018 Apr 05
6
[RFC PATCH net-next v5 0/4] Enable virtio_net to act as a backup 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_BACKUP that can be used
2018 Apr 06
1
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...SS_H >+ >+#include <linux/netdevice.h> >+ >+struct bypass_ops { Perhaps "net_bypass_" would be better prefix for this module structs and functions. No strong opinion though. >+ int (*register_child)(struct net_device *bypass_netdev, >+ struct net_device *child_netdev); We have master/slave upper/lower netdevices. This adds "child". Consider using some existing names. Not sure if possible without loss of meaning. >+ int (*join_child)(struct net_device *bypass_netdev, >+ struct net_device *child_netdev); >+ int (*unregister_child)(struct...
2018 Apr 05
0
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...s.h @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2018, Intel Corporation. */ + +#ifndef _NET_BYPASS_H +#define _NET_BYPASS_H + +#include <linux/netdevice.h> + +struct bypass_ops { + int (*register_child)(struct net_device *bypass_netdev, + struct net_device *child_netdev); + int (*join_child)(struct net_device *bypass_netdev, + struct net_device *child_netdev); + int (*unregister_child)(struct net_device *bypass_netdev, + struct net_device *child_netdev); + int (*release_child)(struct net_device *bypass_netdev, + struct net_device *child_netdev); + in...
2018 Feb 17
1
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...om> > +static void > +virtnet_bypass_get_stats(struct net_device *dev, > + struct rtnl_link_stats64 *stats) > +{ > + struct virtnet_bypass_info *vbi = netdev_priv(dev); > + const struct rtnl_link_stats64 *new; > + struct rtnl_link_stats64 temp; > + struct net_device *child_netdev; > + > + spin_lock(&vbi->stats_lock); > + memcpy(stats, &vbi->bypass_stats, sizeof(*stats)); > + > + rcu_read_lock(); > + > + child_netdev = rcu_dereference(vbi->active_netdev); > + if (child_netdev) { > + new = dev_get_stats(child_netdev, &temp); &g...
2018 Apr 09
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...dhar.samudrala at intel.com wrote: >On 4/6/2018 5:48 AM, Jiri Pirko wrote: >> Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: [...] >> > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > + struct net_device *child_netdev) >> > +{ >> > + struct virtnet_bypass_info *vbi; >> > + bool backup; >> > + >> > + vbi = netdev_priv(bypass_netdev); >> > + backup = (child_netdev->dev.parent == bypass_netdev->dev.parent); >> > + if (backup ? rtnl_dereference(vbi...
2018 Apr 09
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...dhar.samudrala at intel.com wrote: >On 4/6/2018 5:48 AM, Jiri Pirko wrote: >> Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: [...] >> > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > + struct net_device *child_netdev) >> > +{ >> > + struct virtnet_bypass_info *vbi; >> > + bool backup; >> > + >> > + vbi = netdev_priv(bypass_netdev); >> > + backup = (child_netdev->dev.parent == bypass_netdev->dev.parent); >> > + if (backup ? rtnl_dereference(vbi...
2018 Apr 10
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...018 5:48 AM, Jiri Pirko wrote: >> > > Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: >> [...] >> >> > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > + struct net_device *child_netdev) >> > > > +{ >> > > > + struct virtnet_bypass_info *vbi; >> > > > + bool backup; >> > > > + >> > > > + vbi = netdev_priv(bypass_netdev); >> > > > + backup = (child_netdev->dev.parent == bypass_netdev->de...
2018 Apr 10
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...018 5:48 AM, Jiri Pirko wrote: >> > > Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: >> [...] >> >> > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > + struct net_device *child_netdev) >> > > > +{ >> > > > + struct virtnet_bypass_info *vbi; >> > > > + bool backup; >> > > > + >> > > > + vbi = netdev_priv(bypass_netdev); >> > > > + backup = (child_netdev->dev.parent == bypass_netdev->de...
2018 Apr 10
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...> > Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: >> > > [...] >> > > >> > > > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > > > + struct net_device *child_netdev) >> > > > > > +{ >> > > > > > + struct virtnet_bypass_info *vbi; >> > > > > > + bool backup; >> > > > > > + >> > > > > > + vbi = netdev_priv(bypass_netdev); >> > > > > > + b...
2018 Apr 10
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...> > Thu, Apr 05, 2018 at 11:08:22PM CEST, sridhar.samudrala at intel.com wrote: >> > > [...] >> > > >> > > > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > > > + struct net_device *child_netdev) >> > > > > > +{ >> > > > > > + struct virtnet_bypass_info *vbi; >> > > > > > + bool backup; >> > > > > > + >> > > > > > + vbi = netdev_priv(bypass_netdev); >> > > > > > + b...
2018 Apr 10
3
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...M CEST, sridhar.samudrala at intel.com wrote: >> > > > > [...] >> > > > > >> > > > > > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > > > > > + struct net_device *child_netdev) >> > > > > > > > +{ >> > > > > > > > + struct virtnet_bypass_info *vbi; >> > > > > > > > + bool backup; >> > > > > > > > + >> > > > > > > > + vbi = netdev_priv(byp...
2018 Apr 10
3
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...M CEST, sridhar.samudrala at intel.com wrote: >> > > > > [...] >> > > > > >> > > > > > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > > > > > + struct net_device *child_netdev) >> > > > > > > > +{ >> > > > > > > > + struct virtnet_bypass_info *vbi; >> > > > > > > > + bool backup; >> > > > > > > > + >> > > > > > > > + vbi = netdev_priv(byp...
2018 Apr 11
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...rote: >> > > > > > > [...] >> > > > > > > >> > > > > > > > > > +static int virtnet_bypass_join_child(struct net_device *bypass_netdev, >> > > > > > > > > > + struct net_device *child_netdev) >> > > > > > > > > > +{ >> > > > > > > > > > + struct virtnet_bypass_info *vbi; >> > > > > > > > > > + bool backup; >> > > > > > > > > > + >> > > > &gt...