netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] Flexible array for ip tunnel options
@ 2025-02-17 20:25 Gal Pressman
  2025-02-17 20:25 ` [PATCH net-next v3 1/2] ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1' Gal Pressman
  2025-02-17 20:25 ` [PATCH net-next v3 2/2] net: Add options as a flexible array to struct ip_tunnel_info Gal Pressman
  0 siblings, 2 replies; 4+ messages in thread
From: Gal Pressman @ 2025-02-17 20:25 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 -
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, 15 insertions(+), 13 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2025-02-19  2:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 20:25 [PATCH net-next v3 0/2] Flexible array for ip tunnel options Gal Pressman
2025-02-17 20:25 ` [PATCH net-next v3 1/2] ip_tunnel: Use ip_tunnel_info() helper instead of 'info + 1' Gal Pressman
2025-02-19  2:45   ` Jakub Kicinski
2025-02-17 20:25 ` [PATCH net-next v3 2/2] net: Add options as a flexible array to struct ip_tunnel_info Gal Pressman

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