RE: [PATCH] net: mana: Reserve extra CQ slot for the fence completion CQE
From: Haiyang Zhang
Date: Tue Sep 01 2026 - 14:20:00 EST
> -----Original Message-----
> From: Sahil Chandna <sahilchandna@xxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, September 1, 2026 8:18 AM
> To: KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
> <haiyangz@xxxxxxxxxxxxx>; wei.liu@xxxxxxxxxx; Dexuan Cui
> <DECUI@xxxxxxxxxxxxx>; Long Li <longli@xxxxxxxxxxxxx>;
> andrew+netdev@xxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx;
> kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; horms@xxxxxxxxxx;
> ernis@xxxxxxxxxxxxxxxxxxx; gargaditya@xxxxxxxxxxxxxxxxxxx; linux-
> hyperv@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH] net: mana: Reserve extra CQ slot for the fence completion
> CQE
>
> The RX completion queue is sized to hold exactly one CQE per posted RX
> WQE.
> MANA_FENCE_RQ makes hardware post an additional CQE_RX_OBJECT_FENCE after
> the packet CQEs. The current sizing reserves no extra slot for it and in
> rare cases, CQ has no guaranteed slot for the fence CQE when it is full of
> packet CQEs. This can lead to dropping the fence completion while the
> driver waits holding RTNL lock throughout the timeout duration.
> Reserve one extra CQE slot for CQE_RX_OBJECT_FENCE. mana_gd_alloc_memory()
> requires queue_size to be a power-of-two and at least MANA_PAGE_SIZE;
> the reservation pushes cq_size past a power-of-two, so round up the CQ
> size
> in mana_create_rxq().
>
> Fixes: 6cc74443a773 ("net: mana: Add RX fencing")
> Signed-off-by: Sahil Chandna <sahilchandna@xxxxxxxxxxxxxxxxxxx>
The code change looks good.
Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
For bug fixes, please indicate "net" branch in the Subject, and add
Cc: stable@xxxxxxxxxxxxxxx
Thanks,
- Haiyang