All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Cong Wang <cwang@twopensource.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: Problem with iflink in netns
Date: Tue, 13 May 2014 13:05:54 -0700	[thread overview]
Message-ID: <20140513130554.2e452af8@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAHA+R7NX8BoXHkSZ97+op7Leg3nD_=TFjJ1K3wSr3pWQbF4Eug@mail.gmail.com>

On Tue, 13 May 2014 11:20:58 -0700
Cong Wang <cwang@twopensource.com> wrote:

> On Tue, May 13, 2014 at 8:39 AM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > There have been a couple of bugzilla reports already about cases where a macvlan
> > or vlan is moved into another namespace. In these cases the parent device ifindex (iflink)
> > is no longer valid.
> >
> >
> > Normally it is not a big issue, until another device is created using the ifindex
> > of the parent
> >
> > Does anyone have a suggested fix? Marking iflink as 0 won't work then the devices no
> > longer appear as slaves. Another possibility would be to make block creation of device
> > where ifindex matches existing iflink of other devices; but this would slow down device
> > creation.
> >
> 
> I have a pending fix which converts ->iflink to a pointer to struct net_device,
> this is a suggested fix from Ben. And so, when the lower device is not
> in the same
> namespace with the upper device, we should not display the iflink information.
> 
> I will send it soon.

That won't solve the problem.
 1. a pointer increase size of netns and requires refcount
 2. iflink is still exposed in kernel user API and has to be set
    otherwise the device is falsely reported.

  reply	other threads:[~2014-05-13 20:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 15:39 Problem with iflink in netns Stephen Hemminger
2014-05-13 18:20 ` Cong Wang
2014-05-13 20:05   ` Stephen Hemminger [this message]
2014-05-13 20:44     ` Cong Wang
2014-05-14  0:51       ` Stephen Hemminger
2014-05-14 21:11         ` Cong Wang
2014-05-14  8:23 ` Nicolas Dichtel
2014-07-02 11:59   ` [RFC PATCH net-next 0/5] netns: allow to identify peer netns Nicolas Dichtel
2014-07-02 11:59     ` [RFC PATCH net-next 1/5] netns: allocate netns ids Nicolas Dichtel
2014-07-02 13:33       ` Sergei Shtylyov
2014-07-02 13:57         ` Nicolas Dichtel
2014-07-02 11:59     ` [RFC PATCH net-next 2/5] netns: add genl cmd to get the id of a netns Nicolas Dichtel
2014-07-02 11:59     ` [RFC PATCH net-next 3/5] rtnl: add link netns id to interface messages Nicolas Dichtel
2014-07-02 11:59     ` [RFC PATCH net-next 4/5] iptunnels: advertise link netns via netlink Nicolas Dichtel
2014-07-02 11:59     ` [RFC PATCH net-next 5/5] rtnl: allow to create device with IFLA_LINK_NETNSID set Nicolas Dichtel
2014-07-02 20:09     ` [RFC PATCH net-next 0/5] netns: allow to identify peer netns Eric W. Biederman
2014-07-02 21:47       ` Nicolas Dichtel
2014-07-15 14:32       ` Nicolas Dichtel

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=20140513130554.2e452af8@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=cwang@twopensource.com \
    --cc=ebiederm@xmission.com \
    --cc=netdev@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.