search for: virtnet_update_status

Displaying 20 results from an estimated 26 matches for "virtnet_update_status".

2012 Apr 12
2
[net-next V7 PATCH] virtio-net: send gratuitous packets when needed
..._warn(&vi->dev->dev, "Failed to ack link announce.\n"); + rtnl_unlock(); +} + static int virtnet_close(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -952,20 +971,31 @@ static const struct net_device_ops virtnet_netdev = { #endif }; -static void virtnet_update_status(struct virtnet_info *vi) +static void virtnet_config_changed_work(struct work_struct *work) { + struct virtnet_info *vi = + container_of(work, struct virtnet_info, config_work); u16 v; + mutex_lock(&vi->config_lock); + if (!vi->config_enable) + goto done; + if (virtio_config_val(...
2012 Apr 12
2
[net-next V7 PATCH] virtio-net: send gratuitous packets when needed
..._warn(&vi->dev->dev, "Failed to ack link announce.\n"); + rtnl_unlock(); +} + static int virtnet_close(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -952,20 +971,31 @@ static const struct net_device_ops virtnet_netdev = { #endif }; -static void virtnet_update_status(struct virtnet_info *vi) +static void virtnet_config_changed_work(struct work_struct *work) { + struct virtnet_info *vi = + container_of(work, struct virtnet_info, config_work); u16 v; + mutex_lock(&vi->config_lock); + if (!vi->config_enable) + goto done; + if (virtio_config_val(...
2012 Mar 13
1
[V4 PATCH] virtio-net: send gratuitous packet when needed
.../* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ANNOUNCE)) + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +974,23 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + vi->v...
2012 Mar 13
1
[V4 PATCH] virtio-net: send gratuitous packet when needed
.../* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ANNOUNCE)) + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +974,23 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + vi->v...
2012 Mar 28
2
[V6 PATCH] virtio-net: send gratuitous packets when needed
...t net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); /* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +983,17 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + if (v &a...
2012 Mar 28
2
[V6 PATCH] virtio-net: send gratuitous packets when needed
...t net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); /* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +983,17 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + if (v &a...
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve optional values from the config space. Cc: Amit Shah <amit.shah at redhat.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: virtualization at
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve optional values from the config space. Cc: Amit Shah <amit.shah at redhat.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: virtualization at
2012 Mar 16
1
[V5 PATCH] virtio-net: send gratuitous packets when needed
...@ -787,6 +797,7 @@ static int virtnet_close(struct net_device *dev) /* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +973,22 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + vi->v...
2012 Mar 16
1
[V5 PATCH] virtio-net: send gratuitous packets when needed
...@ -787,6 +797,7 @@ static int virtnet_close(struct net_device *dev) /* Make sure refill_work doesn't re-enable napi! */ cancel_delayed_work_sync(&vi->refill); + cancel_work_sync(&vi->announce); napi_disable(&vi->napi); return 0; @@ -962,11 +973,22 @@ static void virtnet_update_status(struct virtnet_info *vi) return; /* Ignore unknown (future) status bits */ - v &= VIRTIO_NET_S_LINK_UP; + v &= VIRTIO_NET_S_LINK_UP | VIRTIO_NET_S_ANNOUNCE; if (vi->status == v) return; + if (v & VIRTIO_NET_S_ANNOUNCE) { + v &= ~VIRTIO_NET_S_ANNOUNCE; + vi->v...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...--- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1b67e8a..ec8c400 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -966,15 +966,38 @@ static void virtnet_config_changed(struct virtio_device *vdev) virtnet_update_status(vi); } +static int init_vqs(struct virtnet_info *vi) +{ + struct virtqueue *vqs[3]; + vq_callback_t *callbacks[] = { skb_recv_done, skb_xmit_done, NULL}; + const char *names[] = { "input", "output", "control" }; + int nvqs, err; + + /* We expect two virtqueues, rece...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...--- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1b67e8a..ec8c400 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -966,15 +966,38 @@ static void virtnet_config_changed(struct virtio_device *vdev) virtnet_update_status(vi); } +static int init_vqs(struct virtnet_info *vi) +{ + struct virtqueue *vqs[3]; + vq_callback_t *callbacks[] = { skb_recv_done, skb_xmit_done, NULL}; + const char *names[] = { "input", "output", "control" }; + int nvqs, err; + + /* We expect two virtqueues, rece...
2011 Nov 17
12
[PATCH v3 00/11] virtio: S4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. * virtio-console:
2011 Nov 17
12
[PATCH v3 00/11] virtio: S4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. * virtio-console:
2011 Dec 22
12
[PATCH v6 00/11] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. 'dd
2011 Dec 22
12
[PATCH v6 00/11] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. 'dd
2011 Dec 15
12
[PATCH v5 00/11] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. Michael saw some race in virtio-net module removal which will need a similar fix for the freeze code as well. I'll update the virtio-net patch with that fix once the fix is settled upon and applied. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit
2011 Dec 15
12
[PATCH v5 00/11] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. Michael saw some race in virtio-net module removal which will need a similar fix for the freeze code as well. I'll update the virtio-net patch with that fix once the fix is settled upon and applied. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit
2011 Dec 06
17
[PATCH v4 00/12] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. 'dd
2011 Dec 06
17
[PATCH v4 00/12] virtio: s4 support
Hi, These patches add support for S4 to virtio (pci) and all drivers. For each driver, all vqs are removed before hibernation, and then re-created after restore. Some driver-specific uninit and init work is also done in the freeze and restore functions. All the drivers in testing work fine: * virtio-blk is used for the only disk in the VM, IO works fine before and after. 'dd