Re: [PATCH net-next v3] netdevice: define and allocate &net_device _properly_

From: patchwork-bot+netdevbpf
Date: Thu Jul 11 2024 - 21:20:53 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Wed, 10 Jul 2024 04:30:28 -0700 you wrote:
> From: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
>
> In fact, this structure contains a flexible array at the end, but
> historically its size, alignment etc., is calculated manually.
> There are several instances of the structure embedded into other
> structures, but also there's ongoing effort to remove them and we
> could in the meantime declare &net_device properly.
> Declare the array explicitly, use struct_size() and store the array
> size inside the structure, so that __counted_by() can be applied.
> Don't use PTR_ALIGN(), as SLUB itself tries its best to ensure the
> allocated buffer is aligned to what the user expects.
> Also, change its alignment from %NETDEV_ALIGN to the cacheline size
> as per several suggestions on the netdev ML.
>
> [...]

Here is the summary with links:
- [net-next,v3] netdevice: define and allocate &net_device _properly_
https://git.kernel.org/netdev/net-next/c/13cabc47f8ae

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html