All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames
@ 2010-03-24 22:45 Jeff Kirsher
  2010-03-24 22:45 ` [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues Jeff Kirsher
  2010-03-26 18:58 ` [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2010-03-24 22:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Robert Love, Chris Leech, Jeff Kirsher

From: Robert Love <robert.w.love@intel.com>

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>
---

 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 a9147e5..997d997 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5628,7 +5628,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
 
 #ifdef IXGBE_FCOE
 	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)))) {
 		txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
 		txq += adapter->ring_feature[RING_F_FCOE].mask;
 		return txq;
@@ -5675,18 +5676,25 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
 
 	tx_ring = adapter->tx_ring[skb->queue_mapping];
 
-	if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
-	    (skb->protocol == htons(ETH_P_FCOE))) {
-		tx_flags |= IXGBE_TX_FLAGS_FCOE;
 #ifdef IXGBE_FCOE
+	if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) {
 #ifdef CONFIG_IXGBE_DCB
-		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
+		/* for FCoE with DCB, we force the priority to what
+		 * was specified by the switch */
+		if ((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);
+		}
 #endif
+		/* flag for FCoE offloads */
+		if (skb->protocol == htons(ETH_P_FCOE))
+			tx_flags |= IXGBE_TX_FLAGS_FCOE;
 	}
+#endif
+
 	/* four things can cause us to need a context descriptor */
 	if (skb_is_gso(skb) ||
 	    (skb->ip_summed == CHECKSUM_PARTIAL) ||


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues
  2010-03-24 22:45 [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames Jeff Kirsher
@ 2010-03-24 22:45 ` Jeff Kirsher
  2010-03-26 18:58   ` David Miller
  2010-03-26 18:58 ` [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2010-03-24 22:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Chris Leech, Jeff Kirsher

From: Chris Leech <christopher.leech@intel.com>

During FCF solicitation, the switch is supposed to pad the
solicited advertisement out to the endpoints specified
maximum FCoE frame size.  That means that we need to receive
FIP frames that are larger than the standard MTU.  To make
sure the receive queue is configured correctly, we should be
filtering FIP traffic into the FCoE queues.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_fcoe.c |   15 +++++++++++++++
 drivers/net/ixgbe/ixgbe_type.h |    1 +
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index e1978da..9276d59 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -522,6 +522,9 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
 	/* Enable L2 eth type filter for FCoE */
 	IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FCOE),
 			(ETH_P_FCOE | IXGBE_ETQF_FCOE | IXGBE_ETQF_FILTER_EN));
+	/* Enable L2 eth type filter for FIP */
+	IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FIP),
+			(ETH_P_FIP | IXGBE_ETQF_FILTER_EN));
 	if (adapter->ring_feature[RING_F_FCOE].indices) {
 		/* Use multiple rx queues for FCoE by redirection table */
 		for (i = 0; i < IXGBE_FCRETA_SIZE; i++) {
@@ -532,6 +535,12 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
 		}
 		IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, IXGBE_FCRECTL_ENA);
 		IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0);
+		fcoe_i = f->mask;
+		fcoe_i &= IXGBE_FCRETA_ENTRY_MASK;
+		fcoe_q = adapter->rx_ring[fcoe_i]->reg_idx;
+		IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FIP),
+				IXGBE_ETQS_QUEUE_EN |
+				(fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
 	} else  {
 		/* Use single rx queue for FCoE */
 		fcoe_i = f->mask;
@@ -541,6 +550,12 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
 				IXGBE_ETQS_QUEUE_EN |
 				(fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
 	}
+	/* send FIP frames to the first FCoE queue */
+	fcoe_i = f->mask;
+	fcoe_q = adapter->rx_ring[fcoe_i]->reg_idx;
+	IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FIP),
+			IXGBE_ETQS_QUEUE_EN |
+			(fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
 
 	IXGBE_WRITE_REG(hw, IXGBE_FCRXCTRL,
 			IXGBE_FCRXCTRL_FCOELLI |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index c574d0a..aed4ed6 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -1298,6 +1298,7 @@
 #define IXGBE_ETQF_FILTER_BCN            1
 #define IXGBE_ETQF_FILTER_FCOE           2
 #define IXGBE_ETQF_FILTER_1588           3
+#define IXGBE_ETQF_FILTER_FIP            4
 /* VLAN Control Bit Masks */
 #define IXGBE_VLNCTRL_VET       0x0000FFFF  /* bits 0-15 */
 #define IXGBE_VLNCTRL_CFI       0x10000000  /* bit 28 */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames
  2010-03-24 22:45 [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames Jeff Kirsher
  2010-03-24 22:45 ` [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues Jeff Kirsher
@ 2010-03-26 18:58 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-03-26 18:58 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, robert.w.love, christopher.leech

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Mar 2010 15:45:00 -0700

> From: Robert Love <robert.w.love@intel.com>
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues
  2010-03-24 22:45 ` [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues Jeff Kirsher
@ 2010-03-26 18:58   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-03-26 18:58 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, christopher.leech

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Mar 2010 15:45:21 -0700

> From: Chris Leech <christopher.leech@intel.com>
> 
> During FCF solicitation, the switch is supposed to pad the
> solicited advertisement out to the endpoints specified
> maximum FCoE frame size.  That means that we need to receive
> FIP frames that are larger than the standard MTU.  To make
> sure the receive queue is configured correctly, we should be
> filtering FIP traffic into the FCoE queues.
> 
> Signed-off-by: Chris Leech <christopher.leech@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-26 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 22:45 [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames Jeff Kirsher
2010-03-24 22:45 ` [net-2.6 PATCH 2/2] ixgbe: filter FIP frames into the FCoE offload queues Jeff Kirsher
2010-03-26 18:58   ` David Miller
2010-03-26 18:58 ` [net-2.6 PATCH 1/2] ixgbe: Priority tag FIP frames David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.