* [net-2.6 PATCH] ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG
@ 2010-08-09 1:46 Jeff Kirsher
2010-08-09 3:03 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2010-08-09 1:46 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, bphilips, John Fastabend, Jeff Kirsher
From: John Fastabend <john.r.fastabend@intel.com>
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>
---
drivers/net/ixgbe/ixgbe_main.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 7d6a415..55394a2 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)
txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
txq += adapter->ring_feature[RING_F_FCOE].mask;
return txq;
+#ifdef CONFIG_IXGBE_DCB
} else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
txq = adapter->fcoe.up;
return txq;
+#endif
}
}
#endif
@@ -6216,10 +6218,14 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED &&
(skb->protocol == htons(ETH_P_FCOE) ||
skb->protocol == htons(ETH_P_FIP))) {
- tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
- << IXGBE_TX_FLAGS_VLAN_SHIFT);
- tx_flags |= ((adapter->fcoe.up << 13)
- << IXGBE_TX_FLAGS_VLAN_SHIFT);
+#ifdef CONFIG_IXGBE_DCB
+ if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+ tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
+ << IXGBE_TX_FLAGS_VLAN_SHIFT);
+ tx_flags |= ((adapter->fcoe.up << 13)
+ << IXGBE_TX_FLAGS_VLAN_SHIFT);
+ }
+#endif
/* flag for FCoE offloads */
if (skb->protocol == htons(ETH_P_FCOE))
tx_flags |= IXGBE_TX_FLAGS_FCOE;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-2.6 PATCH] ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG
2010-08-09 1:46 [net-2.6 PATCH] ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG Jeff Kirsher
@ 2010-08-09 3:03 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-08-09 3:03 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, john.r.fastabend
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sun, 08 Aug 2010 18:46:15 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-09 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 1:46 [net-2.6 PATCH] ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG Jeff Kirsher
2010-08-09 3:03 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).