[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5265A147.4010501@gmail.com>
Date: Mon, 21 Oct 2013 14:48:55 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Veaceslav Falico <vfalico@...hat.com>
CC: nhorman@...driver.com, netdev@...r.kernel.org
Subject: Re: [net-next PATCH] macvlan: resolve ENOENT errors on creation
On 10/21/2013 02:34 PM, Veaceslav Falico wrote:
> On Mon, Oct 21, 2013 at 02:28:02PM -0700, John Fastabend wrote:
>> After the commit below attempting to create macvlan devices was
>> resulting in ENOENT errors,
>>
>> # ip link add link p3p2 type macvlan
>> RTNETLINK answers: Invalid argument
>>
>> This happens because netdev_upper_dev_link() is called before
>> register_netdevice() in the macvlan code. Through a call chain
>> this results in a call to __netdev_adjacent_dev_insert() and
>> finally a sysfs_create_link(). This requires the kobject of
>> the macvlan to be registered which is done in register_netdevice().
>> If there is no kobject which is the case here the ENOENT error
>> is seen on the command line.
>>
>> To resolve this move the netdev_upper_dev_link() call below
>> the register_netdevice() call. This aligns with vlan driver
>> flow.
>
> Yep, changed the vlan code, but didn't see the macvlan. My cscope didn't
> catch it for some reason :-/.
>
> I've also checked - there are no users except bonding, vlan (both are ok),
> and macvlan.
>
The openvswitch code uses netdev_master_upper_dev_link() which
eventually calls __netdev_adjacent_dev_insert() as well. But from
a quick code inspection I think it should work. Anyways that is one
other user.
.John
--
John Fastabend Intel Corporation
--
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