Skip to content
Commit 1c8f43f4 authored by Breno Leitao's avatar Breno Leitao Committed by Jakub Kicinski
Browse files

IB/hfi1: allocate dummy net_device dynamically



Embedding net_device into structures prohibits the usage of flexible
arrays in the net_device structure. For more details, see the discussion
at [1].

Un-embed the net_device from struct hfi1_netdev_rx by converting it
into a pointer. Then use the leverage alloc_netdev() to allocate the
net_device object at hfi1_alloc_rx().

[1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/

Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Acked-by: default avatarLeon Romanovsky <leon@kernel.org>
Link: https://lore.kernel.org/r/20240430162213.746492-1-leitao@debian.org
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3d549c38
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment