Message ID | 1396299703.29410.71.camel@edumazet-glaptop2.roam.corp.google.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, 2014-03-31 at 14:01 -0700, Eric Dumazet wrote: > > BTW, I found a off-by-one error in skb_gro_header_hard() > > -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; > } Oh well, scratch this. This strange function name fooled me again. bool slowpath = hlen > NAPI_GRO_CB(skb)->frag0_len; -- 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
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,