All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH 2/2 libnftnl v2] tunnel: add support to geneve options
Date: Thu, 12 Jun 2025 21:18:29 +0200	[thread overview]
Message-ID: <aEsoBdN0IEMPQC4_@calendula> (raw)
In-Reply-To: <952e3323-8dcb-4275-888a-15909b5c72f4@suse.de>

On Thu, Jun 12, 2025 at 03:01:44PM +0200, Fernando Fernandez Mancera wrote:
> 
> 
> On 6/10/25 11:47 AM, Pablo Neira Ayuso wrote:
> > On Tue, Jun 10, 2025 at 08:01:41AM +0200, Florian Westphal wrote:
> > > Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > > > Hmm, this looks like the API leaks internal data layout from nftables to
> > > > > libnftnl and vice versa?  IMO thats a non-starter, sorry.
> > > > > 
> > > > > I see that options are essentially unlimited values, so perhaps nftables
> > > > > should build the netlink blob(s) directly, similar to nftnl_udata()?
> > > > > 
> > > > > Pablo, any better idea?
> > > > 
> > > > Maybe this API for tunnel options are proposed in this patch?
> > > 
> > > Looks good, thanks Pablo!
> > > 
> > > > Consider this a sketch/proposal, this is compiled tested only.
> > > > 
> > > > struct obj_ops also needs a .free interface to release the tunnel
> > > > options object.
> > > 
> > > nftnl_tunnel_opts_set() seems to be useable for erspan and vxlan.
> > > 
> > > Do you have a suggestion for the geneve case where 'infinite' options
> > > get added?
> > > 
> > > Maybe add nftnl_tunnel_opts_append() ? Or nftnl_tunnel_opts_add(), so
> > > api user can push multiple option objects to a tunnel, similar to how
> > > rules get added to chains?
> > 
> > nftnl_tunnel_opts_add() sounds good.
> > 
> > It should be possible to replace nftnl_tunnel_opts_set() by
> > nftnl_tunnel_opts_add(), then a single function for this purpose is
> > provided. As for vxlan and erpan, allow only one single call to
> > nftnl_tunnel_opts_add().
> > 
> > See attachment, compile tested only.
> > 
> 
> This looks good to me. Let me include it on my series and extend the free
> interface.

Sure, go ahead, thanks.

  reply	other threads:[~2025-06-12 19:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 19:34 [PATCH 1/2 libnftnl v2] src: use uint64_t for flags fields Fernando Fernandez Mancera
2025-05-27 19:34 ` [PATCH 2/2 libnftnl v2] tunnel: add support to geneve options Fernando Fernandez Mancera
2025-05-28  0:34   ` Florian Westphal
2025-05-28  9:27     ` Fernando Fernandez Mancera
2025-05-28 10:52       ` Florian Westphal
2025-06-10  0:28     ` Pablo Neira Ayuso
2025-06-10  6:01       ` Florian Westphal
2025-06-10  9:47         ` Pablo Neira Ayuso
2025-06-12 13:01           ` Fernando Fernandez Mancera
2025-06-12 19:18             ` Pablo Neira Ayuso [this message]
2025-05-28 10:55   ` Florian Westphal
2025-05-28 11:31     ` Fernando Fernandez Mancera

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=aEsoBdN0IEMPQC4_@calendula \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=fmancera@suse.de \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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.