[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1e4b8c6-84bd-5746-b89b-02dc781f23c9@gmail.com>
Date: Sun, 18 Sep 2022 09:48:03 -0600
From: David Ahern <dsahern@...il.com>
To: Phil Sutter <phil@....cc>, David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [RESEND net-next PATCH] net: rtnetlink: Enslave device before
bringing it up
On 9/14/22 9:06 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>
> ---
> Resubmitting this after review, concerns uttered in original discussion
> three years ago do not apply: Any flag changes happening during
> do_set_master() call are preserved, unless user space intended to change
> them. I verified that a team device in promisc mode still correctly
> propagates the flag to a new slave after applying this patch.
> ---
> net/core/rtnetlink.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists