Re: [PATCH v2 net-next 3/3] net: hns3: use txqueue parameter directly in ndo_tx_timeout
From: Simon Horman
Date: Mon Aug 10 2026 - 12:52:33 EST
On Fri, Aug 07, 2026 at 05:54:35PM +0800, Jijie Shao wrote:
> From: Jian Shen <shenjian15@xxxxxxxxxx>
>
> The ndo_tx_timeout callback already provides the timed out txqueue
> index. Use it directly instead of iterating all tx queues to find
> the timed out one.
>
> Use h->kinfo.num_tqps for the bounds check instead of
> ndev->num_tx_queues, as the ring array is allocated with num_tqps
> entries and num_tx_queues may be larger. This issue has not been
> encountered in practice, so it is folded into this cleanup rather
> than tracked as a separate bugfix.
>
> Signed-off-by: Jian Shen <shenjian15@xxxxxxxxxx>
> Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>
> ---
> Changes in v2:
> - Use h->kinfo.num_tqps for bounds check instead of
> ndev->num_tx_queues
> - Restore the netif_xmit_timeout_ms() check by making
> hns3_dump_timeout_queue() return bool and gating on
> its return value, so a cleared stall does not trigger
> a reset
> - Fold the bounds fix into this patch rather than tracking
> it as a separate bugfix, as the OOB has not been
> encountered in practice
>
> v1: https://lore.kernel.org/all/20260804130933.880552-1-shaojijie@xxxxxxxxxx/
Thanks for the updates.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>