mbox series

[net-next,v4,0/2] Flexible array for ip tunnel options

Message ID 20250219143256.370277-1-gal@nvidia.com (mailing list archive)
Headers show
Series Flexible array for ip tunnel options | expand

Message

Gal Pressman Feb. 19, 2025, 2:32 p.m. UTC
Remove the hidden assumption that options are allocated at the end of
the struct, and teach the compiler about them using a flexible array.

First patch is converting hard-coded 'info + 1' to use ip_tunnel_info()
helper.
Second patch adds the 'options' flexible array and changes the helper to
use it.

Changelog -
v3=>v4: https://lore.kernel.org/netdev/20250217202503.265318-1-gal@nvidia.com/
* Remove the casts in first patch (Jakub).

v2->v3: https://lore.kernel.org/netdev/20250212140953.107533-1-gal@nvidia.com/
* Add a precursory patch to convert hard-coded user of options.
* Keep ip_tunnel_info() macro (Alexander).
* Use __aligned_largest (Alexander).

v1->v2: https://lore.kernel.org/netdev/20250209101853.15828-1-gal@nvidia.com/
* Remove change in struct layout, align 'options' field explicitly (Ilya, Kees, Jakub).
* Change allocation I missed in v1 in metadata_dst_alloc_percpu().

Thanks,
Gal

Gal Pressman (2):
  ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1'
  net: Add options as a flexible array to struct ip_tunnel_info

 include/net/dst_metadata.h | 7 ++-----
 include/net/ip_tunnels.h   | 7 ++++---
 net/core/dst.c             | 6 ++++--
 net/sched/act_tunnel_key.c | 8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 20, 2025, 9:30 p.m. UTC | #1
Hello:

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

On Wed, 19 Feb 2025 16:32:54 +0200 you wrote:
> Remove the hidden assumption that options are allocated at the end of
> the struct, and teach the compiler about them using a flexible array.
> 
> First patch is converting hard-coded 'info + 1' to use ip_tunnel_info()
> helper.
> Second patch adds the 'options' flexible array and changes the helper to
> use it.
> 
> [...]

Here is the summary with links:
  - [net-next,v4,1/2] ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1'
    https://git.kernel.org/netdev/net-next/c/ba3fa6e8c1eb
  - [net-next,v4,2/2] net: Add options as a flexible array to struct ip_tunnel_info
    https://git.kernel.org/netdev/net-next/c/bb5e62f2d547

You are awesome, thank you!