mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
5b252f0c2f
commit
c7c4b3b6e9
4 changed files with 42 additions and 45 deletions
|
@ -120,10 +120,12 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev);
|
|||
extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
|
||||
u16 vlan_tci, int polling);
|
||||
extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
|
||||
extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci, struct sk_buff *skb);
|
||||
extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci);
|
||||
extern gro_result_t
|
||||
vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci, struct sk_buff *skb);
|
||||
extern gro_result_t
|
||||
vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci);
|
||||
|
||||
#else
|
||||
static 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)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int vlan_gro_receive(struct napi_struct *napi,
|
||||
struct vlan_group *grp,
|
||||
unsigned int vlan_tci, struct sk_buff *skb)
|
||||
static inline gro_result_t
|
||||
vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci, struct sk_buff *skb)
|
||||
{
|
||||
return NET_RX_DROP;
|
||||
return GRO_DROP;
|
||||
}
|
||||
|
||||
static inline int vlan_gro_frags(struct napi_struct *napi,
|
||||
struct vlan_group *grp, unsigned int vlan_tci)
|
||||
static inline gro_result_t
|
||||
vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
|
||||
unsigned int vlan_tci)
|
||||
{
|
||||
return NET_RX_DROP;
|
||||
return GRO_DROP;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue