Re: [PATCH v4] IB/hfi1: allocate dummy net_device dynamically

From: Jakub Kicinski
Date: Mon Apr 01 2024 - 10:53:16 EST


On Mon, 1 Apr 2024 14:53:31 +0300 Leon Romanovsky wrote:
> On Tue, Mar 19, 2024 at 02:09:43AM -0700, Breno Leitao wrote:
> > 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@xxxxxxxxxx/
> >
> > Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
> > Acked-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxxxxxxxxxxxxx>
>
> Jakub,
>
> I create shared branch for you, please pull it from:
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=remove-dummy-netdev

Did you merge it in already?
Turned out that the use of init_dummy_netdev as a setup function
is broken, I'm not sure how Dennis tested this :(
We should have pinged you, sorry.