aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-10-30 00:36:53 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 00:36:53 -0400
commitc7c4b3b6e976b95facbb723951bdcd554a3530a4 (patch)
tree9a53a7f850eec755b3c66d4a129d31ce4a8591da /include/linux
parent5b252f0c2f98df21fadf0f6cf189b87a0b938228 (diff)
gro: Change all receive functions to return GRO result codes
This will allow drivers to adjust their receive path dynamically based on whether GRO is being applied successfully. Currently all in-tree callers ignore the return values of these functions and do not need to be changed. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_vlan.h25
-rw-r--r--include/linux/netdevice.h8
2 files changed, 18 insertions, 15 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 71a4870c09a9..153f6b9e722c 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -120,10 +120,12 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev);
120extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 120extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
121 u16 vlan_tci, int polling); 121 u16 vlan_tci, int polling);
122extern int vlan_hwaccel_do_receive(struct sk_buff *skb); 122extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
123extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, 123extern gro_result_t
124 unsigned int vlan_tci, struct sk_buff *skb); 124vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
125extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, 125 unsigned int vlan_tci, struct sk_buff *skb);
126 unsigned int vlan_tci); 126extern gro_result_t
127vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
128 unsigned int vlan_tci);
127 129
128#else 130#else
129static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) 131static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
@@ -150,17 +152,18 @@ static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
150 return 0; 152 return 0;
151} 153}
152 154
153static inline int vlan_gro_receive(struct napi_struct *napi, 155static inline gro_result_t
154 struct vlan_group *grp, 156vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
155 unsigned int vlan_tci, struct sk_buff *skb) 157 unsigned int vlan_tci, struct sk_buff *skb)
156{ 158{
157 return NET_RX_DROP; 159 return GRO_DROP;
158} 160}
159 161
160static inline int vlan_gro_frags(struct napi_struct *napi, 162static inline gro_result_t
161 struct vlan_group *grp, unsigned int vlan_tci) 163vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
164 unsigned int vlan_tci)
162{ 165{
163 return NET_RX_DROP; 166 return GRO_DROP;
164} 167}
165#endif 168#endif
166 169
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 6e777efe149e..193b637889f9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1483,17 +1483,17 @@ extern int netif_receive_skb(struct sk_buff *skb);
1483extern void napi_gro_flush(struct napi_struct *napi); 1483extern void napi_gro_flush(struct napi_struct *napi);
1484extern gro_result_t dev_gro_receive(struct napi_struct *napi, 1484extern gro_result_t dev_gro_receive(struct napi_struct *napi,
1485 struct sk_buff *skb); 1485 struct sk_buff *skb);
1486extern int napi_skb_finish(gro_result_t ret, struct sk_buff *skb); 1486extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
1487extern int napi_gro_receive(struct napi_struct *napi, 1487extern gro_result_t napi_gro_receive(struct napi_struct *napi,
1488 struct sk_buff *skb); 1488 struct sk_buff *skb);
1489extern void napi_reuse_skb(struct napi_struct *napi, 1489extern void napi_reuse_skb(struct napi_struct *napi,
1490 struct sk_buff *skb); 1490 struct sk_buff *skb);
1491extern struct sk_buff * napi_get_frags(struct napi_struct *napi); 1491extern struct sk_buff * napi_get_frags(struct napi_struct *napi);
1492extern int napi_frags_finish(struct napi_struct *napi, 1492extern gro_result_t napi_frags_finish(struct napi_struct *napi,
1493 struct sk_buff *skb, 1493 struct sk_buff *skb,
1494 gro_result_t ret); 1494 gro_result_t ret);
1495extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); 1495extern struct sk_buff * napi_frags_skb(struct napi_struct *napi);
1496extern int napi_gro_frags(struct napi_struct *napi); 1496extern gro_result_t napi_gro_frags(struct napi_struct *napi);
1497 1497
1498static inline void napi_free_frags(struct napi_struct *napi) 1498static inline void napi_free_frags(struct napi_struct *napi)
1499{ 1499{