Re: [PATCH net, v2] net: mana: Support holes in device list reply msg

From: Michal Swiatkowski
Date: Wed Mar 12 2025 - 01:30:41 EST


On Tue, Mar 11, 2025 at 01:12:54PM -0700, Haiyang Zhang wrote:
> According to GDMA protocol, holes (zeros) are allowed at the beginning
> or middle of the gdma_list_devices_resp message. The existing code
> cannot properly handle this, and may miss some devices in the list.
>
> To fix, scan the entire list until the num_of_devs are found, or until
> the end of the list.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
> Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> Reviewed-by: Long Li <longli@xxxxxxxxxxxxx>
> Reviewed-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxx>
> ---
> v2: Fix alignment, extra dmesg.
>
> ---
> drivers/net/ethernet/microsoft/mana/gdma_main.c | 14 ++++++++++----
> include/net/mana/gdma.h | 11 +++++++----
> 2 files changed, 17 insertions(+), 8 deletions(-)
>

Thanks,
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>

> --
> 2.34.1