Skip to content

Commit

Permalink
netsched: Allow meta match on vlan tag on receive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Apr 14, 2009
1 parent 1db9e29 commit 1a31f20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/sched/em_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ META_COLLECTOR(var_dev)

META_COLLECTOR(int_vlan_tag)
{
unsigned short uninitialized_var(tag);
if (vlan_get_tag(skb, &tag) < 0)
unsigned short tag;

tag = vlan_tx_tag_get(skb);
if (!tag && __vlan_get_tag(skb, &tag))
*err = -1;
else
dst->value = tag;
Expand Down

0 comments on commit 1a31f20

Please sign in to comment.