search for: netdev_alloc_skb_ip_align

Displaying 20 results from an estimated 28 matches for "netdev_alloc_skb_ip_align".

2016 Mar 18
2
[net-next v2] 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> -- v2: replace also netdev_alloc_skb_ip_align() invocation in add_recvbuf_small(), suggested by Venkatesh Srinivas --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fb0eae4..100e039 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/...
2016 Mar 18
2
[net-next v2] 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> -- v2: replace also netdev_alloc_skb_ip_align() invocation in add_recvbuf_small(), suggested by Venkatesh Srinivas --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fb0eae4..100e039 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/...
2016 Mar 17
3
[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
.../virtio_net.c index fb0eae4..49d84e5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -260,7 +260,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi, p = page_address(page) + offset; /* copy small packet so we can reuse these pages for small data */ - skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); + skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN); if (unlikely(!skb)) return NULL; -- 1.8.3.1
2016 Mar 17
3
[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
.../virtio_net.c index fb0eae4..49d84e5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -260,7 +260,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi, p = page_address(page) + offset; /* copy small packet so we can reuse these pages for small data */ - skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); + skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN); if (unlikely(!skb)) return NULL; -- 1.8.3.1
2016 Mar 18
0
[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
On Thu, Mar 17, 2016 at 7:44 AM, Paolo Abeni <pabeni at redhat.com> wrote: > > 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> > --- Worked in my tests, though the performance win was in the noise (+0.6% - +1% bandwidth). What tests did you see
2016 Mar 20
0
[PULL] virtio/vhost: new features, performance improvements, cleanups
...85544c50: vhost: fix error path in vhost_init_used() (2016-03-02 17:01:49 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to c67f5db82027ba6d2ea4ac9176bc45996a03ae6a: virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() (2016-03-17 17:42:00 +0200) ---------------------------------------------------------------- virtio/vhost: new features, performance improvements, cleanups This adds basic polling support for vhost. Reworks virtio to optionally use DMA API, fixing it on Xen. Balloon stats...
2016 Mar 20
0
[PULL] virtio/vhost: new features, performance improvements, cleanups
...85544c50: vhost: fix error path in vhost_init_used() (2016-03-02 17:01:49 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to c67f5db82027ba6d2ea4ac9176bc45996a03ae6a: virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() (2016-03-17 17:42:00 +0200) ---------------------------------------------------------------- virtio/vhost: new features, performance improvements, cleanups This adds basic polling support for vhost. Reworks virtio to optionally use DMA API, fixing it on Xen. Balloon stats...
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
..._skb(struct receive_queue *rq, > > struct page *page, unsigned int offset, > > @@ -237,8 +248,13 @@ static struct sk_buff *page_to_skb(struct > > receive_queue *rq, > > > > /* copy small packet so we can reuse these pages for small data */ > > skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); > > - if (unlikely(!skb)) > > + if (unlikely(!skb)) { > > + if (vi->mergeable_rx_bufs) { > > + hdr = (struct skb_vnet_hdr *)p; > > + drop_mergeable_buffer(rq, hdr->mhdr.num_buffers); > > + } > > return NULL; > &...
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
..._skb(struct receive_queue *rq, > > struct page *page, unsigned int offset, > > @@ -237,8 +248,13 @@ static struct sk_buff *page_to_skb(struct > > receive_queue *rq, > > > > /* copy small packet so we can reuse these pages for small data */ > > skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); > > - if (unlikely(!skb)) > > + if (unlikely(!skb)) { > > + if (vi->mergeable_rx_bufs) { > > + hdr = (struct skb_vnet_hdr *)p; > > + drop_mergeable_buffer(rq, hdr->mhdr.num_buffers); > > + } > > return NULL; > &...
2013 Oct 28
8
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...v->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; - unsigned int copy, hdr_len, offset; + unsigned int copy, hdr_len, hdr_padded_len; char *p; - p = page_address(page); + p = page_address(page) + offset; /* copy small packet so we can reuse these pages for small data */ skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); @@ -254,16 +244,17 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, if (vi->mergeable_rx_bufs) { hdr_len = sizeof hdr->mhdr; - offset = hdr_len; + hdr_padded_len = sizeof hdr->mhdr; } else { hdr_len = sizeof hdr->hdr; - offset =...
2013 Oct 28
8
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...v->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; - unsigned int copy, hdr_len, offset; + unsigned int copy, hdr_len, hdr_padded_len; char *p; - p = page_address(page); + p = page_address(page) + offset; /* copy small packet so we can reuse these pages for small data */ skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); @@ -254,16 +244,17 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, if (vi->mergeable_rx_bufs) { hdr_len = sizeof hdr->mhdr; - offset = hdr_len; + hdr_padded_len = sizeof hdr->mhdr; } else { hdr_len = sizeof hdr->hdr; - offset =...
2013 Nov 20
0
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...gt; static struct sk_buff *page_to_skb(struct receive_queue *rq, > struct page *page, unsigned int offset, > @@ -237,8 +248,13 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, > > /* copy small packet so we can reuse these pages for small data */ > skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); > - if (unlikely(!skb)) > + if (unlikely(!skb)) { > + if (vi->mergeable_rx_bufs) { > + hdr = (struct skb_vnet_hdr *)p; > + drop_mergeable_buffer(rq, hdr->mhdr.num_buffers); > + } > return NULL; > + } > > hdr = skb_vnet_hdr...
2013 Nov 20
7
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...from bottom half context */ static struct sk_buff *page_to_skb(struct receive_queue *rq, struct page *page, unsigned int offset, @@ -237,8 +248,13 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, /* copy small packet so we can reuse these pages for small data */ skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); - if (unlikely(!skb)) + if (unlikely(!skb)) { + if (vi->mergeable_rx_bufs) { + hdr = (struct skb_vnet_hdr *)p; + drop_mergeable_buffer(rq, hdr->mhdr.num_buffers); + } return NULL; + } hdr = skb_vnet_hdr(skb); -- 1.8.3.2
2013 Nov 20
7
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...from bottom half context */ static struct sk_buff *page_to_skb(struct receive_queue *rq, struct page *page, unsigned int offset, @@ -237,8 +248,13 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, /* copy small packet so we can reuse these pages for small data */ skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); - if (unlikely(!skb)) + if (unlikely(!skb)) { + if (vi->mergeable_rx_bufs) { + hdr = (struct skb_vnet_hdr *)p; + drop_mergeable_buffer(rq, hdr->mhdr.num_buffers); + } return NULL; + } hdr = skb_vnet_hdr(skb); -- 1.8.3.2
2013 Oct 29
0
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...d int copy, hdr_len, offset; > + unsigned int copy, hdr_len, hdr_padded_len; > char *p; > > - p = page_address(page); > + p = page_address(page) + offset; > > /* copy small packet so we can reuse these pages for small data */ > skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); > @@ -254,16 +244,17 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, > > if (vi->mergeable_rx_bufs) { > hdr_len = sizeof hdr->mhdr; > - offset = hdr_len; > + hdr_padded_len = size...
2020 Aug 19
0
[PATCH 23/28] lib82596: convert from dma_cache_sync to dma_sync_single_for_device
...+741,7 @@ static inline int i596_rx(struct net_device *dev) DMA_FROM_DEVICE); rbd->v_data = newskb->data; rbd->b_data = SWAP32(dma_addr); - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, rbd, sizeof(struct i596_rbd)); } else { skb = netdev_alloc_skb_ip_align(dev, pkt_len); } @@ -765,7 +793,7 @@ static inline int i596_rx(struct net_device *dev) if (rbd != NULL && (rbd->count & SWAP16(0x4000))) { rbd->count = 0; lp->rbd_head = rbd->v_next; - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, r...
2020 Sep 15
0
[PATCH 11/18] lib82596: convert to dma_alloc_noncoherent
...+741,7 @@ static inline int i596_rx(struct net_device *dev) DMA_FROM_DEVICE); rbd->v_data = newskb->data; rbd->b_data = SWAP32(dma_addr); - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, rbd, sizeof(struct i596_rbd)); } else { skb = netdev_alloc_skb_ip_align(dev, pkt_len); } @@ -765,7 +793,7 @@ static inline int i596_rx(struct net_device *dev) if (rbd != NULL && (rbd->count & SWAP16(0x4000))) { rbd->count = 0; lp->rbd_head = rbd->v_next; - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, r...
2012 Jan 04
4
[RFC PATCH v1 0/2] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to allow the driver to contribute to reclaim when memory is tight. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that while the driver contributes to memory pressure when throughput
2012 Jan 04
4
[RFC PATCH v1 0/2] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to allow the driver to contribute to reclaim when memory is tight. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that while the driver contributes to memory pressure when throughput
2020 Sep 14
2
[PATCH 11/17] sgiseeq: convert to dma_alloc_noncoherent
...+741,7 @@ static inline int i596_rx(struct net_device *dev) DMA_FROM_DEVICE); rbd->v_data = newskb->data; rbd->b_data = SWAP32(dma_addr); - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, rbd, sizeof(struct i596_rbd)); } else { skb = netdev_alloc_skb_ip_align(dev, pkt_len); } @@ -765,7 +793,7 @@ static inline int i596_rx(struct net_device *dev) if (rbd != NULL && (rbd->count & SWAP16(0x4000))) { rbd->count = 0; lp->rbd_head = rbd->v_next; - DMA_WBACK_INV(dev, rbd, sizeof(struct i596_rbd)); + dma_sync_dev(dev, r...