All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Fernando Fernandez Mancera <fmancera@suse.de>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH 2/2 libnftnl v2] tunnel: add support to geneve options
Date: Tue, 10 Jun 2025 08:01:41 +0200	[thread overview]
Message-ID: <aEfKRbJehyaq1p8S@strlen.de> (raw)
In-Reply-To: <aEd8Nfv5Zce1p0FD@calendula>

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?

Would probably require a few more api calls including iterators.

Fernando, do you spot anything else thats missing for your use cases?

  reply	other threads:[~2025-06-10  6:01 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 [this message]
2025-06-10  9:47         ` Pablo Neira Ayuso
2025-06-12 13:01           ` Fernando Fernandez Mancera
2025-06-12 19:18             ` Pablo Neira Ayuso
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=aEfKRbJehyaq1p8S@strlen.de \
    --to=fw@strlen.de \
    --cc=coreteam@netfilter.org \
    --cc=fmancera@suse.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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.