From: Florian Westphal <fw@strlen.de>
To: Vlad Yasevich <vyasevich@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
Cong Wang <cwang@twopensource.com>,
Francesco Ruggeri <fruggeri@arista.com>,
netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Weilong Chen <chenweilong@huawei.com>
Subject: Re: Cannot move macvlan interface on top of bonding device
Date: Wed, 17 Sep 2014 23:28:49 +0200 [thread overview]
Message-ID: <20140917212849.GA8484@breakpoint.cc> (raw)
In-Reply-To: <5419F17D.2090409@gmail.com>
Vlad Yasevich <vyasevich@gmail.com> wrote:
> On 09/17/2014 03:06 PM, Florian Westphal wrote:
> > Cong Wang <cwang@twopensource.com> wrote:
> >> On Wed, Sep 17, 2014 at 8:56 AM, Francesco Ruggeri <fruggeri@arista.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.
next prev parent reply other threads:[~2014-09-17 21:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 15:56 Cannot move macvlan interface on top of bonding device Francesco Ruggeri
2014-09-17 16:46 ` Cong Wang
2014-09-17 19:06 ` Florian Westphal
2014-09-17 20:25 ` Cong Wang
2014-09-17 20:39 ` Vlad Yasevich
2014-09-17 20:46 ` Cong Wang
2014-09-17 20:49 ` Francesco Ruggeri
2014-09-17 20:51 ` Vlad Yasevich
2014-09-17 21:28 ` Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-18 17:36 Francesco Ruggeri
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=20140917212849.GA8484@breakpoint.cc \
--to=fw@strlen.de \
--cc=chenweilong@huawei.com \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=fruggeri@arista.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).