netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on
@ 2009-01-20  0:11 Jeff Kirsher
  2009-01-20  0:11 ` [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0 Jeff Kirsher
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jeff Kirsher @ 2009-01-20  0:11 UTC (permalink / raw)
  To: davem; +Cc: netdev, jeff, Don Skidmore, Peter P Waskiewicz Jr, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

The is an issue where setting Relaxed Ordering (RO) bit
(in a PCI-E write transaction) on 82598 causing the chipset
to drop DCA hints.  This patch forces RO not to be set for
descriptors as well as payload.  This will only be in effect
while DCA is enabled and no performance difference was
noticed in testing.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    3 +++
 drivers/net/ixgbe/ixgbe_type.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index acef3c6..92d9b17 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -318,6 +318,9 @@ static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
 		rxctrl |= dca3_get_tag(&adapter->pdev->dev, cpu);
 		rxctrl |= IXGBE_DCA_RXCTRL_DESC_DCA_EN;
 		rxctrl |= IXGBE_DCA_RXCTRL_HEAD_DCA_EN;
+		rxctrl &= ~(IXGBE_DCA_RXCTRL_DESC_RRO_EN);
+		rxctrl &= ~(IXGBE_DCA_RXCTRL_DESC_WRO_EN |
+			    IXGBE_DCA_RXCTRL_DESC_HSRO_EN);
 		IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_RXCTRL(q), rxctrl);
 		rx_ring->cpu = cpu;
 	}
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index 83a11ff..f011c57 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -404,6 +404,9 @@
 #define IXGBE_DCA_RXCTRL_DESC_DCA_EN (1 << 5) /* DCA Rx Desc enable */
 #define IXGBE_DCA_RXCTRL_HEAD_DCA_EN (1 << 6) /* DCA Rx Desc header enable */
 #define IXGBE_DCA_RXCTRL_DATA_DCA_EN (1 << 7) /* DCA Rx Desc payload enable */
+#define IXGBE_DCA_RXCTRL_DESC_RRO_EN (1 << 9) /* DCA Rx rd Desc Relax Order */
+#define IXGBE_DCA_RXCTRL_DESC_WRO_EN (1 << 13) /* DCA Rx wr Desc Relax Order */
+#define IXGBE_DCA_RXCTRL_DESC_HSRO_EN (1 << 15) /* DCA Rx Split Header RO */
 
 #define IXGBE_DCA_TXCTRL_CPUID_MASK 0x0000001F /* Tx CPUID Mask */
 #define IXGBE_DCA_TXCTRL_DESC_DCA_EN (1 << 5) /* DCA Tx Desc enable */


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

* [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0
  2009-01-20  0:11 [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on Jeff Kirsher
@ 2009-01-20  0:11 ` Jeff Kirsher
  2009-01-20  0:55   ` David Miller
  2009-01-20  0:11 ` [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}() Jeff Kirsher
  2009-01-20  0:55 ` [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2009-01-20  0:11 UTC (permalink / raw)
  To: davem; +Cc: netdev, jeff, Don Skidmore, Peter P Waskiewicz Jr,
	Eric W Multanen

From: Don Skidmore <donald.c.skidmore@intel.com>

Register VLAN ID 0 so that frames with VLAN ID 0 are received and get their tag stripped when ixgbe is not in DCB mode.  VLAN ID 0 means that the frame is 'priority tagged' only - it is not a VLAN, but the priority value is the tag in valid.  The functions ixgbe_vlan_rx_register() and
ixgbe_vlan_rx_kill_vid() were moved up a couple functions to correct compiling issues with this change.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |   53 ++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 92d9b17..bf36737 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1744,6 +1744,32 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
 	IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum);
 }
 
+static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
+{
+	struct ixgbe_adapter *adapter = netdev_priv(netdev);
+	struct ixgbe_hw *hw = &adapter->hw;
+
+	/* add VID to filter table */
+	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
+}
+
+static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
+{
+	struct ixgbe_adapter *adapter = netdev_priv(netdev);
+	struct ixgbe_hw *hw = &adapter->hw;
+
+	if (!test_bit(__IXGBE_DOWN, &adapter->state))
+		ixgbe_irq_disable(adapter);
+
+	vlan_group_set_device(adapter->vlgrp, vid, NULL);
+
+	if (!test_bit(__IXGBE_DOWN, &adapter->state))
+		ixgbe_irq_enable(adapter);
+
+	/* remove VID from filter table */
+	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
+}
+
 static void ixgbe_vlan_rx_register(struct net_device *netdev,
                                    struct vlan_group *grp)
 {
@@ -1763,6 +1789,7 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
 	ctrl |= IXGBE_VLNCTRL_VME;
 	ctrl &= ~IXGBE_VLNCTRL_CFIEN;
 	IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl);
+	ixgbe_vlan_rx_add_vid(netdev, 0);
 
 	if (grp) {
 		/* enable VLAN tag insert/strip */
@@ -1776,32 +1803,6 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
 		ixgbe_irq_enable(adapter);
 }
 
-static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
-{
-	struct ixgbe_adapter *adapter = netdev_priv(netdev);
-	struct ixgbe_hw *hw = &adapter->hw;
-
-	/* add VID to filter table */
-	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
-}
-
-static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
-{
-	struct ixgbe_adapter *adapter = netdev_priv(netdev);
-	struct ixgbe_hw *hw = &adapter->hw;
-
-	if (!test_bit(__IXGBE_DOWN, &adapter->state))
-		ixgbe_irq_disable(adapter);
-
-	vlan_group_set_device(adapter->vlgrp, vid, NULL);
-
-	if (!test_bit(__IXGBE_DOWN, &adapter->state))
-		ixgbe_irq_enable(adapter);
-
-	/* remove VID from filter table */
-	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
-}
-
 static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
 {
 	ixgbe_vlan_rx_register(adapter->netdev, adapter->vlgrp);


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

* [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
  2009-01-20  0:11 [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on Jeff Kirsher
  2009-01-20  0:11 ` [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0 Jeff Kirsher
@ 2009-01-20  0:11 ` Jeff Kirsher
  2009-01-20  0:55   ` David Miller
  2009-01-20  0:55 ` [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2009-01-20  0:11 UTC (permalink / raw)
  To: davem; +Cc: netdev, jeff, Peter P Waskiewicz Jr, Jeff Kirsher

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
queues is redundant and unnecessary.  By the same token, netif_carrier_on()
will be sufficient to re-enable Tx, so waking the queues is unnecessary.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index bf36737..d2f4d5f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2078,6 +2078,9 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
 
 	ixgbe_irq_enable(adapter);
 
+	/* enable transmits */
+	netif_tx_start_all_queues(netdev);
+
 	/* bring the link up in the watchdog, this could race with our first
 	 * link up interrupt but shouldn't be a problem */
 	adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
@@ -3479,7 +3482,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
 			        (FLOW_TX ? "TX" : "None"))));
 
 			netif_carrier_on(netdev);
-			netif_tx_wake_all_queues(netdev);
 		} else {
 			/* Force detection of hung controller */
 			adapter->detect_tx_hung = true;
@@ -3491,7 +3493,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
 			printk(KERN_INFO "ixgbe: %s NIC Link is Down\n",
 			       netdev->name);
 			netif_carrier_off(netdev);
-			netif_tx_stop_all_queues(netdev);
 		}
 	}
 
@@ -4222,7 +4223,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
 	}
 
 	netif_carrier_off(netdev);
-	netif_tx_stop_all_queues(netdev);
 
 	strcpy(netdev->name, "eth%d");
 	err = register_netdev(netdev);


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

* Re: [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on
  2009-01-20  0:11 [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on Jeff Kirsher
  2009-01-20  0:11 ` [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0 Jeff Kirsher
  2009-01-20  0:11 ` [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}() Jeff Kirsher
@ 2009-01-20  0:55 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-01-20  0:55 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, jeff, donald.c.skidmore, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 19 Jan 2009 16:11:05 -0800

> The is an issue where setting Relaxed Ordering (RO) bit
> (in a PCI-E write transaction) on 82598 causing the chipset
> to drop DCA hints.  This patch forces RO not to be set for
> descriptors as well as payload.  This will only be in effect
> while DCA is enabled and no performance difference was
> noticed in testing.
> 
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

* Re: [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0
  2009-01-20  0:11 ` [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0 Jeff Kirsher
@ 2009-01-20  0:55   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-01-20  0:55 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, jeff, donald.c.skidmore, peter.p.waskiewicz.jr,
	eric.w.multanen

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 19 Jan 2009 16:11:26 -0800

> Register VLAN ID 0 so that frames with VLAN ID 0 are received and get their tag stripped when ixgbe is not in DCB mode.  VLAN ID 0 means that the frame is 'priority tagged' only - it is not a VLAN, but the priority value is the tag in valid.  The functions ixgbe_vlan_rx_register() and
> ixgbe_vlan_rx_kill_vid() were moved up a couple functions to correct compiling issues with this change.
> 
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>

Applied.

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

* Re: [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
  2009-01-20  0:11 ` [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}() Jeff Kirsher
@ 2009-01-20  0:55   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-01-20  0:55 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, jeff, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 19 Jan 2009 16:11:47 -0800

> netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
> queues is redundant and unnecessary.  By the same token, netif_carrier_on()
> will be sufficient to re-enable Tx, so waking the queues is unnecessary.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

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

end of thread, other threads:[~2009-01-20  0:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20  0:11 [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on Jeff Kirsher
2009-01-20  0:11 ` [PATCH 2/3] ixgbe: fix tag stripping for VLAN ID 0 Jeff Kirsher
2009-01-20  0:55   ` David Miller
2009-01-20  0:11 ` [PATCH 3/3] ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}() Jeff Kirsher
2009-01-20  0:55   ` David Miller
2009-01-20  0:55 ` [PATCH 1/3] ixgbe: fix dca issue with relaxed ordering turned on 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).