ixgbe: Fix receive on real device when VLANs are configured
Subsystems (2)
PATCH 1/2 ixgbe: Fix receive on real device when VLANs are configured
From: Lucy Liu <[email protected]>
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.
---
drivers/net/ixgbe/ixgbe_main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +2 -2
@@ -492,12 +492,12 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,skb_record_rx_queue (skb, ring->queue_index);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);else napi_gro_receive (napi, skb); }else { -if (adapter->vlgrp && is_vlan && (tag !=0 )) +if (adapter->vlgrp && is_vlan && (tag &VLAN_VID_MASK ))vlan_hwaccel_rx (skb, adapter->vlgrp, tag);else netif_rx (skb);
PATCH 2/2 ixgbe: Do not return 0 in ixgbe_fcoe_ddp() upon FCP_RSP in DDP completion
From: Yi Zou <[email protected]>
We return the ddp->len in ixgbe_fcoe_ddp() to indicate the length of data that have been DDPed. However, it is possible that the length is 0, e.g., for SCSI READ, the FCP_RSP may come back w/ SCSI status 0x28 as Task Set Full with no FCP data for DDP. In ixgbe_fcoe_ddp(), we return 0 to indicate not passing DDPed packets to upper layer. Therefore in the case of ddp->len being 0 upon FCP_RSP, we do not want to return the 0 ddp->len as we want FCP_RSP to be always delivered to the upper layer. This patch fixes this bug by setting rc only if ddp->len is non-zero.
---
drivers/net/ixgbe/ixgbe_fcoe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_fcoe.c +1 -1
@@ -336,7 +336,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,/* return 0 to bypass going to ULD for DDPed data */ if (fcstat ==IXGBE_RXDADV_STAT_FCSTAT_DDP ) rc =0 ; -else +else if (ddp->len) rc = ddp->len; }
Re: [net-2.6 PATCH 2/2] ixgbe: Do not return 0 in ixgbe_fcoe_ddp() upon FCP_RSP in DDP completion
From: Jeff Kirsher <[email protected]>
Date: Thu, 13 Aug 2009 17:09:58 -0700
Quoted 11 lines
From: Yi Zou <[email protected]>
We return the
ddp->leninixgbe_fcoe_ddp()to indicate the length of data that have been DDPed. However, it is possible that the length is 0, e.g., for SCSI READ, theFCP_RSPmay come back w/ SCSI status0x28as Task Set Full with no FCP data for DDP. Inixgbe_fcoe_ddp(), we return 0 to indicate not passing DDPed packets to upper layer. Therefore in the case ofddp->lenbeing 0 uponFCP_RSP, we do not want to return the 0ddp->lenas we wantFCP_RSPto be always delivered to the upper layer. This patch fixes this bug by setting rc only ifddp->lenis non-zero.
Quoted 3 lines
Signed-off-by Yi Zou <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Thu, 13 Aug 2009 17:09:38 -0700
Quoted 6 lines
From: Lucy Liu <[email protected]>
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.
Quoted 6 lines
This patch masked out the priority field when checking the vlan tag for received VLAN packets.
Signed-off-by Lucy Liu <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.