Skip to content

Commit

Permalink
ixgbe: IXGBE_RXD_STAT_VP set even with Rx stripping enabled
Browse files Browse the repository at this point in the history
The hardware bit IXGBE_RXD_STAT_VP appears to be set even when Rx
stripping is disabled. This results in passing frames up the stack
which do not have the 802.1Q tag stripped but have the tci bits
set as if it was.

Working around this with a check for the feature flag bit. I
would welcome any better ideas or a pointer to exactly which
bits in the hardware register need to be cleared to get the
IXGBE_RXD_STAT_VP bit to be set per data sheet.

Signed-off-by: John Fastabend <[email protected]>
Acked-by: Alexander Duyck <[email protected]>
Tested-by: Marcus Dennis <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Jun 6, 2012
1 parent 146d4cc commit 43e95f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,8 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
struct net_device *dev = rx_ring->netdev;

ixgbe_update_rsc_stats(rx_ring, skb);

ixgbe_rx_hash(rx_ring, rx_desc, skb);
Expand All @@ -1401,14 +1403,15 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
ixgbe_ptp_rx_hwtstamp(rx_ring->q_vector, skb);
#endif

if (ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
if ((dev->features & NETIF_F_HW_VLAN_RX) &&
ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
u16 vid = le16_to_cpu(rx_desc->wb.upper.vlan);
__vlan_hwaccel_put_tag(skb, vid);
}

skb_record_rx_queue(skb, rx_ring->queue_index);

skb->protocol = eth_type_trans(skb, rx_ring->netdev);
skb->protocol = eth_type_trans(skb, dev);
}

static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,
Expand Down

0 comments on commit 43e95f1

Please sign in to comment.