netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cannot move macvlan interface on top of bonding device
@ 2014-09-17 15:56 Francesco Ruggeri
  2014-09-17 16:46 ` Cong Wang
  0 siblings, 1 reply; 10+ messages in thread
From: Francesco Ruggeri @ 2014-09-17 15:56 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Weilong Chen, Florian Westphal,
	Francesco Ruggeri

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

# ip netns add dummy0
# ip link add link bond0 mac0 type macvlan
# ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
#

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?

Thanks,
Francesco Ruggeri

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Cannot move macvlan interface on top of bonding device
@ 2014-09-18 17:36 Francesco Ruggeri
  0 siblings, 0 replies; 10+ messages in thread
From: Francesco Ruggeri @ 2014-09-18 17:36 UTC (permalink / raw)
  To: Florian Westphal
  Cc: Vlad Yasevich, Cong Wang, netdev, David S. Miller, Weilong Chen

>
>> 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.

I verified that this approach also solves my original problem (moving
a macvlan on top of a bonding device to a different namespace).
I do not know how to fully test it with different types of lower
devices and features though.
If anybody wants to take the lead on this it would be great. Otherwise
a more limited patch only clearing the  NETIF_F_NETNS_LOCAL bit was
also submitted earlier
(http://marc.info/?l=linux-netdev&m=141097807310566&w=2).

Thanks,
Francesco

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-09-18 17:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2014-09-18 17:36 Francesco Ruggeri

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).