diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-30 00:36:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-30 00:36:53 -0400 |
commit | c7c4b3b6e976b95facbb723951bdcd554a3530a4 (patch) | |
tree | 9a53a7f850eec755b3c66d4a129d31ce4a8591da /net/8021q | |
parent | 5b252f0c2f98df21fadf0f6cf189b87a0b938228 (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 'net/8021q')
-rw-r--r-- | net/8021q/vlan_core.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 47a80d65c3b7..8d5ca2ac4f8d 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -102,11 +102,12 @@ drop: | |||
102 | return GRO_DROP; | 102 | return GRO_DROP; |
103 | } | 103 | } |
104 | 104 | ||
105 | int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 105 | gro_result_t vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
106 | unsigned int vlan_tci, struct sk_buff *skb) | 106 | unsigned int vlan_tci, struct sk_buff *skb) |
107 | { | 107 | { |
108 | if (netpoll_rx_on(skb)) | 108 | if (netpoll_rx_on(skb)) |
109 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci); | 109 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci) |
110 | ? GRO_DROP : GRO_NORMAL; | ||
110 | 111 | ||
111 | skb_gro_reset_offset(skb); | 112 | skb_gro_reset_offset(skb); |
112 | 113 | ||
@@ -114,17 +115,18 @@ int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | |||
114 | } | 115 | } |
115 | EXPORT_SYMBOL(vlan_gro_receive); | 116 | EXPORT_SYMBOL(vlan_gro_receive); |
116 | 117 | ||
117 | int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, | 118 | gro_result_t vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, |
118 | unsigned int vlan_tci) | 119 | unsigned int vlan_tci) |
119 | { | 120 | { |
120 | struct sk_buff *skb = napi_frags_skb(napi); | 121 | struct sk_buff *skb = napi_frags_skb(napi); |
121 | 122 | ||
122 | if (!skb) | 123 | if (!skb) |
123 | return NET_RX_DROP; | 124 | return GRO_DROP; |
124 | 125 | ||
125 | if (netpoll_rx_on(skb)) { | 126 | if (netpoll_rx_on(skb)) { |
126 | skb->protocol = eth_type_trans(skb, skb->dev); | 127 | skb->protocol = eth_type_trans(skb, skb->dev); |
127 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci); | 128 | return vlan_hwaccel_receive_skb(skb, grp, vlan_tci) |
129 | ? GRO_DROP : GRO_NORMAL; | ||
128 | } | 130 | } |
129 | 131 | ||
130 | return napi_frags_finish(napi, skb, | 132 | return napi_frags_finish(napi, skb, |