From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Yasevich Subject: Re: Cannot move macvlan interface on top of bonding device Date: Wed, 17 Sep 2014 16:39:25 -0400 Message-ID: <5419F17D.2090409@gmail.com> References: <20140917190626.GA11354@breakpoint.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Francesco Ruggeri , netdev , "David S. Miller" , Weilong Chen To: Florian Westphal , Cong Wang Return-path: Received: from mail-qc0-f179.google.com ([209.85.216.179]:62641 "EHLO mail-qc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756556AbaIQUj2 (ORCPT ); Wed, 17 Sep 2014 16:39:28 -0400 Received: by mail-qc0-f179.google.com with SMTP id x13so281295qcv.38 for ; Wed, 17 Sep 2014 13:39:28 -0700 (PDT) In-Reply-To: <20140917190626.GA11354@breakpoint.cc> Sender: netdev-owner@vger.kernel.org List-ID: On 09/17/2014 03:06 PM, Florian Westphal wrote: > Cong Wang wrote: >> On Wed, Sep 17, 2014 at 8:56 AM, Francesco Ruggeri 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?) macvlan code calls features = netdev_increment_features(vlan->lowerdev->features, features, mask); where lowerdev->features contains the NETIF_F_NETNS_LOCAL bit. That bit is not set in features or in mask. It is also not one of the ALL_FOR_ALL bits so it's not turned off. As an example, here are the values from a quit test I ran: bond features = 0x400f3888 features = 0x3b5a09 (mask is the same). incremented features = 0x41bf389 NETIF_F_NETNS_LOCAL is still on. 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. -vlad > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >