search for: frag_list

Displaying 20 results from an estimated 35 matches for "frag_list".

2013 Oct 28
8
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...es of the buffer is used to store packet data, reducing the effective TCP window size substantially. This patch addresses the performance concerns with mergeable receive buffers by allocating MTU-sized packet buffers using page frag allocators. If more than MAX_SKB_FRAGS buffers are needed, the SKB frag_list is used. Signed-off-by: Michael Dalton <mwdalton at google.com> --- drivers/net/virtio_net.c | 164 ++++++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 58 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9fbdfcd..113ee93 100...
2013 Oct 28
8
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...es of the buffer is used to store packet data, reducing the effective TCP window size substantially. This patch addresses the performance concerns with mergeable receive buffers by allocating MTU-sized packet buffers using page frag allocators. If more than MAX_SKB_FRAGS buffers are needed, the SKB frag_list is used. Signed-off-by: Michael Dalton <mwdalton at google.com> --- drivers/net/virtio_net.c | 164 ++++++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 58 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9fbdfcd..113ee93 100...
2013 Oct 29
1
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...cket data, reducing the effective TCP window size >> substantially. This patch addresses the performance concerns >> with mergeable receive buffers by allocating MTU-sized packet >> buffers using page frag allocators. If more than MAX_SKB_FRAGS >> buffers are needed, the SKB frag_list is used. >> >> Signed-off-by: Michael Dalton <mwdalton at google.com> >> --- > > Signed-off-by: Eric Dumazet <edumazet at google.com> > > Daniel & Francesco, this should address the performance problem you > tried to address with ("tcp: rcvbu...
2013 Oct 29
1
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...cket data, reducing the effective TCP window size >> substantially. This patch addresses the performance concerns >> with mergeable receive buffers by allocating MTU-sized packet >> buffers using page frag allocators. If more than MAX_SKB_FRAGS >> buffers are needed, the SKB frag_list is used. >> >> Signed-off-by: Michael Dalton <mwdalton at google.com> >> --- > > Signed-off-by: Eric Dumazet <edumazet at google.com> > > Daniel & Francesco, this should address the performance problem you > tried to address with ("tcp: rcvbu...
2013 Nov 20
2
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
...; were received on a physical NIC, you were dropping the packets anyway. > > It makes no difference at all, adding a cushion might make you feel > better, but its really not worth it. > > Under memory stress, it makes better sense to drop a super big GRO > packet (The one needing frag_list extension ...) > > It gives a better signal to the sender to reduce its pressure, and gives > opportunity to free more of your memory. > OK, but in that case one wonders whether we should do more to free memory? E.g. imagine that we dropped a packet of a specific TCP flow because we...
2013 Nov 20
2
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
...; were received on a physical NIC, you were dropping the packets anyway. > > It makes no difference at all, adding a cushion might make you feel > better, but its really not worth it. > > Under memory stress, it makes better sense to drop a super big GRO > packet (The one needing frag_list extension ...) > > It gives a better signal to the sender to reduce its pressure, and gives > opportunity to free more of your memory. > OK, but in that case one wonders whether we should do more to free memory? E.g. imagine that we dropped a packet of a specific TCP flow because we...
2017 Nov 09
1
Crash in network stack under Xen
...led: ops = rcu_dereference(inet_offloads[proto]); Which I'm guessing means the packet didn't have a valid layer 4 protocol definition, or we don't have that protocol enabled. Then when attempting to handle that failure there was a GPF, I believe by accessing invalid data in shinfo->frag_list . "skb_release_data+0x73" is in __read_once_size, which I think is generated by "kfree_skb: if (likely(atomic_read(&skb->users) == 1))" . --Sarah
2005 Feb 09
1
RE: [PATCH 2/2] netfront skb padding
...834000 -0600 > @@ -50,6 +50,8 @@ > #include <asm-xen/balloon.h> > #include <asm/page.h> > > +#define NETFRONT_VERSION "1.1" > + > #ifndef __GFP_NOWARN > #define __GFP_NOWARN 0 > #endif > @@ -62,8 +64,11 @@ > skb_shinfo(_skb)->frag_list = NULL; \ > } while (0) > > -/* Allow headroom on each rx pkt for Ethernet header, > alignment padding, ... */ > -#define RX_HEADROOM 200 > +/* > + * Allow headroom on each rx pkt for Ethernet header, > alignment padding, > + * CRC, and VLAN > + *...
2013 Nov 19
3
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
On Tue, Nov 19, 2013 at 01:36:36PM -0800, Eric Dumazet wrote: > On Tue, 2013-11-19 at 22:49 +0200, Michael S. Tsirkin wrote: > > On Tue, Nov 19, 2013 at 06:03:48AM -0800, Eric Dumazet wrote: > > > On Tue, 2013-11-19 at 16:05 +0800, Jason Wang wrote: > > > > We need to drop the refcnt of page when we fail to allocate an skb for frag > > > > list, otherwise
2013 Nov 19
3
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
On Tue, Nov 19, 2013 at 01:36:36PM -0800, Eric Dumazet wrote: > On Tue, 2013-11-19 at 22:49 +0200, Michael S. Tsirkin wrote: > > On Tue, Nov 19, 2013 at 06:03:48AM -0800, Eric Dumazet wrote: > > > On Tue, 2013-11-19 at 16:05 +0800, Jason Wang wrote: > > > > We need to drop the refcnt of page when we fail to allocate an skb for frag > > > > list, otherwise
2006 Feb 22
0
Re: [PATCH] Fix IPSec for Xen checksum offload packets (Jon Mason)
...t;- * the BH enable code must have IRQs enabled so that it will not deadlock. >- * --BLG >- */ >- >-int dev_queue_xmit(struct sk_buff *skb) >-{ >- struct net_device *dev = skb->dev; >- struct Qdisc *q; >- int rc = -ENOMEM; >- >- if (skb_shinfo(skb)->frag_list && >- !(dev->features & NETIF_F_FRAGLIST) && >- __skb_linearize(skb, GFP_ATOMIC)) >- goto out_kfree_skb; >- >- /* Fragmented skb is linearized if device does not support SG, >- * or if at least one of fragments is in highmem and device >- * doe...
2013 Oct 29
0
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...to store > packet data, reducing the effective TCP window size > substantially. This patch addresses the performance concerns > with mergeable receive buffers by allocating MTU-sized packet > buffers using page frag allocators. If more than MAX_SKB_FRAGS > buffers are needed, the SKB frag_list is used. This looks really good, just one nit below -- should we add MTU-sized packets, or add MTU+sizeof(virtnet_hdr)-sized packets? Reviewed-by: Eric Northup <digitaleric at google.com> > > Signed-off-by: Michael Dalton <mwdalton at google.com> > --- > drivers/net/virt...
2013 Nov 27
4
[PATCH 1/2] virtio_net: fix error handling for mergeable buffers
...ikely(num_skb_frags == MAX_SKB_FRAGS)) { struct sk_buff *nskb = alloc_skb(0, GFP_ATOMIC); - if (unlikely(!nskb)) { - head_skb->dev->stats.rx_dropped++; - return -ENOMEM; - } + + if (unlikely(!nskb)) + goto err_skb; if (curr_skb == head_skb) skb_shinfo(curr_skb)->frag_list = nskb; else curr_skb->next = nskb; - curr_skb = nskb; head_skb->truesize += nskb->truesize; + curr_skb = nskb; num_skb_frags = 0; } if (curr_skb != head_skb) { @@ -341,8 +353,7 @@ static int receive_mergeable(struct receive_queue *rq, struct sk_buff *head_skb)...
2013 Nov 27
4
[PATCH 1/2] virtio_net: fix error handling for mergeable buffers
...ikely(num_skb_frags == MAX_SKB_FRAGS)) { struct sk_buff *nskb = alloc_skb(0, GFP_ATOMIC); - if (unlikely(!nskb)) { - head_skb->dev->stats.rx_dropped++; - return -ENOMEM; - } + + if (unlikely(!nskb)) + goto err_skb; if (curr_skb == head_skb) skb_shinfo(curr_skb)->frag_list = nskb; else curr_skb->next = nskb; - curr_skb = nskb; head_skb->truesize += nskb->truesize; + curr_skb = nskb; num_skb_frags = 0; } if (curr_skb != head_skb) { @@ -341,8 +353,7 @@ static int receive_mergeable(struct receive_queue *rq, struct sk_buff *head_skb)...
2013 Oct 28
0
[PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators
...to store > packet data, reducing the effective TCP window size > substantially. This patch addresses the performance concerns > with mergeable receive buffers by allocating MTU-sized packet > buffers using page frag allocators. If more than MAX_SKB_FRAGS > buffers are needed, the SKB frag_list is used. > > Signed-off-by: Michael Dalton <mwdalton at google.com> > --- Signed-off-by: Eric Dumazet <edumazet at google.com> Daniel & Francesco, this should address the performance problem you tried to address with ("tcp: rcvbuf autotuning improvements") (...
2013 Nov 19
0
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
...posting buffers, so if packets were received on a physical NIC, you were dropping the packets anyway. It makes no difference at all, adding a cushion might make you feel better, but its really not worth it. Under memory stress, it makes better sense to drop a super big GRO packet (The one needing frag_list extension ...) It gives a better signal to the sender to reduce its pressure, and gives opportunity to free more of your memory.
2013 Nov 20
0
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
...NIC, you were dropping the packets anyway. > > > > It makes no difference at all, adding a cushion might make you feel > > better, but its really not worth it. > > > > Under memory stress, it makes better sense to drop a super big GRO > > packet (The one needing frag_list extension ...) > > > > It gives a better signal to the sender to reduce its pressure, and gives > > opportunity to free more of your memory. > > > > OK, but in that case one wonders whether we should do more to free memory? > > E.g. imagine that we dropped a...
2018 Apr 18
0
[PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support
...d, as the chunks in one packet may be from some different messages, as Marcelo said below. >> If we do that, any current attempt at GSO in virtio would have to be >> depricated and we'd need GSO2 or something like that. Why would it be depreciated? virtio_net actually also supports frag_list, all we need to do is to enable it. I already have a patch for sctp gso over virtio_net in my local tree: patch on qemu-2.9.0(el7): https://paste.fedoraproject.org/paste/IgnSbW74L6P9aUZpnWHBsA patch on kernel-4.16(linus): https://paste.fedoraproject.org/paste/L7AhFIVVp3k8VfEV29QMiw The perfo...
2013 Nov 28
4
[PATCH v2 1/2] virtio_net: fix error handling for mergeable buffers
...ikely(num_skb_frags == MAX_SKB_FRAGS)) { struct sk_buff *nskb = alloc_skb(0, GFP_ATOMIC); - if (unlikely(!nskb)) { - head_skb->dev->stats.rx_dropped++; - return -ENOMEM; - } + + if (unlikely(!nskb)) + goto err_skb; if (curr_skb == head_skb) skb_shinfo(curr_skb)->frag_list = nskb; else @@ -341,8 +353,7 @@ static int receive_mergeable(struct receive_queue *rq, struct sk_buff *head_skb) head_skb->len += len; head_skb->truesize += MERGE_BUFFER_LEN; } - page = virt_to_head_page(buf); - offset = buf - (char *)page_address(page); + offset = buf - pa...
2013 Nov 28
4
[PATCH v2 1/2] virtio_net: fix error handling for mergeable buffers
...ikely(num_skb_frags == MAX_SKB_FRAGS)) { struct sk_buff *nskb = alloc_skb(0, GFP_ATOMIC); - if (unlikely(!nskb)) { - head_skb->dev->stats.rx_dropped++; - return -ENOMEM; - } + + if (unlikely(!nskb)) + goto err_skb; if (curr_skb == head_skb) skb_shinfo(curr_skb)->frag_list = nskb; else @@ -341,8 +353,7 @@ static int receive_mergeable(struct receive_queue *rq, struct sk_buff *head_skb) head_skb->len += len; head_skb->truesize += MERGE_BUFFER_LEN; } - page = virt_to_head_page(buf); - offset = buf - (char *)page_address(page); + offset = buf - pa...