netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/2] Flexible array for ip tunnel options
@ 2025-02-19 14:32 Gal Pressman
  2025-02-19 14:32 ` [PATCH net-next v4 1/2] ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1' Gal Pressman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gal Pressman @ 2025-02-19 14:32 UTC (permalink / raw)
  To: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Andrew Lunn
  Cc: Tariq Toukan, Louis Peens, Simon Horman, David Ahern,
	Pravin B Shelar, Yotam Gigi, Jamal Hadi Salim, Cong Wang,
	Jiri Pirko, Kees Cook, Gustavo A. R. Silva, dev, linux-hardening,
	Ilya Maximets, Alexander Lobakin, Gal Pressman

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(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-20 21:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 14:32 [PATCH net-next v4 0/2] Flexible array for ip tunnel options Gal Pressman
2025-02-19 14:32 ` [PATCH net-next v4 1/2] ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1' Gal Pressman
2025-02-19 17:28   ` Kees Cook
2025-02-19 14:32 ` [PATCH net-next v4 2/2] net: Add options as a flexible array to struct ip_tunnel_info Gal Pressman
2025-02-19 17:28   ` Kees Cook
2025-02-20 21:30 ` [PATCH net-next v4 0/2] Flexible array for ip tunnel options patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).