DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Zaiyu Wang <zaiyuwang@trustnetic.com>
Cc: dev@dpdk.org, stable@dpdk.org, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: Re: [PATCH v12 16/17] net/txgbe: respect manual link-down on Amber-Lite
Date: Tue, 27 Oct 2026 06:48:55 -0700	[thread overview]
Message-ID: <20261027064855.1b35835a@phoenix.local> (raw)
In-Reply-To: <7DFF83FB89E01083+20261027114218.9724-17-zaiyuwang@trustnetic.com>

On Tue, 27 Oct 2026 19:38:32 +0800
Zaiyu Wang <zaiyuwang@trustnetic.com> wrote:

> txgbe_dev_set_link_down() clears hw->dev_start, but the Amber-Lite
> AN73 watchdog treats a down link as a recovery condition and can start
> negotiation again. The setup-link alarm handler can likewise configure
> the PHY after a link update or a previous setup retry.
> 
> As a result, a port brought down through rte_eth_dev_set_link_down()
> can link up again without a matching rte_eth_dev_set_link_up() call.
> 
> Use hw->dev_start as the administrative link gate, and skip link
> recovery while the port is administratively down.
> 
> The gate alone is not enough. A setup-link run that started before
> link-down keeps going and rewrites the PMD transmit and receive
> enables, so the port reports down while the peer still sees a signal.
> Stop the AN73 watchdog and the setup-link alarm, wait for a running
> link thread to finish, and only then drop the transmitter.
> 
> Arm the watchdog again on link-up so that monitoring resumes, and
> cancel it first. The alarm list keeps every entry registered for the
> same callback, and each entry re-arms itself, so arming without
> cancelling would leave two watchdog chains running.
> 
> This keeps the link down until rte_eth_dev_set_link_up() explicitly
> re-enables it. The link-up path then restores the required PHY
> configuration.
> 
> Fixes: 234ce0d1fa9d ("net/txgbe: fix link stability for Amber-Lite backplane mode")
> Fixes: 6104fd11086e ("net/txgbe: fix link stability for 25G NIC")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Zaiyu Wang <zaiyuwang@trustnetic.com>
> ---

The only valid warning left on AI review of this series is:

Subject: Re: [PATCH v12 00/17] Wangxun fixes and new features

Series applies to main and every commit builds with -Dwerror=true.
v12 addresses the v11 comments on 05, 12, 13, 15 and 16.

Warnings
--------

Patch 16/17 (net/txgbe: respect manual link-down on Amber-Lite)

set_link_down() now stops the link alarm, the AN73 watchdog and the
link thread, but module insertion still brings the link back.
txgbe_dev_detect_sfp() is not cancelled, and on a successful
identify it calls

		txgbe_dev_setup_link_alarm_handler(dev);

which, unlike the _aml variant, does not check hw->dev_start and
calls setup_link() directly. On AML40 the 2 s module poll added in
10/17 keeps running while the port is administratively down, so
plugging in a DAC or QSFP module reprograms the PHY and lights the
link the user turned off. On the 25G MAC the same happens through
the module interrupt, and txgbe_set_link_to_amlite() also re-enables
the GPIO laser there.

Gate it on dev_start, and since set_link_up() then has to configure a
module that arrived while the port was down, run the link setup there
for both MACs:

	} else if (err == 0) {
		hw->mac.setup_sfp(hw);
		PMD_DRV_LOG(INFO, "detected SFP+: %d", hw->phy.sfp_type);
		if (hw->dev_start)
			txgbe_dev_setup_link_alarm_handler(dev);

and in txgbe_dev_set_link_up():

-		if (hw->mac.type == txgbe_mac_aml40) {
+		if (hw->mac.type == txgbe_mac_aml ||
+		    hw->mac.type == txgbe_mac_aml40) {

Review-Result: WARNING

  reply	other threads:[~2026-10-27 13:49 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 11:41 [PATCH 00/13] Wangxun fixes and new features Zaiyu Wang
2026-08-27 20:11 ` Stephen Hemminger
2026-09-08 12:43   ` Zaiyu Wang
2026-10-12 10:56 ` [PATCH v8 00/16] " Zaiyu Wang
2026-10-12 21:41   ` Stephen Hemminger
     [not found] ` <20261012110518.1911-1-zaiyuwang@trustnetic.com>
2026-10-12 10:56   ` [PATCH v8 01/16] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 02/16] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 03/16] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 04/16] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 05/16] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 06/16] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 07/16] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 08/16] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 09/16] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 10/16] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 11/16] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 12/16] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 13/16] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 14/16] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 15/16] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 16/16] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-22 11:03 ` [PATCH v9 00/16] Wangxun fixes and new features Zaiyu Wang
2026-10-22 17:17   ` Stephen Hemminger
2026-10-23 11:10     ` Zaiyu Wang
     [not found] ` <20261022111017.3605-1-zaiyuwang@trustnetic.com>
2026-10-22 11:03   ` [PATCH v9 01/16] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 02/16] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 03/16] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 04/16] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 05/16] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 06/16] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 07/16] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 08/16] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 09/16] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 10/16] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 11/16] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 12/16] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 13/16] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 14/16] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 15/16] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 16/16] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-23 11:03 ` [PATCH v10 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-23 16:01   ` Stephen Hemminger
2026-10-26 12:27     ` Zaiyu Wang
     [not found] ` <20261023110728.3975-1-zaiyuwang@trustnetic.com>
2026-10-23 11:03   ` [PATCH v10 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 13/17] net/txgbe: add devarg to turn off Tx laser for AML40 Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 17/17] net/txgbe: fix typo in the fiber_support_speed field Zaiyu Wang
2026-10-26 12:21 ` [PATCH v11 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-26 16:28   ` Stephen Hemminger
2026-10-27 11:45     ` Zaiyu Wang
     [not found] ` <20261026122638.9198-1-zaiyuwang@trustnetic.com>
2026-10-26 12:21   ` [PATCH v11 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 17/17] net/txgbe: fix typo in the fiber support speed field Zaiyu Wang
2026-10-27 11:38 ` [PATCH v12 00/17] Wangxun fixes and new features Zaiyu Wang
     [not found] ` <20261027114218.9724-1-zaiyuwang@trustnetic.com>
2026-10-27 11:38   ` [PATCH v12 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-27 13:48     ` Stephen Hemminger [this message]
2026-10-28 10:40       ` Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 17/17] net/txgbe: fix typo in the fiber support speed field Zaiyu Wang
2026-10-28 10:33 ` [PATCH v13 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-28 15:32   ` Stephen Hemminger
     [not found] ` <20261028103913.10188-1-zaiyuwang@trustnetic.com>
2026-10-28 10:33   ` [PATCH v13 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 17/17] net/txgbe: fix typo in the fiber support speed field 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=20261027064855.1b35835a@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=stable@dpdk.org \
    --cc=zaiyuwang@trustnetic.com \
    /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