Message ID | 20090216033644.GA14431@gondor.apana.org.au |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Herbert Xu wrote: > When you can get a chance can you see if this patch makes any > difference at all? Hi Herbert, Thanks for the patch. I should be able to test within the next few days. cheers, Divy -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> When you can get a chance can you see if this patch makes any > difference at all? Hi Herbert, Sorry for the delay. I had to switch to different development platforms. I've not seen much perf change with this patch, it looks good though. Cheers, Divy > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index d7efaf9..6a542fa 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -2586,8 +2586,10 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) > { > struct sk_buff *p = *head; > struct sk_buff *nskb; > + skb_frag_t *frag; > unsigned int headroom; > unsigned int len = skb_gro_len(skb); > + int i; > > if (p->len + len >= 65536) > return -E2BIG; > @@ -2604,9 +2606,9 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) > skb_shinfo(skb)->frags[0].size -= > skb_gro_offset(skb) - skb_headlen(skb); > > - memcpy(skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags, > - skb_shinfo(skb)->frags, > - skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t)); > + frag = skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags; > + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) > + *frag++ = skb_shinfo(skb)->frags[i]; > > skb_shinfo(p)->nr_frags += skb_shinfo(skb)->nr_frags; > skb_shinfo(skb)->nr_frags = 0; > > Thanks, -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
difference at all? diff --git a/net/core/skbuff.c b/net/core/skbuff.c index d7efaf9..6a542fa 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2586,8 +2586,10 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) { struct sk_buff *p = *head; struct sk_buff *nskb; + skb_frag_t *frag; unsigned int headroom; unsigned int len = skb_gro_len(skb); + int i; if (p->len + len >= 65536) return -E2BIG; @@ -2604,9 +2606,9 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) skb_shinfo(skb)->frags[0].size -= skb_gro_offset(skb) - skb_headlen(skb); - memcpy(skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags, - skb_shinfo(skb)->frags, - skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t)); + frag = skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags; + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) + *frag++ = skb_shinfo(skb)->frags[i]; skb_shinfo(p)->nr_frags += skb_shinfo(skb)->nr_frags; skb_shinfo(skb)->nr_frags = 0;