search for: virtnet_config_changed

Displaying 20 results from an estimated 74 matches for "virtnet_config_changed".

2014 Oct 06
1
[PATCH 09/16] virtio-net: drop config_mutex
...irtio_net.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fa17afa..d80fef4 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) > netif_tx_stop_all_queues(vi->dev); > } > done: > - mutex_unlock(&vi->config_lock); > + return; > } > > static void virtnet_config_changed(struct virtio_device *vdev) I'd probably return directly in the remaining 'g...
2014 Oct 06
1
[PATCH 09/16] virtio-net: drop config_mutex
...irtio_net.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fa17afa..d80fef4 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) > netif_tx_stop_all_queues(vi->dev); > } > done: > - mutex_unlock(&vi->config_lock); > + return; > } > > static void virtnet_config_changed(struct virtio_device *vdev) I'd probably return directly in the remaining 'g...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...rtio_net.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fa17afa..d80fef4 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c [...] > @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) > netif_tx_stop_all_queues(vi->dev); > } > done: > - mutex_unlock(&vi->config_lock); > + return; There's no need for this *return*. > } > > static void virtnet_config_changed(struct virtio_device *vdev) WBR, Se...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...rtio_net.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fa17afa..d80fef4 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c [...] > @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) > netif_tx_stop_all_queues(vi->dev); > } > done: > - mutex_unlock(&vi->config_lock); > + return; There's no need for this *return*. > } > > static void virtnet_config_changed(struct virtio_device *vdev) WBR, Se...
2013 Dec 06
1
[PATCH 2/2] virtio: delete napi structures from netdev before releasing memory
...gt; drivers/net/virtio_net.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 930039a..c293764 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1367,6 +1367,11 @@ static void virtnet_config_changed(struct virtio_device *vdev) > > static void virtnet_free_queues(struct virtnet_info *vi) > { > + int i; > + > + for (i = 0; i < vi->max_queue_pairs; i++) > + netif_napi_del(&vi->rq[i].napi); > + > kfree(vi->rq); > kfree(vi->sq); > } Ack...
2013 Dec 06
1
[PATCH 2/2] virtio: delete napi structures from netdev before releasing memory
...gt; drivers/net/virtio_net.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 930039a..c293764 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1367,6 +1367,11 @@ static void virtnet_config_changed(struct virtio_device *vdev) > > static void virtnet_free_queues(struct virtnet_info *vi) > { > + int i; > + > + for (i = 0; i < vi->max_queue_pairs; i++) > + netif_napi_del(&vi->rq[i].napi); > + > kfree(vi->rq); > kfree(vi->sq); > } Ack...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...c | 47 ++++++++++++++++++++++++++++------------------- 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" }; +...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...c | 47 ++++++++++++++++++++++++++++------------------- 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" }; +...
2014 Nov 17
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
..."not advertised.\n", f); + } + } + } +} + static struct virtio_device_id id_table[] = { { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID }, { 0 }, @@ -1975,6 +2000,7 @@ static struct virtio_driver virtio_net_driver = { .probe = virtnet_probe, .remove = virtnet_remove, .config_changed = virtnet_config_changed, + .sanitize_features = virtnet_sanitize_features, #ifdef CONFIG_PM_SLEEP .freeze = virtnet_freeze, .restore = virtnet_restore, -- 1.9.1
2014 Nov 17
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
..."not advertised.\n", f); + } + } + } +} + static struct virtio_device_id id_table[] = { { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID }, { 0 }, @@ -1975,6 +2000,7 @@ static struct virtio_driver virtio_net_driver = { .probe = virtnet_probe, .remove = virtnet_remove, .config_changed = virtnet_config_changed, + .sanitize_features = virtnet_sanitize_features, #ifdef CONFIG_PM_SLEEP .freeze = virtnet_freeze, .restore = virtnet_restore, -- 1.9.1
2014 Nov 13
2
[PATCH 1/2] virito: introduce methods of fixing device features
Buggy host may advertised buggy host features (a usual case is that host advertise a feature whose dependencies were missed). In this case, driver should detect and disable the buggy features by itself. This patch introduces driver specific fix_features() method which is called just before features finalizing to detect and disable buggy features advertised by host. Virtio-net will be the first
2014 Nov 13
2
[PATCH 1/2] virito: introduce methods of fixing device features
Buggy host may advertised buggy host features (a usual case is that host advertise a feature whose dependencies were missed). In this case, driver should detect and disable the buggy features by itself. This patch introduces driver specific fix_features() method which is called just before features finalizing to detect and disable buggy features advertised by host. Virtio-net will be the first
2014 Nov 18
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...gt; static struct virtio_device_id id_table[] = { >> { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID }, >> { 0 }, >> @@ -1975,6 +2000,7 @@ static struct virtio_driver virtio_net_driver = { >> .probe = virtnet_probe, >> .remove = virtnet_remove, >> .config_changed = virtnet_config_changed, >> + .sanitize_features = virtnet_sanitize_features, >> #ifdef CONFIG_PM_SLEEP >> .freeze = virtnet_freeze, >> .restore = virtnet_restore, >> -- >> 1.9.1 > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >...
2014 Nov 18
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...gt; static struct virtio_device_id id_table[] = { >> { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID }, >> { 0 }, >> @@ -1975,6 +2000,7 @@ static struct virtio_driver virtio_net_driver = { >> .probe = virtnet_probe, >> .remove = virtnet_remove, >> .config_changed = virtnet_config_changed, >> + .sanitize_features = virtnet_sanitize_features, >> #ifdef CONFIG_PM_SLEEP >> .freeze = virtnet_freeze, >> .restore = virtnet_restore, >> -- >> 1.9.1 > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >...
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2014 Nov 17
4
[PATCH V3 1/2] virtio: introduce methods of sanitizing device features
Buggy host may advertised buggy host features (a usual case is that host advertise a feature whose dependencies were missed). In this case, driver should detect and disable the buggy features by itself. This patch introduces driver specific sanitize_features() method which is called just before features finalizing to detect and disable buggy features advertised by host. Virtio-net will be the
2014 Nov 17
4
[PATCH V3 1/2] virtio: introduce methods of sanitizing device features
Buggy host may advertised buggy host features (a usual case is that host advertise a feature whose dependencies were missed). In this case, driver should detect and disable the buggy features by itself. This patch introduces driver specific sanitize_features() method which is called just before features finalizing to detect and disable buggy features advertised by host. Virtio-net will be the
2013 Dec 05
0
[PATCH 2/2] virtio: delete napi structures from netdev before releasing memory
...agin <avagin at openvz.org> --- drivers/net/virtio_net.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 930039a..c293764 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1367,6 +1367,11 @@ static void virtnet_config_changed(struct virtio_device *vdev) static void virtnet_free_queues(struct virtnet_info *vi) { + int i; + + for (i = 0; i < vi->max_queue_pairs; i++) + netif_napi_del(&vi->rq[i].napi); + kfree(vi->rq); kfree(vi->sq); } -- 1.8.3.1
2014 Oct 05
0
[PATCH 09/16] virtio-net: drop config_mutex
...,9 +132,6 @@ struct virtnet_info { /* Work struct for config space updates */ struct work_struct config_work; - /* Lock for config space updates */ - struct mutex config_lock; - /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set; @@ -1404,7 +1401,6 @@ static void virtnet_config_changed_work(struct work_struct *work) container_of(work, struct virtnet_info, config_work); u16 v; - mutex_lock(&vi->config_lock); if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS, struct virtio_net_config, status, &v) < 0) goto done; @@ -1430,7 +1426,7 @@ static v...