search for: virtnet_receive

Displaying 20 results from an estimated 126 matches for "virtnet_receive".

2017 Apr 06
2
[bug report] virtio_net: rework mergeable buffer handling
Hello Michael S. Tsirkin, The patch 6c8e5f3c41c8: "virtio_net: rework mergeable buffer handling" from Mar 6, 2017, leads to the following static checker warning: drivers/net/virtio_net.c:1042 virtnet_receive() error: uninitialized symbol 'ctx'. drivers/net/virtio_net.c 1030 static int virtnet_receive(struct receive_queue *rq, int budget) 1031 { 1032 struct virtnet_info *vi = rq->vq->vdev->priv; 1033 unsigned int len, received = 0, bytes = 0; 1034...
2017 Apr 06
2
[bug report] virtio_net: rework mergeable buffer handling
Hello Michael S. Tsirkin, The patch 6c8e5f3c41c8: "virtio_net: rework mergeable buffer handling" from Mar 6, 2017, leads to the following static checker warning: drivers/net/virtio_net.c:1042 virtnet_receive() error: uninitialized symbol 'ctx'. drivers/net/virtio_net.c 1030 static int virtnet_receive(struct receive_queue *rq, int budget) 1031 { 1032 struct virtnet_info *vi = rq->vq->vdev->priv; 1033 unsigned int len, received = 0, bytes = 0; 1034...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
Commit 5b8f3c8d30a6 ("virtio_net: Add XDP related stats") tries to count TX XDP stats in virtnet_receive(). This will cause several issues: - virtnet_xdp_sq() was called without checking whether or not XDP is set. This may cause out of bound access when there's no enough txq for XDP. - Stats were updated even if there's no XDP/XDP_TX. Fixing this by reusing virtnet_xdp_xmit() for XDP_TX...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
Commit 5b8f3c8d30a6 ("virtio_net: Add XDP related stats") tries to count TX XDP stats in virtnet_receive(). This will cause several issues: - virtnet_xdp_sq() was called without checking whether or not XDP is set. This may cause out of bound access when there's no enough txq for XDP. - Stats were updated even if there's no XDP/XDP_TX. Fixing this by reusing virtnet_xdp_xmit() for XDP_TX...
2019 Jul 23
2
[PATCH] virtio-net: parameterize min ring num_free for virtio receive
...;> >>> ??? ??? ??? printf("index: %d, num free: %d\n", i, recentfree[$vq, i]) >>> ??? ??? ??? //exit() >>> ??? ??? } >>> ??? } >>> } >>> >>> >>> probe >>> module("virtio_net").statement("virtnet_receive at drivers/net/virtio_net.c:732") >>> { >>> ??? recentfreecount++ >>> ??? recentfreecount = recentfreecount % 5 >>> ??? recentfree[$rq->vq, recentfreecount] = $rq->vq->num_free ---> >>> record the num_free for the last 5 calls to virt...
2019 Jul 23
2
[PATCH] virtio-net: parameterize min ring num_free for virtio receive
...;> >>> ??? ??? ??? printf("index: %d, num free: %d\n", i, recentfree[$vq, i]) >>> ??? ??? ??? //exit() >>> ??? ??? } >>> ??? } >>> } >>> >>> >>> probe >>> module("virtio_net").statement("virtnet_receive at drivers/net/virtio_net.c:732") >>> { >>> ??? recentfreecount++ >>> ??? recentfreecount = recentfreecount % 5 >>> ??? recentfree[$rq->vq, recentfreecount] = $rq->vq->num_free ---> >>> record the num_free for the last 5 calls to virt...
2017 Sep 19
0
[PATCH net-next 3/3] virtio-net: support XDP_REDIRECT
...ts) skb = receive_big(dev, vi, rq, buf, len); else - skb = receive_small(dev, vi, rq, buf, ctx, len); + skb = receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit); if (unlikely(!skb)) return 0; @@ -1071,7 +1112,7 @@ static void refill_work(struct work_struct *work) } } -static int virtnet_receive(struct receive_queue *rq, int budget) +static int virtnet_receive(struct receive_queue *rq, int budget, bool *xdp_xmit) { struct virtnet_info *vi = rq->vq->vdev->priv; unsigned int len, received = 0, bytes = 0; @@ -1083,13 +1124,13 @@ static int virtnet_receive(struct receive_queue *r...
2014 Jul 23
3
[PATCH v3 net-next 0/2] rx busy polling support for virtio-net
...oducing new states and spinlocks by reusuing the NAPI state - Fix the budget calculation in virtnet_poll() - Drop patch 1/3 from V2 since it was useless Changes from V1: - split the patch info smaller ones - add more details about test setup/configuration Jason Wang (2): virtio-net: introduce virtnet_receive() virtio-net: rx busy polling support drivers/net/virtio_net.c | 67 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) -- 1.8.3.1
2014 Jul 23
3
[PATCH v3 net-next 0/2] rx busy polling support for virtio-net
...oducing new states and spinlocks by reusuing the NAPI state - Fix the budget calculation in virtnet_poll() - Drop patch 1/3 from V2 since it was useless Changes from V1: - split the patch info smaller ones - add more details about test setup/configuration Jason Wang (2): virtio-net: introduce virtnet_receive() virtio-net: rx busy polling support drivers/net/virtio_net.c | 67 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) -- 1.8.3.1
2019 Jul 18
2
[PATCH] virtio-net: parameterize min ring num_free for virtio receive
...@@ static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); +static int min_numfree; +module_param(min_numfree, int, 0444); + static bool csum = true, gso = true, napi_tx; module_param(csum, bool, 0444); module_param(gso, bool, 0444); @@ -1315,6 +1318,9 @@ static int virtnet_receive(struct receive_queue *rq, int budget, void *buf; int i; + if (!min_numfree) + min_numfree = virtqueue_get_vring_size(rq->vq) / 2; + if (!vi->big_packets || vi->mergeable_rx_bufs) { void *ctx; @@ -1331,7 +1337,7 @@ static int virtnet_receive(struct receive_queue *rq, int budge...
2019 Jul 18
2
[PATCH] virtio-net: parameterize min ring num_free for virtio receive
...@@ static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); +static int min_numfree; +module_param(min_numfree, int, 0444); + static bool csum = true, gso = true, napi_tx; module_param(csum, bool, 0444); module_param(gso, bool, 0444); @@ -1315,6 +1318,9 @@ static int virtnet_receive(struct receive_queue *rq, int budget, void *buf; int i; + if (!min_numfree) + min_numfree = virtqueue_get_vring_size(rq->vq) / 2; + if (!vi->big_packets || vi->mergeable_rx_bufs) { void *ctx; @@ -1331,7 +1337,7 @@ static int virtnet_receive(struct receive_queue *rq, int budge...
2019 Jul 19
1
[PATCH] virtio-net: parameterize min ring num_free for virtio receive
...: %d, num free: %d\n", i, recentfree[$vq, > i]) > ??? ??? ??? } > > ??? ??? ??? printf("index: %d, num free: %d\n", i, recentfree[$vq, i]) > ??? ??? ??? //exit() > ??? ??? } > ??? } > } > > > probe > module("virtio_net").statement("virtnet_receive at drivers/net/virtio_net.c:732") > { > ??? recentfreecount++ > ??? recentfreecount = recentfreecount % 5 > ??? recentfree[$rq->vq, recentfreecount] = $rq->vq->num_free ---> > record the num_free for the last 5 calls to virtnet_receive, so we can > see if loweri...
2014 Jul 16
9
[PATCH net-next V2 0/3] rx busy polling support for virtio-net
...116% improvement: transaction rate was increased from 9151.94 to 19787.37. Changes from V1: - split the patch info smaller ones - add more details about test setup/configuration Please review. Jason Wang (3): virtio-net: introduce helpers to enable and disable all NAPIs virtio-net: introduce virtnet_receive() virtio-net: rx busy polling support drivers/net/virtio_net.c | 234 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 221 insertions(+), 13 deletions(-) -- 1.8.3.1
2014 Jul 16
9
[PATCH net-next V2 0/3] rx busy polling support for virtio-net
...116% improvement: transaction rate was increased from 9151.94 to 19787.37. Changes from V1: - split the patch info smaller ones - add more details about test setup/configuration Please review. Jason Wang (3): virtio-net: introduce helpers to enable and disable all NAPIs virtio-net: introduce virtnet_receive() virtio-net: rx busy polling support drivers/net/virtio_net.c | 234 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 221 insertions(+), 13 deletions(-) -- 1.8.3.1
2016 Mar 17
3
[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
This gives small but noticeable rx performance improvement (2-3%) and will allow exploiting future napi improvement. Signed-off-by: Paolo Abeni <pabeni at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fb0eae4..49d84e5 100644 --- a/drivers/net/virtio_net.c +++
2016 Mar 17
3
[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
This gives small but noticeable rx performance improvement (2-3%) and will allow exploiting future napi improvement. Signed-off-by: Paolo Abeni <pabeni at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fb0eae4..49d84e5 100644 --- a/drivers/net/virtio_net.c +++
2018 Jul 31
2
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...cks; > }; > > -struct virtnet_rq_stats { > - struct u64_stats_sync syncp; > - struct virtnet_rq_stat_items items; > -}; I'm not thinking removing sq stat is needed but even if it is I want to keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. > - > -struct virtnet_rx_stats { > - struct virtnet_rq_stat_items rx; > -}; > - -- Toshiaki Makita
2018 Jul 31
2
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...cks; > }; > > -struct virtnet_rq_stats { > - struct u64_stats_sync syncp; > - struct virtnet_rq_stat_items items; > -}; I'm not thinking removing sq stat is needed but even if it is I want to keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. > - > -struct virtnet_rx_stats { > - struct virtnet_rq_stat_items rx; > -}; > - -- Toshiaki Makita
2017 Sep 19
6
[PATCH net-next 1/3] virtio-net: remove unnecessary parameter of virtnet_xdp_xmit()
CC: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 511f833..a0ef4b0 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -373,7 +373,6 @@ static struct sk_buff
2017 Sep 19
6
[PATCH net-next 1/3] virtio-net: remove unnecessary parameter of virtnet_xdp_xmit()
CC: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 511f833..a0ef4b0 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -373,7 +373,6 @@ static struct sk_buff