From: Zaiyu Wang <zaiyuwang@trustnetic.com>
To: dev@dpdk.org
Cc: Zaiyu Wang <zaiyuwang@trustnetic.com>,
stable@dpdk.org, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: [PATCH v6 11/15] net/txgbe: fix 40G FFE tuning applied to first lane only
Date: Tue, 29 Sep 2026 21:04:42 +0800 [thread overview]
Message-ID: <03123F32F4CF6ADB+20260929130611.4871-12-zaiyuwang@trustnetic.com> (raw)
In-Reply-To: <20260929130611.4871-1-zaiyuwang@trustnetic.com>
On the 40G NIC, an FFE value only reaches the first of the four
lanes: the E56 PHY holds one FFE byte per lane, but the tuned taps
were written as a single byte value, so the other three lanes keep
their default equalizer setting and the received signal on them can
be degraded.
Use the E56 PHY FFE defaults on the 40G NIC and replicate each tap
value over the four lanes. The FFE fields grow to 32 bits to hold
the replicated value, and the devargs are parsed after the shared
code init so the MAC type is known when the 40G defaults are picked.
Fixes: 6104fd11086e ("net/txgbe: fix link stability for 25G NIC")
Cc: stable@dpdk.org
Signed-off-by: Zaiyu Wang <zaiyuwang@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_e56.h | 5 +++++
drivers/net/txgbe/base/txgbe_type.h | 8 ++++----
drivers/net/txgbe/txgbe_ethdev.c | 22 +++++++++++++++++++++-
3 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_e56.h b/drivers/net/txgbe/base/txgbe_e56.h
index 1922a2eb92..fe9a83ae01 100644
--- a/drivers/net/txgbe/base/txgbe_e56.h
+++ b/drivers/net/txgbe/base/txgbe_e56.h
@@ -1714,6 +1714,11 @@ typedef union {
#define S40G_TX_FFE_CFG_PRE2 0x0
#define S40G_TX_FFE_CFG_POST 0x11111111
+/* The 40G PHY holds one FFE byte per lane, so a user supplied value has to
+ * be replicated over the four lanes.
+ */
+#define S40G_TX_FFE_4LANE(v) ((u32)((v) & 0xFF) * 0x01010101u)
+
#define BYPASS_CTLE_TAG 0x0
#define S10G_PHY_RX_CTLE_TAPWT_WEIGHT1 0x1
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index f9b5cbe61a..4ed4737043 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -739,10 +739,10 @@ struct txgbe_phy_info {
/* Some features need tri-state capability */
u16 ffe_set;
- u16 ffe_main;
- u16 ffe_pre;
- u16 ffe_pre2;
- u16 ffe_post;
+ u32 ffe_main;
+ u32 ffe_pre;
+ u32 ffe_pre2;
+ u32 ffe_post;
u16 fec_mode;
u16 bp_capa;
};
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 222c82694e..db773a1b9a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -483,6 +483,7 @@ txgbe_parse_devargs(struct rte_eth_dev *dev)
u16 ffe_set = 0;
u16 ffe_main = 27;
u16 ffe_pre = 8;
+ u16 ffe_pre2 = 0;
u16 ffe_post = 44;
/* FDIR args */
u16 pballoc = 0;
@@ -492,6 +493,15 @@ txgbe_parse_devargs(struct rte_eth_dev *dev)
u16 tx_headwb_size = 16;
u16 rx_desc_merge = 1;
+ /* The 40G NIC holds one FFE byte per lane, so the E56 PHY defaults
+ * below are later replicated over the four lanes.
+ */
+ if (hw->mac.type == txgbe_mac_aml40) {
+ ffe_main = S40G_TX_FFE_CFG_MAIN & 0xFF;
+ ffe_pre = S40G_TX_FFE_CFG_PRE1 & 0xFF;
+ ffe_post = S40G_TX_FFE_CFG_POST & 0xFF;
+ }
+
if (devargs == NULL)
goto null;
@@ -540,6 +550,14 @@ txgbe_parse_devargs(struct rte_eth_dev *dev)
hw->phy.ffe_pre = ffe_pre;
hw->phy.ffe_post = ffe_post;
+ /* The 40G PHY expects one FFE byte per lane. */
+ if (hw->mac.type == txgbe_mac_aml40) {
+ hw->phy.ffe_main = S40G_TX_FFE_4LANE(ffe_main);
+ hw->phy.ffe_pre = S40G_TX_FFE_4LANE(ffe_pre);
+ hw->phy.ffe_pre2 = S40G_TX_FFE_4LANE(ffe_pre2);
+ hw->phy.ffe_post = S40G_TX_FFE_4LANE(ffe_post);
+ }
+
fdir_conf->pballoc = pballoc;
fdir_conf->drop_queue = drop_queue;
}
@@ -642,7 +660,6 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
hw->isb_dma = TMZ_PADDR(mz);
hw->isb_mem = TMZ_VADDR(mz);
- txgbe_parse_devargs(eth_dev);
/* Initialize the shared code (base driver) */
err = txgbe_init_shared_code(hw);
if (err != 0) {
@@ -650,6 +667,9 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
return -EIO;
}
+ /* Parsing the devargs requires a known MAC type. */
+ txgbe_parse_devargs(eth_dev);
+
if (hw->mac.type == txgbe_mac_aml)
txgbe_override_mac_ops(hw);
--
2.55.0.windows.2
next prev parent reply other threads:[~2026-09-29 13:07 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260827114309.10530-1-zaiyuwang@trustnetic.com>
2026-08-27 11:41 ` [PATCH 01/13] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-08-27 11:41 ` [PATCH 02/13] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-08-27 11:41 ` [PATCH 03/13] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-08-27 11:41 ` [PATCH 04/13] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-08-27 11:41 ` [PATCH 05/13] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-08-27 11:41 ` [PATCH 06/13] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-08-27 11:41 ` [PATCH 07/13] net/txgbe: add offload support for tunnel type UDP Zaiyu Wang
2026-08-27 11:42 ` [PATCH 08/13] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-08-27 11:42 ` [PATCH 09/13] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-08-27 11:42 ` [PATCH 10/13] net/txgbe: add backplane FFE and capability devargs Zaiyu Wang
2026-08-27 11:42 ` [PATCH 11/13] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-08-27 11:42 ` [PATCH 12/13] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-08-27 11:42 ` [PATCH 13/13] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 00/15] Wangxun fixes and new features Zaiyu Wang
[not found] ` <20260908124047.2284-1-zaiyuwang@trustnetic.com>
2026-09-08 12:38 ` [PATCH v2 01/15] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 02/15] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 03/15] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 04/15] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 05/15] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 06/15] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 07/15] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 08/15] net/txgbe: add offload support for tunnel type UDP Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 09/15] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 10/15] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 11/15] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 12/15] net/txgbe: add pre2 and backplane capability devargs Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 13/15] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-08 12:38 ` [PATCH v2 14/15] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-08 12:39 ` [PATCH v2 15/15] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 00/15] Wangxun fixes and new features Zaiyu Wang
2026-09-08 14:20 ` Stephen Hemminger
[not found] ` <20260908132742.2661-1-zaiyuwang@trustnetic.com>
2026-09-08 13:25 ` [PATCH v3 01/15] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 02/15] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 03/15] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 04/15] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 05/15] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 06/15] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 07/15] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 08/15] net/txgbe: add offload support for tunnel type UDP Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 09/15] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 10/15] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 11/15] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 12/15] net/txgbe: add pre2 and backplane capability devargs Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 13/15] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-08 13:25 ` [PATCH v3 14/15] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-08 13:26 ` [PATCH v3 15/15] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 00/16] Wangxun fixes and new features Zaiyu Wang
2026-09-22 13:35 ` Stephen Hemminger
2026-09-29 11:21 ` Zaiyu Wang
[not found] ` <20260922125414.3638-1-zaiyuwang@trustnetic.com>
2026-09-22 12:37 ` [PATCH v4 01/16] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 02/16] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 03/16] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 04/16] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 05/16] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 06/16] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 07/16] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 08/16] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 09/16] net/txgbe: add offload support for tunnel type UDP Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 10/16] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 11/16] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 12/16] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 13/16] net/txgbe: fix unset pre2 FFE tap and backplane capability Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 14/16] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 15/16] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-22 12:37 ` [PATCH v4 16/16] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 00/15] Wangxun fixes and new features Zaiyu Wang
[not found] ` <20260929112119.4516-1-zaiyuwang@trustnetic.com>
2026-09-29 11:18 ` [PATCH v5 01/15] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 02/15] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 03/15] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 04/15] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 05/15] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 06/15] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 07/15] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 08/15] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 09/15] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 10/15] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 11/15] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 12/15] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 13/15] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 14/15] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-29 11:18 ` [PATCH v5 15/15] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 00/15] Wangxun fixes and new features Zaiyu Wang
2026-09-29 16:05 ` Stephen Hemminger
2026-09-30 10:22 ` Zaiyu Wang
[not found] ` <20260929130611.4871-1-zaiyuwang@trustnetic.com>
2026-09-29 13:04 ` [PATCH v6 01/15] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 02/15] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 03/15] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 04/15] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 05/15] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 06/15] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 07/15] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 08/15] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 09/15] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 10/15] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-29 13:04 ` Zaiyu Wang [this message]
2026-09-29 13:04 ` [PATCH v6 12/15] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 13/15] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 14/15] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-29 13:04 ` [PATCH v6 15/15] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 00/15] Wangxun fixes and new features Zaiyu Wang
2026-09-30 16:18 ` Stephen Hemminger
[not found] ` <20260930102042.2214-1-zaiyuwang@trustnetic.com>
2026-09-30 10:17 ` [PATCH v7 01/15] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 02/15] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 03/15] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 04/15] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 05/15] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 06/15] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 07/15] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 08/15] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 09/15] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 10/15] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 11/15] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-09-30 10:17 ` [PATCH v7 12/15] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-09-30 10:18 ` [PATCH v7 13/15] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-09-30 10:18 ` [PATCH v7 14/15] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-09-30 10:18 ` [PATCH v7 15/15] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03123F32F4CF6ADB+20260929130611.4871-12-zaiyuwang@trustnetic.com \
--to=zaiyuwang@trustnetic.com \
--cc=dev@dpdk.org \
--cc=jiawenwu@trustnetic.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox