search for: skb_array

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

2016 Jun 28
1
[PATCH net-next V2] tun: introduce tx skb ring
...have ptr_ring_resize that gets an array of > > > >rings and resizes them both to same length? > > OK, here it is. Untested so far, and no skb wrapper. > > Pls let me know whether this is what you had in mind. > > Exactly what I want. > > Thanks Ok and this for skb_array --> skb_array: add wrappers for resizing Signed-off-by: Michael S. Tsirkin <mst at redhat.com> -- diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index c900708..7e01c1f 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -151,16 +151,24 @@ stati...
2016 Jun 28
1
[PATCH net-next V2] tun: introduce tx skb ring
...have ptr_ring_resize that gets an array of > > > >rings and resizes them both to same length? > > OK, here it is. Untested so far, and no skb wrapper. > > Pls let me know whether this is what you had in mind. > > Exactly what I want. > > Thanks Ok and this for skb_array --> skb_array: add wrappers for resizing Signed-off-by: Michael S. Tsirkin <mst at redhat.com> -- diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index c900708..7e01c1f 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -151,16 +151,24 @@ stati...
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 tun: export skb_array...
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 tun: export skb_array...
2016 Jun 22
2
[PATCH net-next V2] tun: introduce tx skb ring
On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > Would it help to have ptr_ring_resize that gets an array of > rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know whether this is what you had in mind. --> ptr_ring: support resizing multiple queues Signed-off-by: Michael S. Tsirkin <mst at
2016 Jun 22
2
[PATCH net-next V2] tun: introduce tx skb ring
On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > Would it help to have ptr_ring_resize that gets an array of > rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know whether this is what you had in mind. --> ptr_ring: support resizing multiple queues Signed-off-by: Michael S. Tsirkin <mst at
2016 Jun 30
9
[PATCH net-next V3 0/6] switch to use tx skb array in tun
...roduce a notifier which was triggered when tx_queue_len was changed for a netdev. - resize all queues during the tx_queue_len changing. Tests shows about 15% improvement on guest rx pps: Before: ~1300000pps After : ~1500000pps Changes from V2: - add multiple rings resizing support for ptr_ring/skb_array - add zero length ring support - introdce a NETDEV_CHANGE_TX_QUEUE_LEN - drop new flags Changes from V1: - switch to use skb array instead of a customized circular buffer - add non-blocking support - rename .peek to .peek_len - drop lockless peeking since test show very minor improvement Jason Wa...
2016 Jun 30
9
[PATCH net-next V3 0/6] switch to use tx skb array in tun
...roduce a notifier which was triggered when tx_queue_len was changed for a netdev. - resize all queues during the tx_queue_len changing. Tests shows about 15% improvement on guest rx pps: Before: ~1300000pps After : ~1500000pps Changes from V2: - add multiple rings resizing support for ptr_ring/skb_array - add zero length ring support - introdce a NETDEV_CHANGE_TX_QUEUE_LEN - drop new flags Changes from V1: - switch to use skb array instead of a customized circular buffer - add non-blocking support - rename .peek to .peek_len - drop lockless peeking since test show very minor improvement Jason Wa...
2016 Jun 30
10
[PATCH net-next V4 0/6] switch to use tx skb array in tun
...ize all queues during the tx_queue_len changing. Tests shows about 15% improvement on guest rx pps: Before: ~1300000pps After : ~1500000pps Changes from V3: - fix kbuild warnings - call NETDEV_CHANGE_TX_QUEUE_LEN on IFLA_TXQLEN Changes from V2: - add multiple rings resizing support for ptr_ring/skb_array - add zero length ring support - introdce a NETDEV_CHANGE_TX_QUEUE_LEN - drop new flags Changes from V1: - switch to use skb array instead of a customized circular buffer - add non-blocking support - rename .peek to .peek_len - drop lockless peeking since test show very minor improvement Jason Wa...
2016 Jun 30
10
[PATCH net-next V4 0/6] switch to use tx skb array in tun
...ize all queues during the tx_queue_len changing. Tests shows about 15% improvement on guest rx pps: Before: ~1300000pps After : ~1500000pps Changes from V3: - fix kbuild warnings - call NETDEV_CHANGE_TX_QUEUE_LEN on IFLA_TXQLEN Changes from V2: - add multiple rings resizing support for ptr_ring/skb_array - add zero length ring support - introdce a NETDEV_CHANGE_TX_QUEUE_LEN - drop new flags Changes from V1: - switch to use skb array instead of a customized circular buffer - add non-blocking support - rename .peek to .peek_len - drop lockless peeking since test show very minor improvement Jason Wa...
2016 May 24
0
[PATCH] tools/virtio: add noring tool
...ngtest/noring.c @@ -0,0 +1,69 @@ +#define _GNU_SOURCE +#include "main.h" +#include <assert.h> + +/* stub implementation: useful for measuring overhead */ +void alloc_ring(void) +{ +} + +/* guest side */ +int add_inbuf(unsigned len, void *buf, void *datap) +{ + return 0; +} + +/* + * skb_array API provides no way for producer to find out whether a given + * buffer was consumed. Our tests merely require that a successful get_buf + * implies that add_inbuf succeed in the past, and that add_inbuf will succeed, + * fake it accordingly. + */ +void *get_buf(unsigned *lenp, void **bufp) +{ + r...
2016 May 24
0
[PATCH] tools/virtio: add noring tool
...ngtest/noring.c @@ -0,0 +1,69 @@ +#define _GNU_SOURCE +#include "main.h" +#include <assert.h> + +/* stub implementation: useful for measuring overhead */ +void alloc_ring(void) +{ +} + +/* guest side */ +int add_inbuf(unsigned len, void *buf, void *datap) +{ + return 0; +} + +/* + * skb_array API provides no way for producer to find out whether a given + * buffer was consumed. Our tests merely require that a successful get_buf + * implies that add_inbuf succeed in the past, and that add_inbuf will succeed, + * fake it accordingly. + */ +void *get_buf(unsigned *lenp, void **bufp) +{ + r...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On Tue, Mar 21, 2017 at 12:04:46PM +0800, Jason Wang wrote: > We used to dequeue one skb during recvmsg() from skb_array, this could > be inefficient because of the bad cache utilization and spinlock > touching for each packet. This patch tries to batch them by calling > batch dequeuing helpers explicitly on the exported skb array and pass > the skb back through msg_control for underlayer socket to finish...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On Tue, Mar 21, 2017 at 12:04:46PM +0800, Jason Wang wrote: > We used to dequeue one skb during recvmsg() from skb_array, this could > be inefficient because of the bad cache utilization and spinlock > touching for each packet. This patch tries to batch them by calling > batch dequeuing helpers explicitly on the exported skb array and pass > the skb back through msg_control for underlayer socket to finish...
2016 Jun 30
0
[PATCH net-next V4 0/6] switch to use tx skb array in tun
...After : ~1500000pps Acked-by: Michael S. Tsirkin <mst at redhat.com> Acked-from-altitude: 34697 feet. > Changes from V3: > - fix kbuild warnings > - call NETDEV_CHANGE_TX_QUEUE_LEN on IFLA_TXQLEN > > Changes from V2: > - add multiple rings resizing support for ptr_ring/skb_array > - add zero length ring support > - introdce a NETDEV_CHANGE_TX_QUEUE_LEN > - drop new flags > > Changes from V1: > - switch to use skb array instead of a customized circular buffer > - add non-blocking support > - rename .peek to .peek_len > - drop lockless peeking sin...
2017 Mar 21
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
We used to dequeue one skb during recvmsg() from skb_array, this could be inefficient because of the bad cache utilization and spinlock touching for each packet. This patch tries to batch them by calling batch dequeuing helpers explicitly on the exported skb array and pass the skb back through msg_control for underlayer socket to finish the userspace copyi...
2017 Mar 23
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?22? 22:16, Michael S. Tsirkin wrote: > On Tue, Mar 21, 2017 at 12:04:46PM +0800, Jason Wang wrote: >> We used to dequeue one skb during recvmsg() from skb_array, this could >> be inefficient because of the bad cache utilization and spinlock >> touching for each packet. This patch tries to batch them by calling >> batch dequeuing helpers explicitly on the exported skb array and pass >> the skb back through msg_control for underlayer...
2017 Mar 30
1
[PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling
...} > > > -static int sk_has_rx_data(struct sock *sk) > > > +static int sk_has_rx_data(struct vhost_net_virtqueue *rvq, struct sock *sk) > > > { > > > struct socket *sock = sk->sk_socket; > > > + if (rvq->rx_array) > > > + return !__skb_array_empty(rvq->rx_array); > > > + > > > if (sock->ops->peek_len) > > > return sock->ops->peek_len(sock); > > I don't see which patch adds __skb_array_empty. > > This is not something new, it was introduced by ad69f35d1dc0a ("skb_arr...
2017 Mar 30
1
[PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling
...} > > > -static int sk_has_rx_data(struct sock *sk) > > > +static int sk_has_rx_data(struct vhost_net_virtqueue *rvq, struct sock *sk) > > > { > > > struct socket *sock = sk->sk_socket; > > > + if (rvq->rx_array) > > > + return !__skb_array_empty(rvq->rx_array); > > > + > > > if (sock->ops->peek_len) > > > return sock->ops->peek_len(sock); > > I don't see which patch adds __skb_array_empty. > > This is not something new, it was introduced by ad69f35d1dc0a ("skb_arr...
2016 Jun 30
0
[PATCH net-next V3 6/6] tun: switch to use skb array for tx
We used to queue tx packets in sk_receive_queue, this is less efficient since it requires spinlocks to synchronize between producer and consumer. This patch tries to address this by: - switch from sk_receive_queue to a skb_array, and resize it when tx_queue_len was changed. - introduce a new proto_ops peek_len which was used for peeking the skb length. - implement a tun version of peek_len for vhost_net to use and convert vhost_net to use peek_len if possible. Pktgen test shows about 15.3% improvement on guest recei...