[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210121030243.GJ1421720@Leo-laptop-t470s>
Date: Thu, 21 Jan 2021 11:02:43 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Ido Schimmel <idosch@...sch.org>, Ido Schimmel <idosch@...dia.com>,
netdev@...r.kernel.org, Jiri Pirko <jiri@...dia.com>,
Nikolay Aleksandrov <nikolay@...dia.com>,
"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH net] selftests/net: set link down before enslave
On Wed, Jan 20, 2021 at 05:46:51PM -0800, Jakub Kicinski wrote:
> On Wed, 20 Jan 2021 21:43:28 +0200 Ido Schimmel wrote:
> > On Wed, Jan 20, 2021 at 10:38:47PM +0800, Hangbin Liu wrote:
> > > Hi Ido,
> > >
> > > On Wed, Jan 20, 2021 at 12:42:10PM +0200, Ido Schimmel wrote:
> > > > > diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> > > > > index c9ce3dfa42ee..a26fddc63992 100755
> > > > > --- a/tools/testing/selftests/net/rtnetlink.sh
> > > > > +++ b/tools/testing/selftests/net/rtnetlink.sh
> > > > > @@ -1205,6 +1205,8 @@ kci_test_bridge_parent_id()
> > > > > dev20=`ls ${sysfsnet}20/net/`
> > > > >
> > > > > ip link add name test-bond0 type bond mode 802.3ad
> > > > > + ip link set dev $dev10 down
> > > > > + ip link set dev $dev20 down
> > > >
> > > > But these netdevs are created with their administrative state set to
> > > > 'DOWN'. Who is setting them to up?
> > >
> > > Would you please point me where we set the state to 'DOWN'? Cause on my
> > > host it is init as UP:
> > >
> > > ++ ls /sys/bus/netdevsim/devices/netdevsim10/net/
> > > + dev10=eth3
> > > ++ ls /sys/bus/netdevsim/devices/netdevsim20/net/
> > > + dev20=eth4
> > > + ip link add name test-bond0 type bond mode 802.3ad
> > > + ip link show eth3
> > > 66: eth3: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
> > > link/ether 1e:52:27:5f:a5:3c brd ff:ff:ff:ff:ff:ff
> >
> > I didn't have time to look into this today, but I suspect the problem is
> > either:
> >
> > 1. Some interface manager on your end that is setting these interfaces
> > up after they are created
>
> This must be the case, the kernel doesn't open/up devices by itself.
Ah, yes, My bad. I found NetworkManager enabled it by default.
Thanks
Hangbin
Powered by blists - more mailing lists