search for: bypass_mutex

Displaying 3 results from an estimated 3 matches for "bypass_mutex".

2018 Apr 06
1
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...include <linux/netpoll.h> >+#include <linux/rtnetlink.h> >+#include <linux/if_vlan.h> >+#include <net/sch_generic.h> >+#include <uapi/linux/if_arp.h> >+#include <net/bypass.h> >+ >+static LIST_HEAD(bypass_list); >+ >+static DEFINE_MUTEX(bypass_mutex); Why mutex? Apparently you don't need to sleep while holding a lock. Simple spinlock would do. >+ >+struct bypass_instance *bypass_instance_alloc(struct net_device *dev) >+{ >+ struct bypass_instance *bypass_instance; >+ >+ bypass_instance = kzalloc(sizeof(*bypass_instance...
2018 Apr 05
0
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...include <linux/netdevice.h> +#include <linux/netpoll.h> +#include <linux/rtnetlink.h> +#include <linux/if_vlan.h> +#include <net/sch_generic.h> +#include <uapi/linux/if_arp.h> +#include <net/bypass.h> + +static LIST_HEAD(bypass_list); + +static DEFINE_MUTEX(bypass_mutex); + +struct bypass_instance *bypass_instance_alloc(struct net_device *dev) +{ + struct bypass_instance *bypass_instance; + + bypass_instance = kzalloc(sizeof(*bypass_instance), GFP_KERNEL); + if (!bypass_instance) + return NULL; + + dev_hold(dev); + rcu_assign_pointer(bypass_instance->bypass_ne...
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