Skip to contentSkip to conversation

netsched: Allow meta match on vlan tag on receive

PATCH In review Stephen Hemminger 2 participants 2 messages Apr 14, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

net/sched/em_meta.c +4 -2
@@ -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;
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Mon, 13 Apr 2009 17:30:08 -0700

Quoted 5 lines

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.

Looks good, applied, thanks!