lkml.org 
[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] skbuff: optimize the pull_pages code in __pskb_pull_tail()
From
Date
On Thu, 2017-07-06 at 02:16 -0700, Eric Dumazet wrote:
> On Thu, 2017-07-06 at 17:01 +0800, Lin Zhang wrote:
> > In the pull_pages code block, if the first frags size > eat,
> > we can end the loop in advance to avoid extra copy.
> >
> > Signed-off-by: Lin Zhang <xiaolou4617@gmail.com>
> > ---
> > net/core/skbuff.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index f990eb8..c00a1df 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -1720,6 +1720,10 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta)
> > skb_shinfo(skb)->frags[k].page_offset += eat;
> > skb_frag_size_sub(&skb_shinfo(skb)->frags[k], eat);
> > eat = 0;
> > + if (!i) {
> > + k = skb_shinfo(skb)->nr_frags;
> > + break;
> > + }
> > }
> > k++;
> > }
>
> 1) net-next is closed during merge window.
>
> 2) This change is completely buggy.
> How have you tested it exactly ???

Hmm... it looks like I was wrong, but 1) still applies ;)




\
 
 \ /
  Last update: 2017-07-06 11:24    [W:2.016 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site