linux/include/net/mana
Haiyang Zhang 15cc669513 net: mana: Support holes in device list reply msg
commit 2fc8a34662 upstream.

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: ca9c54d2d6 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Reviewed-by: Shradha Gupta <shradhagupta@microsoft.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/1741723974-1534-1-git-send-email-haiyangz@microsoft.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-03-28 22:03:28 +01:00
..
gdma.h net: mana: Support holes in device list reply msg 2025-03-28 22:03:28 +01:00
hw_channel.h net: mana: Annotate struct hwc_dma_buf with __counted_by 2023-10-02 11:24:54 -07:00
mana.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-05 20:37:20 -07:00
mana_auxiliary.h net: mana: Move header files to a common location 2022-11-10 07:57:26 +02:00
shm_channel.h net: mana: Move header files to a common location 2022-11-10 07:57:26 +02:00