Re: [PATCH net V2] net/mlx5e: Order ICOSQ cc update after CQ doorbell
From: Daniel Machon
Date: Wed Oct 07 2026 - 14:40:33 EST
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> mlx5e_poll_ico_cq() requires sq->cc to be updated only after
> mlx5_cqwq_update_db_record(), otherwise a CQ overrun may occur.
>
> The current implementation updates sq->cc before the CQ doorbell
> record, violating this ordering requirement.
>
> Update the CQ doorbell record first and use dma_wmb() before updating
> sq->cc. This ensures that the CQ space is released to the device
> before the corresponding ICOSQ consumer index is updated by software.
>
Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>