Displaying 20 results from an estimated 28 matches for "vhost_rx_batch".
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...inux/if_tap.h>
> #include <linux/if_vlan.h>
> +#include <linux/skb_array.h>
> +#include <linux/skbuff.h>
>
> #include <net/sock.h>
>
> @@ -85,6 +87,7 @@ struct vhost_net_ubuf_ref {
> struct vhost_virtqueue *vq;
> };
>
> +#define VHOST_RX_BATCH 64
> struct vhost_net_virtqueue {
> struct vhost_virtqueue vq;
> size_t vhost_hlen;
> @@ -99,6 +102,10 @@ struct vhost_net_virtqueue {
> /* Reference counting for outstanding ubufs.
> * Protected by vq mutex. Writers must also take device mutex. */
> struct vhost_ne...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...inux/if_tap.h>
> #include <linux/if_vlan.h>
> +#include <linux/skb_array.h>
> +#include <linux/skbuff.h>
>
> #include <net/sock.h>
>
> @@ -85,6 +87,7 @@ struct vhost_net_ubuf_ref {
> struct vhost_virtqueue *vq;
> };
>
> +#define VHOST_RX_BATCH 64
> struct vhost_net_virtqueue {
> struct vhost_virtqueue vq;
> size_t vhost_hlen;
> @@ -99,6 +102,10 @@ struct vhost_net_virtqueue {
> /* Reference counting for outstanding ubufs.
> * Protected by vq mutex. Writers must also take device mutex. */
> struct vhost_ne...
2017 Mar 23
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...vlan.h>
>> +#include <linux/skb_array.h>
>> +#include <linux/skbuff.h>
>>
>> #include <net/sock.h>
>>
>> @@ -85,6 +87,7 @@ struct vhost_net_ubuf_ref {
>> struct vhost_virtqueue *vq;
>> };
>>
>> +#define VHOST_RX_BATCH 64
>> struct vhost_net_virtqueue {
>> struct vhost_virtqueue vq;
>> size_t vhost_hlen;
>> @@ -99,6 +102,10 @@ struct vhost_net_virtqueue {
>> /* Reference counting for outstanding ubufs.
>> * Protected by vq mutex. Writers must also take device mut...
2017 Mar 29
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...gt;
>>
>>> +{
>>> + if (rvq->rh != rvq->rt)
>>> + goto out;
>>> +
>>> + rvq->rh = rvq->rt = 0;
>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq,
>>> + VHOST_RX_BATCH);
>> A comment explaining why is is -bh would be helpful.
>
> Ok.
>
> Thanks
Rethink about this. It looks like -bh is not needed in this case since
no consumer run in bh.
Thanks
2017 Mar 29
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...gt;
>>
>>> +{
>>> + if (rvq->rh != rvq->rt)
>>> + goto out;
>>> +
>>> + rvq->rh = rvq->rt = 0;
>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq,
>>> + VHOST_RX_BATCH);
>> A comment explaining why is is -bh would be helpful.
>
> Ok.
>
> Thanks
Rethink about this. It looks like -bh is not needed in this case since
no consumer run in bh.
Thanks
2018 May 21
0
[RFC PATCH net-next 12/12] vhost_net: batch submitting XDP buffers to underlayer sockets
...ret = total_len;
goto out;
}
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 0d84de6..bec4109 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -118,6 +118,7 @@ struct vhost_net_virtqueue {
struct ptr_ring *rx_ring;
struct vhost_net_buf rxq;
struct xdp_buff xdp[VHOST_RX_BATCH];
+ struct vring_used_elem heads[VHOST_RX_BATCH];
};
struct vhost_net {
@@ -511,7 +512,7 @@ static int vhost_net_build_xdp(struct vhost_net_virtqueue *nvq,
void *buf;
int copied;
- if (len < nvq->sock_hlen)
+ if (unlikely(len < nvq->sock_hlen))
return -EFAULT;
if (SKB_D...
2018 Jan 09
2
[PATCH net-next] vhost_net: batch used ring update in rx
...won't access the used
ring until used idx was advanced for several descriptors and since we
advance used ring for every N packets, guest will only need to access
used idx for every N packet since it can cache the used idx. To have a
better interaction for both batch dequeuing and dpdk batching,
VHOST_RX_BATCH was used as the maximum number of descriptors that
could be batched.
Test were done between two machines with 2.40GHz Intel(R) Xeon(R) CPU
E5-2630 connected back to back through ixgbe. Traffic were generated
on one remote ixgbe through MoonGen and measure the RX pps through
testpmd in guest when d...
2018 May 29
2
[PATCH net] vhost_net: flush batched heads before trying to busy polling
...likely(mergeable) ? UIO_MAXIOV : 1);
/* On error, stop handling until the next kick. */
if (unlikely(headcount < 0))
@@ -862,12 +878,9 @@ static void handle_rx(struct vhost_net *net)
vhost_discard_vq_desc(vq, headcount);
goto out;
}
- nheads += headcount;
- if (nheads > VHOST_RX_BATCH) {
- vhost_add_used_and_signal_n(&net->dev, vq, vq->heads,
- nheads);
- nheads = 0;
- }
+ nvq->done_idx += headcount;
+ if (nvq->done_idx > VHOST_RX_BATCH)
+ vhost_rx_signal_used(nvq);
if (unlikely(vq_log))
vhost_log_write(vq, vq_log, log, vhost_len);...
2017 Mar 21
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...@@
#include <linux/if_macvlan.h>
#include <linux/if_tap.h>
#include <linux/if_vlan.h>
+#include <linux/skb_array.h>
+#include <linux/skbuff.h>
#include <net/sock.h>
@@ -85,6 +87,7 @@ struct vhost_net_ubuf_ref {
struct vhost_virtqueue *vq;
};
+#define VHOST_RX_BATCH 64
struct vhost_net_virtqueue {
struct vhost_virtqueue vq;
size_t vhost_hlen;
@@ -99,6 +102,10 @@ struct vhost_net_virtqueue {
/* Reference counting for outstanding ubufs.
* Protected by vq mutex. Writers must also take device mutex. */
struct vhost_net_ubuf_ref *ubufs;
+ struct skb_arr...
2018 Jul 20
12
[PATCH net-next 0/9] TX used ring batched updating for vhost
...st_net: introduce helper to initialize tx iov iter
vhost_net: introduce vhost_exceeds_weight()
vhost_net: introduce get_tx_bufs()
vhost_net: introduce tx_can_batch()
vhost_net: split out datacopy logic
vhost_net: rename vhost_rx_signal_used() to vhost_net_signal_used()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: batch update used ring for datacopy TX
drivers/vhost/net.c | 249 +++++++++++++++++++++++++++++++++++++---------------
1 file changed, 179 insertions(+), 70 deletions(-)
--
2.7.4
2018 Jul 20
12
[PATCH net-next 0/9] TX used ring batched updating for vhost
...st_net: introduce helper to initialize tx iov iter
vhost_net: introduce vhost_exceeds_weight()
vhost_net: introduce get_tx_bufs()
vhost_net: introduce tx_can_batch()
vhost_net: split out datacopy logic
vhost_net: rename vhost_rx_signal_used() to vhost_net_signal_used()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: batch update used ring for datacopy TX
drivers/vhost/net.c | 249 +++++++++++++++++++++++++++++++++++++---------------
1 file changed, 179 insertions(+), 70 deletions(-)
--
2.7.4
2017 Mar 29
1
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...; + if (rvq->rh != rvq->rt)
>>>>> + goto out;
>>>>> +
>>>>> + rvq->rh = rvq->rt = 0;
>>>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq,
>>>>> + VHOST_RX_BATCH);
>>>> A comment explaining why is is -bh would be helpful.
>>> Ok.
>>>
>>> Thanks
>> Rethink about this. It looks like -bh is not needed in this case since
>> no consumer run in bh.
> In that case do we need other variants of "ptr_ring_con...
2017 Mar 29
1
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...; + if (rvq->rh != rvq->rt)
>>>>> + goto out;
>>>>> +
>>>>> + rvq->rh = rvq->rt = 0;
>>>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq,
>>>>> + VHOST_RX_BATCH);
>>>> A comment explaining why is is -bh would be helpful.
>>> Ok.
>>>
>>> Thanks
>> Rethink about this. It looks like -bh is not needed in this case since
>> no consumer run in bh.
> In that case do we need other variants of "ptr_ring_con...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...used in guest for better numbers.
Thanks
>
>> Please review.
>>
>> Jason Wang (5):
>> vhost: split out ring head fetching logic
>> vhost: introduce helper to prefetch desc index
>> vhost: introduce vhost_add_used_idx()
>> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
>> vhost_net: basic tx virtqueue batched processing
>>
>> drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
>> drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
>> drivers/vhost/vhost.h | 9 ++
&...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...used in guest for better numbers.
Thanks
>
>> Please review.
>>
>> Jason Wang (5):
>> vhost: split out ring head fetching logic
>> vhost: introduce helper to prefetch desc index
>> vhost: introduce vhost_add_used_idx()
>> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
>> vhost_net: basic tx virtqueue batched processing
>>
>> drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
>> drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
>> drivers/vhost/vhost.h | 9 ++
&...
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all:
This series tries to implement rx batching for vhost-net. This is done
by batching the dequeuing from skb_array which was exported by
underlayer socket and pass the sbk back through msg_control to finish
userspace copying.
Tests shows at most 19% improvment on rx pps.
Please review.
Thanks
Jason Wang (8):
ptr_ring: introduce batch dequeuing
skb_array: introduce batch dequeuing
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all:
This series tries to implement rx batching for vhost-net. This is done
by batching the dequeuing from skb_array which was exported by
underlayer socket and pass the sbk back through msg_control to finish
userspace copying.
Tests shows at most 19% improvment on rx pps.
Please review.
Thanks
Jason Wang (8):
ptr_ring: introduce batch dequeuing
skb_array: introduce batch dequeuing
2018 May 21
20
[RFC PATCH net-next 00/12] XDP batching for TUN/vhost_net
Hi all:
We do not support XDP batching for TUN since it can only receive one
packet a time from vhost_net. This series tries to remove this
limitation by:
- introduce a TUN specific msg_control that can hold a pointer to an
array of XDP buffs
- try copy and build XDP buff in vhost_net
- store XDP buffs in an array and submit them once for every N packets
from vhost_net
- since TUN can only
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...ds to speed up used ring updating and improve the
cache utilization. Test shows about ~22% improvement in tx pss.
Please review.
Jason Wang (5):
vhost: split out ring head fetching logic
vhost: introduce helper to prefetch desc index
vhost: introduce vhost_add_used_idx()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: basic tx virtqueue batched processing
drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
drivers/vhost/vhost.h | 9 ++
3 files changed, 270 insertions(+), 125 deletion...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...ds to speed up used ring updating and improve the
cache utilization. Test shows about ~22% improvement in tx pss.
Please review.
Jason Wang (5):
vhost: split out ring head fetching logic
vhost: introduce helper to prefetch desc index
vhost: introduce vhost_add_used_idx()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: basic tx virtqueue batched processing
drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
drivers/vhost/vhost.h | 9 ++
3 files changed, 270 insertions(+), 125 deletion...