search for: net_device_ctx

Displaying 20 results from an estimated 46 matches for "net_device_ctx".

2018 Apr 20
0
[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2018 Apr 10
0
[RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2018 May 24
0
[PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2011 Jun 06
3
[PATCH 1/3] Staging: hv: netvsc: Fix a bug in accounting transmit slots
...@@ -45,7 +46,7 @@ struct net_device_context { /* point back to our device context */ struct hv_device *device_ctx; - unsigned long avail; + atomic_t avail; struct delayed_work dwork; }; @@ -118,8 +119,9 @@ static void netvsc_xmit_completion(void *context) dev_kfree_skb_any(skb); - net_device_ctx->avail += num_pages; - if (net_device_ctx->avail >= PACKET_PAGES_HIWATER) + atomic_add(num_pages, &net_device_ctx->avail); + if (atomic_read(&net_device_ctx->avail) >= + PACKET_PAGES_HIWATER) netif_wake_queue(net); } } @@ -133,7 +135,7 @@ static int netvsc_st...
2011 Jun 06
3
[PATCH 1/3] Staging: hv: netvsc: Fix a bug in accounting transmit slots
...@@ -45,7 +46,7 @@ struct net_device_context { /* point back to our device context */ struct hv_device *device_ctx; - unsigned long avail; + atomic_t avail; struct delayed_work dwork; }; @@ -118,8 +119,9 @@ static void netvsc_xmit_completion(void *context) dev_kfree_skb_any(skb); - net_device_ctx->avail += num_pages; - if (net_device_ctx->avail >= PACKET_PAGES_HIWATER) + atomic_add(num_pages, &net_device_ctx->avail); + if (atomic_read(&net_device_ctx->avail) >= + PACKET_PAGES_HIWATER) netif_wake_queue(net); } } @@ -133,7 +135,7 @@ static int netvsc_st...
2018 May 22
0
[PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2018 May 07
0
[PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2018 Apr 25
0
[PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...sc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - struct net_device_context *net_device_ctx; - - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - net_device_ctx = netdev_priv(dev); - if (!rtnl_dereference(net_device_ctx->nvdev)) - continue; /* device is removed */ - - if (rtnl_dereference(net_device_ctx->vf_netdev) == vf_netdev) - return...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...x = container_of(w, struct net_device_context, work); + net = dev_get_drvdata(&ndev_ctx->device_ctx->device); + netif_notify_peers(net); +} + + static int netvsc_probe(struct device *device) { struct hv_driver *drv = @@ -353,6 +367,7 @@ static int netvsc_probe(struct device *device) net_device_ctx->device_ctx = device_obj; net_device_ctx->avail = ring_size; dev_set_drvdata(device, net); + INIT_WORK(&net_device_ctx->work, netvsc_send_garp); /* Notify the netvsc driver of the new device */ ret = net_drv_obj->base.dev_add(device_obj, &device_info); -- 1.6.3.2
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...x = container_of(w, struct net_device_context, work); + net = dev_get_drvdata(&ndev_ctx->device_ctx->device); + netif_notify_peers(net); +} + + static int netvsc_probe(struct device *device) { struct hv_driver *drv = @@ -353,6 +367,7 @@ static int netvsc_probe(struct device *device) net_device_ctx->device_ctx = device_obj; net_device_ctx->avail = ring_size; dev_set_drvdata(device, net); + INIT_WORK(&net_device_ctx->work, netvsc_send_garp); /* Notify the netvsc driver of the new device */ ret = net_drv_obj->base.dev_add(device_obj, &device_info); -- 1.6.3.2
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...point back to our device context */ - struct hyperv_device *device_ctx; + struct hyperv_device *device_obj; unsigned long avail; }; @@ -75,8 +75,8 @@ static void netvsc_set_multicast_list(struct net_device *net) static int netvsc_open(struct net_device *net) { - struct net_device_context *net_device_ctx = netdev_priv(net); - struct hyperv_device *device_obj = net_device_ctx->device_ctx; + struct net_device_context *net_device_obj = netdev_priv(net); + struct hyperv_device *device_obj = net_device_obj->device_obj; int ret = 0; if (netif_carrier_ok(net)) { @@ -98,8 +98,8 @@ static int ne...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...point back to our device context */ - struct hyperv_device *device_ctx; + struct hyperv_device *device_obj; unsigned long avail; }; @@ -75,8 +75,8 @@ static void netvsc_set_multicast_list(struct net_device *net) static int netvsc_open(struct net_device *net) { - struct net_device_context *net_device_ctx = netdev_priv(net); - struct hyperv_device *device_obj = net_device_ctx->device_ctx; + struct net_device_context *net_device_obj = netdev_priv(net); + struct hyperv_device *device_obj = net_device_obj->device_obj; int ret = 0; if (netif_carrier_ok(net)) { @@ -98,8 +98,8 @@ static int ne...
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 Apr 25
5
[PATCH net-next v8 0/4] Enable virtio_net to act as a standby for a passthru device
This is another update based on feedback from MST and Stephen on the last patchset. Hopefully this series can be integrated and any further enhancements can be made on top of this patchset. v8: - Made the failover managment routines more robust by updating the feature bits/other fields in the failover netdev when slave netdevs are registered/unregistered. (mst) - added support for handling
2018 Apr 10
6
[RFC PATCH net-next v6 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
2011 Feb 26
5
[PATCH 1/6] Staging: hv: Unify hyper-v device abstractions
...b/drivers/staging/hv/netvsc_drv.c index 03f9740..055986f 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -76,7 +76,7 @@ static void netvsc_set_multicast_list(struct net_device *net) static int netvsc_open(struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); - struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; + struct vm_device *device_obj = net_device_ctx->device_ctx; int ret = 0; if (netif_carrier_ok(net)) { @@ -99,7 +99,7 @@ static int netvsc_open(struct net_device *net) static int netvsc...
2011 Feb 26
5
[PATCH 1/6] Staging: hv: Unify hyper-v device abstractions
...b/drivers/staging/hv/netvsc_drv.c index 03f9740..055986f 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -76,7 +76,7 @@ static void netvsc_set_multicast_list(struct net_device *net) static int netvsc_open(struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); - struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; + struct vm_device *device_obj = net_device_ctx->device_ctx; int ret = 0; if (netif_carrier_ok(net)) { @@ -99,7 +99,7 @@ static int netvsc_open(struct net_device *net) static int netvsc...
2018 May 07
9
[PATCH net-next v10 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
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 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