Commit 2fc8a346 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Paolo Abeni
Browse files

net: mana: Support holes in device list reply msg



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@vger.kernel.org
Fixes: ca9c54d2 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarLong Li <longli@microsoft.com>
Reviewed-by: default avatarShradha Gupta <shradhagupta@microsoft.com>
Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/1741723974-1534-1-git-send-email-haiyangz@microsoft.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 5f079290
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment