All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] vxlan: expose COLLECT_METADATA flag to user space
Date: Fri, 31 Jul 2015 08:41:40 -0700	[thread overview]
Message-ID: <55BB9734.1010005@plumgrid.com> (raw)
In-Reply-To: <20150731080019.GB4738@pox.localdomain>

On 7/31/15 1:00 AM, Thomas Graf wrote:
> On 07/30/15 at 08:10pm, Alexei Starovoitov wrote:
>> Two vxlan driver flags FLOWBASED and COLLECT_METADATA need to be set to
>> make use of its new flow mode. The former already exposed. Expose the latter.
>>
>> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
>
> Since you are analyzing the program when you load it. Could you call
> ip_tunnel_need_metadata() when we load a program which accesses
> the new metadata field and ip_tunnel_unneed_metadata() when you unload
> it? This would hide the need to set this flag from the user. The con
> is that it enables metadata on all net_devices.

I thought about it, but the global static_key enabler via
ip_tunnel_collect_metadata() is an overkill when we only want
to enable it for one tunnel. I can imagine why you may need
it for routing, but every tunnel type needs its own
collect_metadata flag similar to vxlan.
Also in bpf there is no program scan at unload time.
To call ip_tunnel_unneed_metadata() cleanly, I would need to
extra global refcnt just for that. which is ugly.

> I'm also fine with exposing this flag to the user though. I'll leave it
> up to you so feel free to add my ack if you want to go this route.
>
> Acked-by: Thomas Graf <tgraf@suug.ch>

thanks. I think exposing collect_metadata for vxlan and in the future
for other tunnel types is the clean enough way, though the other
alternative would be to get rid of collect_metadata flag
from the kernel and do it when flowmode flag is set. Thoughts?

  reply	other threads:[~2015-07-31 15:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31  3:10 [PATCH net-next] vxlan: expose COLLECT_METADATA flag to user space Alexei Starovoitov
2015-07-31  8:00 ` Thomas Graf
2015-07-31 15:41   ` Alexei Starovoitov [this message]
2015-08-03 21:14     ` Jesse Gross
2015-08-05 14:39       ` Thomas Graf
2015-07-31 22:24 ` David Miller

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=55BB9734.1010005@plumgrid.com \
    --to=ast@plumgrid.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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.