* [dpdk-dev] [PATCH] igb: set default thresholds correctly based on mac type
@ 2016-01-22 1:38 Stephen Hemminger
2016-02-01 2:59 ` Lu, Wenzhuo
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2016-01-22 1:38 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev
This brings the DPDK igb driver inline with the behavior used by
the current Linux driver. The IGB hardware has several different
MAC types and the threshold values that work vary based on the hardware.
Since DPDK 1.8 it has been up to devices to provide the correct default
configuration parameter. But the igb driver gives values that are broken
on some devices, and always causes a warning message at startup.
Please test this on real hardware, I don't have the luxury of a
hardware lab full of variations of this chip.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/e1000/igb_ethdev.c | 11 ++++++-----
drivers/net/e1000/igb_rxtx.c | 8 ++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index d1bbcda..31b2c1f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -61,13 +61,14 @@
* Default values for port configuration
*/
#define IGB_DEFAULT_RX_FREE_THRESH 32
-#define IGB_DEFAULT_RX_PTHRESH 8
+
+#define IGB_DEFAULT_RX_PTHRESH ((hw->mac.type == e1000_i354) ? 12 : 8)
#define IGB_DEFAULT_RX_HTHRESH 8
-#define IGB_DEFAULT_RX_WTHRESH 0
+#define IGB_DEFAULT_RX_WTHRESH ((hw->mac.type == e1000_82576) ? 1 : 4)
-#define IGB_DEFAULT_TX_PTHRESH 32
-#define IGB_DEFAULT_TX_HTHRESH 0
-#define IGB_DEFAULT_TX_WTHRESH 0
+#define IGB_DEFAULT_TX_PTHRESH ((hw->mac.type == e1000_i354) ? 20: 8)
+#define IGB_DEFAULT_TX_HTHRESH 1
+#define IGB_DEFAULT_TX_WTHRESH ((hw->mac.type == e1000_82576) ? 1 : 16)
#define IGB_HKEY_MAX_INDEX 10
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 996e7da..499b6b4 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1315,13 +1315,13 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
* driver.
*/
if (tx_conf->tx_free_thresh != 0)
- PMD_INIT_LOG(WARNING, "The tx_free_thresh parameter is not "
+ PMD_INIT_LOG(INFO, "The tx_free_thresh parameter is not "
"used for the 1G driver.");
if (tx_conf->tx_rs_thresh != 0)
- PMD_INIT_LOG(WARNING, "The tx_rs_thresh parameter is not "
+ PMD_INIT_LOG(INFO, "The tx_rs_thresh parameter is not "
"used for the 1G driver.");
- if (tx_conf->tx_thresh.wthresh == 0)
- PMD_INIT_LOG(WARNING, "To improve 1G driver performance, "
+ if (tx_conf->tx_thresh.wthresh == 0 && hw->mac.type != e1000_82576)
+ PMD_INIT_LOG(INFO, "To improve 1G driver performance, "
"consider setting the TX WTHRESH value to 4, 8, "
"or 16.");
--
2.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] igb: set default thresholds correctly based on mac type
2016-01-22 1:38 [dpdk-dev] [PATCH] igb: set default thresholds correctly based on mac type Stephen Hemminger
@ 2016-02-01 2:59 ` Lu, Wenzhuo
2016-02-16 10:34 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2016-02-01 2:59 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Friday, January 22, 2016 9:39 AM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Stephen Hemminger
> Subject: [PATCH] igb: set default thresholds correctly based on mac type
>
> This brings the DPDK igb driver inline with the behavior used by the current Linux
> driver. The IGB hardware has several different MAC types and the threshold
> values that work vary based on the hardware.
>
> Since DPDK 1.8 it has been up to devices to provide the correct default
> configuration parameter. But the igb driver gives values that are broken on
> some devices, and always causes a warning message at startup.
>
> Please test this on real hardware, I don't have the luxury of a hardware lab full
> of variations of this chip.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] igb: set default thresholds correctly based on mac type
2016-02-01 2:59 ` Lu, Wenzhuo
@ 2016-02-16 10:34 ` Bruce Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2016-02-16 10:34 UTC (permalink / raw)
To: Lu, Wenzhuo; +Cc: dev
On Mon, Feb 01, 2016 at 02:59:13AM +0000, Lu, Wenzhuo wrote:
>
>
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Friday, January 22, 2016 9:39 AM
> > To: Lu, Wenzhuo
> > Cc: dev@dpdk.org; Stephen Hemminger
> > Subject: [PATCH] igb: set default thresholds correctly based on mac type
> >
> > This brings the DPDK igb driver inline with the behavior used by the current Linux
> > driver. The IGB hardware has several different MAC types and the threshold
> > values that work vary based on the hardware.
> >
> > Since DPDK 1.8 it has been up to devices to provide the correct default
> > configuration parameter. But the igb driver gives values that are broken on
> > some devices, and always causes a warning message at startup.
> >
> > Please test this on real hardware, I don't have the luxury of a hardware lab full
> > of variations of this chip.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
>
Applied to dpdk-next-net/rel_16_04
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-16 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 1:38 [dpdk-dev] [PATCH] igb: set default thresholds correctly based on mac type Stephen Hemminger
2016-02-01 2:59 ` Lu, Wenzhuo
2016-02-16 10:34 ` Bruce Richardson
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).