소스 검색

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>
Stephen Hemminger 16 년 전
부모
커밋
1a31f2042e
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      net/sched/em_meta.c

+ 4 - 2
net/sched/em_meta.c

@@ -176,8 +176,10 @@ META_COLLECTOR(var_dev)
 
 
 META_COLLECTOR(int_vlan_tag)
 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;
 		*err = -1;
 	else
 	else
 		dst->value = tag;
 		dst->value = tag;