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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 20419508eec1..7a5057fbb7cd 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -984,6 +984,9 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
984void netif_napi_del(struct napi_struct *napi); 984void netif_napi_del(struct napi_struct *napi);
985 985
986struct napi_gro_cb { 986struct napi_gro_cb {
987 /* This indicates where we are processing relative to skb->data. */
988 int data_offset;
989
987 /* This is non-zero if the packet may be of the same flow. */ 990 /* This is non-zero if the packet may be of the same flow. */
988 int same_flow; 991 int same_flow;
989 992
@@ -1087,6 +1090,29 @@ extern int dev_restart(struct net_device *dev);
1087#ifdef CONFIG_NETPOLL_TRAP 1090#ifdef CONFIG_NETPOLL_TRAP
1088extern int netpoll_trap(void); 1091extern int netpoll_trap(void);
1089#endif 1092#endif
1093extern void *skb_gro_header(struct sk_buff *skb, unsigned int hlen);
1094extern int skb_gro_receive(struct sk_buff **head,
1095 struct sk_buff *skb);
1096
1097static inline unsigned int skb_gro_offset(const struct sk_buff *skb)
1098{
1099 return NAPI_GRO_CB(skb)->data_offset;
1100}
1101
1102static inline unsigned int skb_gro_len(const struct sk_buff *skb)
1103{
1104 return skb->len - NAPI_GRO_CB(skb)->data_offset;
1105}
1106
1107static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len)
1108{
1109 NAPI_GRO_CB(skb)->data_offset += len;
1110}
1111
1112static inline void skb_gro_reset_offset(struct sk_buff *skb)
1113{
1114 NAPI_GRO_CB(skb)->data_offset = 0;
1115}
1090 1116
1091static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, 1117static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
1092 unsigned short type, 1118 unsigned short type,