[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250219143256.370277-1-gal@nvidia.com>
Date: Wed, 19 Feb 2025 16:32:54 +0200
From: Gal Pressman <gal@...dia.com>
To: <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>, "Eric
Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>
CC: Tariq Toukan <tariqt@...dia.com>, Louis Peens <louis.peens@...igine.com>,
Simon Horman <horms@...nel.org>, David Ahern <dsahern@...nel.org>, "Pravin B
Shelar" <pshelar@....org>, Yotam Gigi <yotam.gi@...il.com>, Jamal Hadi Salim
<jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko
<jiri@...nulli.us>, Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva"
<gustavoars@...nel.org>, <dev@...nvswitch.org>,
<linux-hardening@...r.kernel.org>, Ilya Maximets <i.maximets@....org>,
Alexander Lobakin <aleksander.lobakin@...el.com>, Gal Pressman
<gal@...dia.com>
Subject: [PATCH net-next v4 0/2] Flexible array for ip tunnel options
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
Powered by blists - more mailing lists