[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e684c23a-93cc-d424-e217-e6ac2a371029@gmail.com>
Date: Wed, 29 May 2019 09:41:07 -0600
From: David Ahern <dsahern@...il.com>
To: Phil Sutter <phil@....cc>, David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [net-next PATCH] net: rtnetlink: Enslave device before bringing
it up
On 5/29/19 7:51 AM, Phil Sutter wrote:
> Unlike with bridges, one can't add an interface to a bond and set it up
> at the same time:
>
> | # ip link set dummy0 down
> | # ip link set dummy0 master bond0 up
> | Error: Device can not be enslaved while up.
>
> Of all drivers with ndo_add_slave callback, bond and team decline if
> IFF_UP flag is set, vrf cycles the interface (i.e., sets it down and
> immediately up again) and the others just don't care.
>
> Support the common notion of setting the interface up after enslaving it
> by sorting the operations accordingly.
>
> Signed-off-by: Phil Sutter <phil@....cc>
> ---
> net/core/rtnetlink.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
I agree with the intent - enslave before up.
Not sure how likely this is, but it does break the case:
ip li set dummy0 master bond0 down
Powered by blists - more mailing lists