Patchwork [net-2.6,3/4] igb: correctly offset 82575 flow control watermarks by 16 bytes

login
register
mail settings
Submitter Jeff Kirsher
Date Dec. 23, 2009, 11:21 p.m.
Message ID <20091223232126.16146.13862.stgit@localhost.localdomain>
Download mbox | patch
Permalink /patch/41705/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Dec. 23, 2009, 11:21 p.m.
From: Alexander Duyck <alexander.h.duyck@intel.com>

The watermark values for the 82575 were not being set correctly.  As a
result the high and low watermark values were set to the same value which
can lead to excess xon/xoff packets being generated.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 24, 2009, 4:55 a.m.
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 23 Dec 2009 15:21:27 -0800

> From: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> The watermark values for the 82575 were not being set correctly.  As a
> result the high and low watermark values were set to the same value which
> can lead to excess xon/xoff packets being generated.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 78963a0..933c64f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1306,13 +1306,8 @@  void igb_reset(struct igb_adapter *adapter)
 	hwm = min(((pba << 10) * 9 / 10),
 			((pba << 10) - 2 * adapter->max_frame_size));
 
-	if (mac->type < e1000_82576) {
-		fc->high_water = hwm & 0xFFF8;	/* 8-byte granularity */
-		fc->low_water = fc->high_water - 8;
-	} else {
-		fc->high_water = hwm & 0xFFF0;	/* 16-byte granularity */
-		fc->low_water = fc->high_water - 16;
-	}
+	fc->high_water = hwm & 0xFFF0;	/* 16-byte granularity */
+	fc->low_water = fc->high_water - 16;
 	fc->pause_time = 0xFFFF;
 	fc->send_xon = 1;
 	fc->current_mode = fc->requested_mode;