浏览代码

ixgbe: Fix receive on real device when VLANs are configured

Traffic received with a priority tag (VID = 0) and non-zero priority value was
incorrectly handled by the VLAN packet code path due to a check on zero for
the whole VLAN tag instead of just the VID.

This patch masked out the priority field when checking the vlan tag for
received VLAN packets.

Signed-off-by: Lucy Liu <lucy.liu@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lucy Liu 16 年之前
父节点
当前提交
8a62babfb8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/net/ixgbe/ixgbe_main.c

+ 2 - 2
drivers/net/ixgbe/ixgbe_main.c

@@ -492,12 +492,12 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
 
 
 	skb_record_rx_queue(skb, ring->queue_index);
 	skb_record_rx_queue(skb, ring->queue_index);
 	if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
 	if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
-		if (adapter->vlgrp && is_vlan && (tag != 0))
+		if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
 			vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
 			vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
 		else
 		else
 			napi_gro_receive(napi, skb);
 			napi_gro_receive(napi, skb);
 	} else {
 	} else {
-		if (adapter->vlgrp && is_vlan && (tag != 0))
+		if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
 			vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
 			vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
 		else
 		else
 			netif_rx(skb);
 			netif_rx(skb);