net: mana: Add debug knob to skip TX timeout recovery reset
Subsystems (5)
PATCH 1/1 net: mana: Add debug knob to skip TX timeout recovery reset
Add a per-port debugfs boolean "tx_timeout_skip_reset" that, when enabled, makes mana_tx_timeout() log the TX timeout and return without queueing the per-port detach/attach recovery work.
This is a debug-only aid for bringup and qualification: skipping the recovery reset keeps the device and queue state intact so a TX timeout can be correlated with hardware telemetry. The knob defaults to false, so production recovery behaviour is unchanged.
--- drivers/net/ethernet/microsoft/mana/mana_en.c | 14 ++++++++++++++ include/net/mana/mana.h | 3 +++ 2 files changed, 17 insertions(+)
drivers/net/ethernet/microsoft/mana/mana_en.c +14 -0
@@ -892,6 +892,17 @@ static void mana_tx_timeout(struct net_device *netdev, unsigned int txqueue)struct mana_context *ac = apc->ac;struct gdma_context *gc = ac->gdma_dev->gdma_context; +/* Debug knob for bringup/qualification: when set, log the timeout and +* skip the reset so the failing state is preserved for telemetry. +* Disabled by default; production behaviour is unchanged. +*/ +if (READ_ONCE (apc->tx_timeout_skip_reset)) { +netdev_warn (netdev, +"TX timeout on queue %u: reset skipped (tx_timeout_skip_reset enabled)\n" , + txqueue); +return ; + } +/* Already in service, hence tx queue reset is not required.*/ if (test_bit (GC_IN_SERVICE , &gc->flags))return ;
@@ -3486,6 +3497,9 @@ static int mana_init_port(struct net_device *ndev) &apc->steer_cqe_coalescing);debugfs_create_u32 ("current_speed" ,0400 , apc->mana_port_debugfs, &apc->speed); +debugfs_create_bool ("tx_timeout_skip_reset" ,0600 , + apc->mana_port_debugfs, + &apc->tx_timeout_skip_reset);return 0 ; reset_apc:
include/net/mana/mana.h +3 -0
@@ -530,6 +530,9 @@ struct mana_port_context {struct net_device *ndev;struct work_struct queue_reset_work; +/* Debug knob to log TX timeout but skip recovery reset */ +bool tx_timeout_skip_reset; +u8 mac_addr[ETH_ALEN ];struct mana_eq *eqs;
Signature · 1 line
2.43.0
Quoted 4 lines · Aditya Garg
Add a per-port debugfs boolean "
tx_timeout_skip_reset" that, when enabled, makesmana_tx_timeout()log the TX timeout and return without queueing the per-port detach/attach recovery work.
Quoted 8 lines
This is a debug-only aid for bringup and qualification: skipping the recovery reset keeps the device and queue state intact so a TX timeout can be correlated with hardware telemetry. The knob defaults to false, so production recovery behaviour is unchanged.
Signed-off-by Aditya Garg <[email protected]>Reviewed-by Haiyang Zhang <[email protected]>Reviewed-by Dipayaan Roy <[email protected]>
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Fri, 10 Jul 2026 06:22:29 -0700 you wrote:
Add a per-port debugfs boolean "
tx_timeout_skip_reset" that, when enabled, makesmana_tx_timeout()log the TX timeout and return without queueing the per-port detach/attach recovery work.This is a debug-only aid for bringup and qualification: skipping the recovery reset keeps the device and queue state intact so a TX timeout can be correlated with hardware telemetry. The knob defaults to false, so production recovery behaviour is unchanged.
[...]
Here is the summary with links:
- [net-next] net: mana: Add debug knob to skip TX timeout recovery reset
https://git.kernel.org/netdev/net-next/c/922cc43c6243
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html