Thread (10 messages) 10 messages, 3 authors, 2014-04-01

Re: [PATCH net-next] net-gro: restore frag0 optimization

From: Eric Dumazet <hidden>
Date: 2014-03-31 21:01:45
Subsystem: networking drivers, networking [general], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

On Mon, 2014-03-31 at 16:27 -0400, David Miller wrote:
Ok, applied, thanks for taking care of this Eric.

We can send to -stable after it's gotten a lot of testing and
auditing.
Thanks David

BTW, I found a off-by-one error in skb_gro_header_hard()

TCP pure ACK packets always hit the 'slow' path, if I understand this
correctly.

I'll formally submit the following when I have tested it.

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 775cc956ff78..7484d6f3d6cb 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1998,9 +1998,10 @@ static inline void *skb_gro_header_fast(struct sk_buff *skb,
 	return NAPI_GRO_CB(skb)->frag0 + offset;
 }
 
-static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
+static inline bool skb_gro_header_hard(const struct sk_buff *skb,
+				       unsigned int hlen)
 {
-	return NAPI_GRO_CB(skb)->frag0_len < hlen;
+	return NAPI_GRO_CB(skb)->frag0_len <= hlen;
 }
 
 static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help