All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tom Herbert <tom@herbertland.com>,
	Saurabh Mohan <saurabh@cplanenetworks.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"David S. Miller" <davem@davemloft.net>,
	Pravin B Shelar <pshelar@nicira.com>, Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH net-next 1/2] Support outside netns for tunnels.
Date: Mon, 04 Jan 2016 11:54:08 -0800	[thread overview]
Message-ID: <1451937248.4334.105.camel@perches.com> (raw)
In-Reply-To: <CALx6S376Ay70TTP=UwSpo4aieZ3Rp7U4TNmdSCbKSqGDHcw3DA@mail.gmail.com>

On Mon, 2016-01-04 at 11:47 -0800, Tom Herbert wrote:
> On Mon, Jan 4, 2016 at 10:45 AM, Saurabh Mohan
> <saurabh@cplanenetworks.com> wrote:
> > 
> > This patch enchances a tunnel interface, like gre, to have the tunnel
> > encap/decap be in the context of a network namespace that is different from
> > the namespace of the tunnel interface.
> > 
> > From userspace this feature may be configured using the new 'onetns' keyword:
> > ip netns exec custa ip link add dev tun1 type gre local 10.0.0.1 \
> >  remote 10.0.0.2 onetns outside
> > 
> > In the above example the tunnel would be in the 'custa' namespace and the
> > tunnel endpoints would be in the 'outside' namespace.
> > 
> > Also, proposing the use of netns name 'global' to specify the global namespace.
> > 
> > If this patch set is accepted then I will add support for other tunnels as
> > well.
> > 
> This might be interesting. Can you please ad a 0/n patch that
> describes the motivation for this, in particular I would like to know
> if this has a positive impact on ns performance if somehow we are
> eliminating indirection.
[]
> > diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
[]
> > @@ -3,6 +3,7 @@
> > 
> >  #include 
> >  #include 
> > +#include 
> > 
> > 
> >  #define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
> > @@ -27,6 +28,14 @@
> >  #define GRE_FLAGS      __cpu_to_be16(0x00F8)
> >  #define GRE_VERSION    __cpu_to_be16(0x0007)
> > 
> > +struct o_netns_parm {
> > +       __u8                    o_netns_flag;
> > +       __u32                   o_netns_fd;
> > +       char                    netns[NAME_MAX];
> > +};

Trivia:

It could eliminate a few padding bytes if the
o_netns_fd and o_netns_flag fields were reversed.

and netns[NAME_MAX] is normally netns[NAME_MAX + 1]

  reply	other threads:[~2016-01-04 19:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 18:45 [PATCH net-next 1/2] Support outside netns for tunnels Saurabh Mohan
2016-01-04 18:45 ` [PATCH net-next 2/2] Support outside netns for gre & vti tunnels Saurabh Mohan
2016-01-04 19:47 ` [PATCH net-next 1/2] Support outside netns for tunnels Tom Herbert
2016-01-04 19:54   ` Joe Perches [this message]
2016-01-05 16:47 ` Nicolas Dichtel
2016-01-07 18:59   ` Saurabh Mohan

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=1451937248.4334.105.camel@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    --cc=saurabh@cplanenetworks.com \
    --cc=stephen@networkplumber.org \
    --cc=tgraf@suug.ch \
    --cc=tom@herbertland.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.