aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2010-08-08 11:46:15 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-08 23:02:44 -0400
commit4bc091d85f979a1a18ef2d710b819b3c5b397707 (patch)
tree01a5155e8966d53514648b211aaea13843c655b9 /drivers/net/ixgbe/ixgbe_main.c
parent16d884bd901288fb5cde876489f7093740b66a30 (diff)
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: divya <dipraksh@linux.vnet.ibm.com> Reported-by: Jon Mason <jon.mason@exar.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 7d6a415bcf88..55394a2d3a8f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6155,9 +6155,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
6155 txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); 6155 txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
6156 txq += adapter->ring_feature[RING_F_FCOE].mask; 6156 txq += adapter->ring_feature[RING_F_FCOE].mask;
6157 return txq; 6157 return txq;
6158#ifdef CONFIG_IXGBE_DCB
6158 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 6159 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
6159 txq = adapter->fcoe.up; 6160 txq = adapter->fcoe.up;
6160 return txq; 6161 return txq;
6162#endif
6161 } 6163 }
6162 } 6164 }
6163#endif 6165#endif
@@ -6216,10 +6218,14 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
6216 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED && 6218 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED &&
6217 (skb->protocol == htons(ETH_P_FCOE) || 6219 (skb->protocol == htons(ETH_P_FCOE) ||
6218 skb->protocol == htons(ETH_P_FIP))) { 6220 skb->protocol == htons(ETH_P_FIP))) {
6219 tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK 6221#ifdef CONFIG_IXGBE_DCB
6220 << IXGBE_TX_FLAGS_VLAN_SHIFT); 6222 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
6221 tx_flags |= ((adapter->fcoe.up << 13) 6223 tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
6222 << IXGBE_TX_FLAGS_VLAN_SHIFT); 6224 << IXGBE_TX_FLAGS_VLAN_SHIFT);
6225 tx_flags |= ((adapter->fcoe.up << 13)
6226 << IXGBE_TX_FLAGS_VLAN_SHIFT);
6227 }
6228#endif
6223 /* flag for FCoE offloads */ 6229 /* flag for FCoE offloads */
6224 if (skb->protocol == htons(ETH_P_FCOE)) 6230 if (skb->protocol == htons(ETH_P_FCOE))
6225 tx_flags |= IXGBE_TX_FLAGS_FCOE; 6231 tx_flags |= IXGBE_TX_FLAGS_FCOE;