[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140917212849.GA8484@breakpoint.cc>
Date: Wed, 17 Sep 2014 23:28:49 +0200
From: Florian Westphal <fw@...len.de>
To: Vlad Yasevich <vyasevich@...il.com>
Cc: Florian Westphal <fw@...len.de>,
Cong Wang <cwang@...pensource.com>,
Francesco Ruggeri <fruggeri@...sta.com>,
netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Weilong Chen <chenweilong@...wei.com>
Subject: Re: Cannot move macvlan interface on top of bonding device
Vlad Yasevich <vyasevich@...il.com> wrote:
> On 09/17/2014 03:06 PM, Florian Westphal wrote:
> > Cong Wang <cwang@...pensource.com> wrote:
> >> On Wed, Sep 17, 2014 at 8:56 AM, Francesco Ruggeri <fruggeri@...sta.com> wrote:
> >>> This used to work in older releases.
> >>> The problem seems to be that commit f939981492 sets NETIF_F_NETNS_LOCAL
> >>> on bonding interfaces, and commit 797f87f83 causes macvlan interfaces
> >>> to inherit its features from the lower device.
> >>>
> >>> Is there a reason why NETIF_F_NETNS_LOCAL should be inherited from the
> >>> lower device
> >>> by macvlan interfaces?
> >>
> >> commit 797f87f83 looks wrong, it should not inherit NETIF_F_NETNS_LOCAL,
> >> so just clear this flag. Please submit a patch.
> >
> > Under which conditions would NETIF_F_NETNS_LOCAL have to be inherited?
> > (i.e., why is it inheritable in the first place?)
To answer my own question: Its inherited since lowerdev->features is
passed as 'all' flag, so we would 'decrement' feature set if we'd remove
it in _increment_features().
> macvlan code calls
> features = netdev_increment_features(vlan->lowerdev->features,
> features,
> mask);
>
> where lowerdev->features contains the NETIF_F_NETNS_LOCAL bit. That
[..]
> May be a better solution is:
>
> features = netdev_increment_features(vlan->lowerdev->features & MACVLAN_FEATURS,
> features,
> mask);
>
> This way we start with only the feature MACVLAN is interested in.
Seems correct, since it will also prevent other non-macvlan features from
appearing.
Thanks Vlad.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists