All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gal Pressman <gal@nvidia.com>
To: <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Louis Peens <louis.peens@corigine.com>,
	Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
	"Pravin B Shelar" <pshelar@ovn.org>,
	Yotam Gigi <yotam.gi@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>, Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	<dev@openvswitch.org>, <linux-hardening@vger.kernel.org>,
	Ilya Maximets <i.maximets@ovn.org>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Gal Pressman <gal@nvidia.com>
Subject: [PATCH net-next v4 0/2] Flexible array for ip tunnel options
Date: Wed, 19 Feb 2025 16:32:54 +0200	[thread overview]
Message-ID: <20250219143256.370277-1-gal@nvidia.com> (raw)

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


             reply	other threads:[~2025-02-19 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 14:32 Gal Pressman [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250219143256.370277-1-gal@nvidia.com \
    --to=gal@nvidia.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=i.maximets@ovn.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=louis.peens@corigine.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pshelar@ovn.org \
    --cc=tariqt@nvidia.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yotam.gi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.