aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2e44a049be0f..371ece521e58 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1132,18 +1132,23 @@ static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len)
1132 NAPI_GRO_CB(skb)->data_offset += len; 1132 NAPI_GRO_CB(skb)->data_offset += len;
1133} 1133}
1134 1134
1135static inline void *skb_gro_header(struct sk_buff *skb, unsigned int hlen) 1135static inline void *skb_gro_header_fast(struct sk_buff *skb,
1136 unsigned int offset)
1136{ 1137{
1137 unsigned int offset = skb_gro_offset(skb); 1138 return NAPI_GRO_CB(skb)->frag0 + offset;
1139}
1138 1140
1139 hlen += offset; 1141static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
1140 if (NAPI_GRO_CB(skb)->frag0_len < hlen) { 1142{
1141 NAPI_GRO_CB(skb)->frag0 = NULL; 1143 return NAPI_GRO_CB(skb)->frag0_len < hlen;
1142 NAPI_GRO_CB(skb)->frag0_len = 0; 1144}
1143 return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL;
1144 }
1145 1145
1146 return NAPI_GRO_CB(skb)->frag0 + offset; 1146static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
1147 unsigned int offset)
1148{
1149 NAPI_GRO_CB(skb)->frag0 = NULL;
1150 NAPI_GRO_CB(skb)->frag0_len = 0;
1151 return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL;
1147} 1152}
1148 1153
1149static inline void *skb_gro_mac_header(struct sk_buff *skb) 1154static inline void *skb_gro_mac_header(struct sk_buff *skb)