diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-04-13 21:12:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 21:12:57 -0400 |
commit | 1a31f2042e938f1b467aa3d807cc5666352bf8a3 (patch) | |
tree | 77460f7f79be0579b5686b629fe218750da261b9 /net/sched | |
parent | 1db9e29bb0ff3c9366e8a50fb09ca8dbc364bfd6 (diff) |
netsched: Allow meta match on vlan tag on receive
When vlan acceleration is used on receive, the vlan tag is maintained
outside of the skb data. The existing vlan tag match only works on TX
path because it uses vlan_get_tag which tests for VLAN_HW_TX_ACCEL.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/em_meta.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 72cf86e3c09..fad596bf32d 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -176,8 +176,10 @@ META_COLLECTOR(var_dev) | |||
176 | 176 | ||
177 | META_COLLECTOR(int_vlan_tag) | 177 | META_COLLECTOR(int_vlan_tag) |
178 | { | 178 | { |
179 | unsigned short uninitialized_var(tag); | 179 | unsigned short tag; |
180 | if (vlan_get_tag(skb, &tag) < 0) | 180 | |
181 | tag = vlan_tx_tag_get(skb); | ||
182 | if (!tag && __vlan_get_tag(skb, &tag)) | ||
181 | *err = -1; | 183 | *err = -1; |
182 | else | 184 | else |
183 | dst->value = tag; | 185 | dst->value = tag; |