diff options
author | Robert Love <robert.w.love@intel.com> | 2010-03-24 08:45:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-26 14:56:03 -0400 |
commit | ca77cd59d28456b4061afa5254972ec47fa8baf5 (patch) | |
tree | 2aed848d3c854c2ccfad204422ab309994ccce89 | |
parent | a7551b75fe47fb6fb70f679935845e741c5e0855 (diff) |
ixgbe: Priority tag FIP frames
Currently FIP (FCoE Initialization Protocol) frames
are going untagged. This causes various problems
with FCFs (switches) that have negotiated a priority
over dcbx. This patch tags FIP frames with the same
priority as the FCoE frames.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 208fb4a97217..0c553f6cb534 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5648,7 +5648,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
5648 | 5648 | ||
5649 | #ifdef IXGBE_FCOE | 5649 | #ifdef IXGBE_FCOE |
5650 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 5650 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && |
5651 | (skb->protocol == htons(ETH_P_FCOE))) { | 5651 | ((skb->protocol == htons(ETH_P_FCOE)) || |
5652 | (skb->protocol == htons(ETH_P_FIP)))) { | ||
5652 | txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); | 5653 | txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); |
5653 | txq += adapter->ring_feature[RING_F_FCOE].mask; | 5654 | txq += adapter->ring_feature[RING_F_FCOE].mask; |
5654 | return txq; | 5655 | return txq; |
@@ -5695,18 +5696,25 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb, | |||
5695 | 5696 | ||
5696 | tx_ring = adapter->tx_ring[skb->queue_mapping]; | 5697 | tx_ring = adapter->tx_ring[skb->queue_mapping]; |
5697 | 5698 | ||
5698 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | ||
5699 | (skb->protocol == htons(ETH_P_FCOE))) { | ||
5700 | tx_flags |= IXGBE_TX_FLAGS_FCOE; | ||
5701 | #ifdef IXGBE_FCOE | 5699 | #ifdef IXGBE_FCOE |
5700 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { | ||
5702 | #ifdef CONFIG_IXGBE_DCB | 5701 | #ifdef CONFIG_IXGBE_DCB |
5703 | tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK | 5702 | /* for FCoE with DCB, we force the priority to what |
5704 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | 5703 | * was specified by the switch */ |
5705 | tx_flags |= ((adapter->fcoe.up << 13) | 5704 | if ((skb->protocol == htons(ETH_P_FCOE)) || |
5706 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | 5705 | (skb->protocol == htons(ETH_P_FIP))) { |
5707 | #endif | 5706 | tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK |
5707 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | ||
5708 | tx_flags |= ((adapter->fcoe.up << 13) | ||
5709 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | ||
5710 | } | ||
5708 | #endif | 5711 | #endif |
5712 | /* flag for FCoE offloads */ | ||
5713 | if (skb->protocol == htons(ETH_P_FCOE)) | ||
5714 | tx_flags |= IXGBE_TX_FLAGS_FCOE; | ||
5709 | } | 5715 | } |
5716 | #endif | ||
5717 | |||
5710 | /* four things can cause us to need a context descriptor */ | 5718 | /* four things can cause us to need a context descriptor */ |
5711 | if (skb_is_gso(skb) || | 5719 | if (skb_is_gso(skb) || |
5712 | (skb->ip_summed == CHECKSUM_PARTIAL) || | 5720 | (skb->ip_summed == CHECKSUM_PARTIAL) || |