RE: [PATCH net-next] net: mana: Implement ndo_tx_timeout and serialize queue resets per port.

From: Haiyang Zhang
Date: Mon Oct 27 2025 - 13:52:24 EST




> -----Original Message-----
> From: Dipayaan Roy <dipayanroy@xxxxxxxxxxxxxxxxxxx>
> Sent: Monday, October 27, 2025 7:46 AM
> To: KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
> <haiyangz@xxxxxxxxxxxxx>; wei.liu@xxxxxxxxxx; Dexuan Cui
> <DECUI@xxxxxxxxxxxxx>; andrew+netdev@xxxxxxx; davem@xxxxxxxxxxxxx;
> edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; Long Li
> <longli@xxxxxxxxxxxxx>; Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>;
> horms@xxxxxxxxxx; shradhagupta@xxxxxxxxxxxxxxxxxxx;
> ssengar@xxxxxxxxxxxxxxxxxxx; ernis@xxxxxxxxxxxxxxxxxxx; Shiraz Saleem
> <shirazsaleem@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; Dipayaan Roy <dipayanroy@xxxxxxxxxxxxx>
> Subject: [PATCH net-next] net: mana: Implement ndo_tx_timeout and
> serialize queue resets per port.
>
> Implement .ndo_tx_timeout for MANA so any stalled TX queue can be detected
> and a device-controlled port reset for all queues can be scheduled to an
> ordered workqueue. The reset for all queues on stall detection is
> recomended by hardware team.
>
> The change introduces a single ordered workqueue
> ("mana_per_port_queue_reset_wq") with WQ_UNBOUND | WQ_MEM_RECLAIM and
> queues exactly one work_struct per port onto it. This achieves:
>
> * Global FIFO across all port reset requests (alloc_ordered_workqueue).
> * Natural per-port de-duplication: the same work_struct cannot be
> queued twice while pending/running.
> * Avoids hogging a per-CPU kworker for long, may-sleep reset paths
> (WQ_UNBOUND).
> * Guarantees forward progress during memory pressure
> (WQ_MEM_RECLAIM rescuer).
>
> Signed-off-by: Dipayaan Roy <dipayanroy@xxxxxxxxxxxxxxxxxxx>

Looks good, except for the comments from Pavan.

Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>