On Tue, Aug 04, 2015 at 07:01:03PM +0300, Kirill Tkhai wrote:
> vlan_setup() is called when dev's net hasn't been set yet:
> 
> rtnl_create_link
>     alloc_netdev_mqs
>         dev_net_set(dev, &init_net)
>         vlan_setup
>            ...
>            if (!ve_is_super(dev_net(dev)->owner_ve))
>               dev->features |= NETIF_F_VIRTUAL
>            ...
>     dev_net_set(dev, net)
> 
> So vlan's dev has no NETIF_F_VIRTUAL feature, and further
> check of ve_is_dev_movable() fails.
> 
> Patch makes the feature to be set always, independent
> of dev_net(). Anyway, in further we test it only if
> ve is not super. Also, others (loopback for exmple) set
> it always too.
> 
> https://jira.sw.ru/browse/PSBM-35266
>
Acked-by: Andrew Vagin <ava...@odin.com> 
> Signed-off-by: Kirill Tkhai <ktk...@odin.com>
> ---
>  net/8021q/vlan_dev.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 80fa918..09205c3 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -794,6 +794,5 @@ void vlan_setup(struct net_device *dev)
>       dev->ethtool_ops        = &vlan_ethtool_ops;
>  
>       memset(dev->broadcast, 0, ETH_ALEN);
> -     if (!ve_is_super(dev_net(dev)->owner_ve))
> -             dev->features |= NETIF_F_VIRTUAL;
> +     dev->features |= NETIF_F_VIRTUAL;
>  }
> 
> _______________________________________________
> Devel mailing list
> Devel@openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to