Commit 4bc091d8 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller

ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG

Building ixgbe without DCB_CONFIG and FCOE_CONFIG will cause
a build error.  This resolves the build error by wrapping
the fcoe.up in CONFIG_IXGBE_DCB ifdefs.

Also frames were being priority VLAN tagged even without DCB
enabled.  This fixes this so that 8021Q priority tags are
only added with DCB actually enabled.
Reported-by: default avatardivya <dipraksh@linux.vnet.ibm.com>
Reported-by: default avatarJon Mason <jon.mason@exar.com>
Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 16d884bd
...@@ -6155,9 +6155,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) ...@@ -6155,9 +6155,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
txq += adapter->ring_feature[RING_F_FCOE].mask; txq += adapter->ring_feature[RING_F_FCOE].mask;
return txq; return txq;
#ifdef CONFIG_IXGBE_DCB
} else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
txq = adapter->fcoe.up; txq = adapter->fcoe.up;
return txq; return txq;
#endif
} }
} }
#endif #endif
...@@ -6216,10 +6218,14 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb, ...@@ -6216,10 +6218,14 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED && if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED &&
(skb->protocol == htons(ETH_P_FCOE) || (skb->protocol == htons(ETH_P_FCOE) ||
skb->protocol == htons(ETH_P_FIP))) { skb->protocol == htons(ETH_P_FIP))) {
tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK #ifdef CONFIG_IXGBE_DCB
<< IXGBE_TX_FLAGS_VLAN_SHIFT); if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
tx_flags |= ((adapter->fcoe.up << 13) tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
<< IXGBE_TX_FLAGS_VLAN_SHIFT); << IXGBE_TX_FLAGS_VLAN_SHIFT);
tx_flags |= ((adapter->fcoe.up << 13)
<< IXGBE_TX_FLAGS_VLAN_SHIFT);
}
#endif
/* flag for FCoE offloads */ /* flag for FCoE offloads */
if (skb->protocol == htons(ETH_P_FCOE)) if (skb->protocol == htons(ETH_P_FCOE))
tx_flags |= IXGBE_TX_FLAGS_FCOE; tx_flags |= IXGBE_TX_FLAGS_FCOE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment