From: Vladimir Oltean <olteanv@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, alexandre.belloni@bootlin.com,
andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com,
alexandru.marginean@nxp.com, claudiu.manoil@nxp.com,
xiaoliang.yang_1@nxp.com, hongbo.wang@nxp.com, jiri@resnulli.us,
idosch@idosch.org, UNGLinuxDriver@microchip.com
Subject: Renaming interfaces that are up (Was "Re: [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink") ports
Date: Fri, 15 Jan 2021 19:11:42 +0200 [thread overview]
Message-ID: <20210115171142.4iylui5uuv5vljwq@skbuf> (raw)
In-Reply-To: <20210114084435.094c260a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Thu, Jan 14, 2021 at 08:44:35AM -0800, Jakub Kicinski wrote:
> > > Can you unbind and bind the driver back and see if phys_port_name
> > > always gets the correct value? (replay/udevadm test is not sufficient)
> >
> > Yes, and that udev renaming test failed miserably still.
> >
> > I have dhcpcd in my system, and it races with my udev script by
> > auto-upping the interfaces when they probe. Then, dev_change_name()
> > returns -EBUSY because the interfaces are up but its priv_flags do not
> > declare IFF_LIVE_RENAME_OK.
> >
> > How is that one solved?
>
> Yeah, that's one of those perennial problems we never found a strong
> answer to. IIRC IFF_LIVE_RENAME_OK was more of a dirty hack than a
> serious answer. I think we should allow renaming interfaces while
> they're up, and see if anything breaks. We'd just need to add the right
> netlink notifications to dev_change_name(), maybe?
I'm probably crazy for even indulging in this, since it is likely going
to just be a huge time sink. But I need to ask anyway: what netlink
notification are you thinking of adding? Do you want me to call
dev_close and then dev_open, like what was discussed in the
"[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH
net-next v6 4/4] netvsc: refactor notifier/event handling code to use
the bypass framework)" thread and then in the "failover: allow name
change on IFF_UP slave interfaces" email threads?
By the way I removed the if condition and added nothing in its place,
just to see what would happen. I see a lot of these messages, I did not
investigate where they are coming from and why they are emitted. They go
away when I rename the interface back to swp0.
# ip monitor &
[1] 26931
# ip link set swp0 name random
[ 2857.570246] mscc_felix 0000:00:00.5 random: renamed from swp0
32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
Deleted inet swp0
inet swp0 forwarding off rp_filter off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
Deleted inet6 swp0
inet6 swp0 forwarding off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev swp0 proto kernel metric 256 pref medium
^C32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: random: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
link/ether 7a:1e:87:48:79:c0 brd ff:ff:ff:ff:ff:ff
fe80::/64 dev swp0 proto kernel metric 256 pref medium
32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted 32: swp0 inet6 fe80::e4fb:6ac5:7211:7981/64 scope link tentative
valid_lft forever preferred_lft forever
Deleted fe80::/64 dev swp0 proto kernel metric 256 pref medium
next prev parent reply other threads:[~2021-01-15 17:13 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 17:59 [PATCH v3 net-next 00/10] Configuring congestion watermarks on ocelot switch using devlink-sb Vladimir Oltean
2021-01-08 17:59 ` [PATCH v3 net-next 01/10] net: mscc: ocelot: auto-detect packet buffer size and number of frame references Vladimir Oltean
2021-01-08 18:30 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 02/10] net: mscc: ocelot: add ops for decoding watermark threshold and occupancy Vladimir Oltean
2021-01-08 18:30 ` Florian Fainelli
2021-01-10 1:20 ` Jakub Kicinski
2021-01-11 16:53 ` Vladimir Oltean
2021-01-11 19:10 ` Jakub Kicinski
2021-01-08 17:59 ` [PATCH v3 net-next 03/10] net: dsa: add ops for devlink-sb Vladimir Oltean
2021-01-08 18:20 ` Andrew Lunn
2021-01-08 18:31 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 04/10] net: dsa: felix: reindent struct dsa_switch_ops Vladimir Oltean
2021-01-08 18:33 ` Florian Fainelli
2021-01-10 1:24 ` Jakub Kicinski
2021-01-11 17:01 ` Vladimir Oltean
2021-01-11 19:12 ` Jakub Kicinski
2021-01-08 17:59 ` [PATCH v3 net-next 05/10] net: dsa: felix: perform teardown in reverse order of setup Vladimir Oltean
2021-01-08 18:34 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 06/10] net: mscc: ocelot: export NUM_TC constant from felix to common switch lib Vladimir Oltean
2021-01-08 18:34 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 07/10] net: mscc: ocelot: delete unused ocelot_set_cpu_port prototype Vladimir Oltean
2021-01-08 18:35 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink ports Vladimir Oltean
2021-01-08 18:36 ` Florian Fainelli
2021-01-10 1:44 ` Jakub Kicinski
2021-01-11 17:13 ` Vladimir Oltean
2021-01-11 19:19 ` Jakub Kicinski
2021-01-14 10:34 ` Vladimir Oltean
2021-01-14 16:44 ` Jakub Kicinski
2021-01-15 17:11 ` Vladimir Oltean [this message]
2021-01-15 19:54 ` Renaming interfaces that are up (Was "Re: [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink") ports Vladimir Oltean
2021-01-10 2:01 ` [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink ports Jakub Kicinski
2021-01-08 17:59 ` [PATCH v3 net-next 09/10] net: mscc: ocelot: initialize watermarks to sane defaults Vladimir Oltean
2021-01-09 3:59 ` Florian Fainelli
2021-01-08 17:59 ` [PATCH v3 net-next 10/10] net: mscc: ocelot: configure watermarks using devlink-sb Vladimir Oltean
2021-01-09 4:03 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210115171142.4iylui5uuv5vljwq@skbuf \
--to=olteanv@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=f.fainelli@gmail.com \
--cc=hongbo.wang@nxp.com \
--cc=idosch@idosch.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=xiaoliang.yang_1@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox