search for: bypass_netdev

Displaying 20 results from an estimated 48 matches for "bypass_netdev".

2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...entifier: GPL-2.0 >+/* Copyright (c) 2018, Intel Corporation. */ >+ >+#ifndef _NET_BYPASS_H >+#define _NET_BYPASS_H >+ >+#include <linux/netdevice.h> >+ >+struct bypass_ops { >+ int (*slave_pre_register)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_join)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_pre_unregister)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_release)(struct net_device *slave_netdev, >+ struct...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...entifier: GPL-2.0 >+/* Copyright (c) 2018, Intel Corporation. */ >+ >+#ifndef _NET_BYPASS_H >+#define _NET_BYPASS_H >+ >+#include <linux/netdevice.h> >+ >+struct bypass_ops { >+ int (*slave_pre_register)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_join)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_pre_unregister)(struct net_device *slave_netdev, >+ struct net_device *bypass_netdev); >+ int (*slave_release)(struct net_device *slave_netdev, >+ struct...
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
..._read_unlock(); >> +} > This should be moved to bypass module. Sure. All these bypass ndo_ops can be moved to bypass module and any paravirtual driver that want to go with 3 netdev model can reuse these functions. > > >> + >> +static const struct net_device_ops virtnet_bypass_netdev_ops = { >> + .ndo_open = virtnet_bypass_open, >> + .ndo_stop = virtnet_bypass_close, >> + .ndo_start_xmit = virtnet_bypass_start_xmit, >> + .ndo_select_queue = virtnet_bypass_select_queue, >> + .ndo_get_stats64 = virtnet_bypass_get_stats, >> + .ndo_change_mtu...
2018 Apr 10
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...s.h @@ -0,0 +1,96 @@ +// 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 (*slave_pre_register)(struct net_device *slave_netdev, + struct net_device *bypass_netdev); + int (*slave_join)(struct net_device *slave_netdev, + struct net_device *bypass_netdev); + int (*slave_pre_unregister)(struct net_device *slave_netdev, + struct net_device *bypass_netdev); + int (*slave_release)(struct net_device *slave_netdev, + struct net_device *bypass_netde...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...> > static int napi_weight = NAPI_POLL_WEIGHT; > module_param(napi_weight, int, 0444); >@@ -206,6 +209,9 @@ struct virtnet_info { > u32 speed; > > unsigned long guest_offloads; >+ >+ /* upper netdev created when BACKUP feature enabled */ >+ struct net_device __rcu *bypass_netdev; > }; > > struct padded_vnet_hdr { >@@ -2275,6 +2281,22 @@ static int virtnet_xdp(struct net_device *dev, struct netdev_bpf *xdp) > } > } > >+static int virtnet_get_phys_port_name(struct net_device *dev, char *buf, >+ size_t len) >+{ >+ struct virtnet_in...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...> > static int napi_weight = NAPI_POLL_WEIGHT; > module_param(napi_weight, int, 0444); >@@ -206,6 +209,9 @@ struct virtnet_info { > u32 speed; > > unsigned long guest_offloads; >+ >+ /* upper netdev created when BACKUP feature enabled */ >+ struct net_device __rcu *bypass_netdev; > }; > > struct padded_vnet_hdr { >@@ -2275,6 +2281,22 @@ static int virtnet_xdp(struct net_device *dev, struct netdev_bpf *xdp) > } > } > >+static int virtnet_get_phys_port_name(struct net_device *dev, char *buf, >+ size_t len) >+{ >+ struct virtnet_in...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t; > +#ifndef _NET_BYPASS_H >> > +#define _NET_BYPASS_H >> > + >> > +#include <linux/netdevice.h> >> > + >> > +struct bypass_ops { >> > + int (*slave_pre_register)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_join)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_release)(str...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t; > +#ifndef _NET_BYPASS_H >> > +#define _NET_BYPASS_H >> > + >> > +#include <linux/netdevice.h> >> > + >> > +struct bypass_ops { >> > + int (*slave_pre_register)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_join)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> > + struct net_device *bypass_netdev); >> > + int (*slave_release)(str...
2018 Apr 11
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...Intel Corporation. */ >> + >> +#ifndef _NET_BYPASS_H >> +#define _NET_BYPASS_H >> + >> +#include <linux/netdevice.h> >> + >> +struct bypass_ops { >> + int (*slave_pre_register)(struct net_device *slave_netdev, >> + struct net_device *bypass_netdev); >> + int (*slave_join)(struct net_device *slave_netdev, >> + struct net_device *bypass_netdev); >> + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> + struct net_device *bypass_netdev); >> + int (*slave_release)(struct net_device *slave_net...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...YPASS_H >> > > > + >> > > > +#include <linux/netdevice.h> >> > > > + >> > > > +struct bypass_ops { >> > > > + int (*slave_pre_register)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev); >> > > > + int (*slave_join)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev); >> > > > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev);...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...YPASS_H >> > > > + >> > > > +#include <linux/netdevice.h> >> > > > + >> > > > +struct bypass_ops { >> > > > + int (*slave_pre_register)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev); >> > > > + int (*slave_join)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev); >> > > > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> > > > + struct net_device *bypass_netdev);...
2018 Apr 06
1
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...gt;+#ifndef _NET_BYPASS_H >+#define _NET_BYPASS_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 *chil...
2018 Apr 10
6
[RFC PATCH net-next v6 0/4] Enable virtio_net to act as a backup for a passthru device
...lter on the VF and plugs it back to the guest to switch over to VF datapath. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 v6 RFC: Simplified virtio_net changes by moving all the ndo_ops of the bypass_netdev and create/destroy of bypass_netdev to 'bypass' module. avoided 2 phase registration(driver + instances). introduced IFF_BYPASS/IFF_BYPASS_SLAVE dev->priv_flags replaced mutex with a spinlock v5 RFC: Based on Jiri's comments, moved the common functionality to a 'bypass&...
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 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...dp.h> +#include <net/bypass.h> static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); @@ -206,6 +209,9 @@ struct virtnet_info { u32 speed; unsigned long guest_offloads; + + /* upper netdev created when BACKUP feature enabled */ + struct net_device __rcu *bypass_netdev; }; struct padded_vnet_hdr { @@ -2275,6 +2281,22 @@ static int virtnet_xdp(struct net_device *dev, struct netdev_bpf *xdp) } } +static int virtnet_get_phys_port_name(struct net_device *dev, char *buf, + size_t len) +{ + struct virtnet_info *vi = netdev_priv(dev); + int ret; + + if...
2018 Apr 05
0
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...2f951a --- /dev/null +++ b/include/net/bypass.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, +...
2018 Apr 18
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
..._BYPASS_H >>>> +#define _NET_BYPASS_H >>>> + >>>> +#include <linux/netdevice.h> >>>> + >>>> +struct bypass_ops { >>>> + int (*slave_pre_register)(struct net_device *slave_netdev, >>>> + struct net_device *bypass_netdev); >>>> + int (*slave_join)(struct net_device *slave_netdev, >>>> + struct net_device *bypass_netdev); >>>> + int (*slave_pre_unregister)(struct net_device *slave_netdev, >>>> + struct net_device *bypass_netdev); >>>> + int (*sla...
2018 Apr 18
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...; > + > >> > > > +#include <linux/netdevice.h> > >> > > > + > >> > > > +struct bypass_ops { > >> > > > + int (*slave_pre_register)(struct net_device *slave_netdev, > >> > > > + struct net_device *bypass_netdev); > >> > > > + int (*slave_join)(struct net_device *slave_netdev, > >> > > > + struct net_device *bypass_netdev); > >> > > > + int (*slave_pre_unregister)(struct net_device *slave_netdev, > >> > > > + struct net_devi...
2018 Apr 18
4
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t;> > > > +#include <linux/netdevice.h> >> >> > > > + >> >> > > > +struct bypass_ops { >> >> > > > + int (*slave_pre_register)(struct net_device *slave_netdev, >> >> > > > + struct net_device *bypass_netdev); >> >> > > > + int (*slave_join)(struct net_device *slave_netdev, >> >> > > > + struct net_device *bypass_netdev); >> >> > > > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> >> > > > +...
2018 Apr 18
4
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t;> > > > +#include <linux/netdevice.h> >> >> > > > + >> >> > > > +struct bypass_ops { >> >> > > > + int (*slave_pre_register)(struct net_device *slave_netdev, >> >> > > > + struct net_device *bypass_netdev); >> >> > > > + int (*slave_join)(struct net_device *slave_netdev, >> >> > > > + struct net_device *bypass_netdev); >> >> > > > + int (*slave_pre_unregister)(struct net_device *slave_netdev, >> >> > > > +...