Thread (20 messages) flat view 20 messages, 3 authors, 2021-01-28

Re: [PATCH net-next 1/4] net: dsa: automatically bring up DSA master when opening user port

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-01-28 00:52:11

On Wed, Jan 27, 2021 at 03:00:25AM +0200, Vladimir Oltean wrote:
From: Vladimir Oltean <vladimir.oltean@nxp.com>

DSA wants the master interface to be open before the user port is due to
historical reasons. The promiscuity of interfaces that are down used to
have issues, as referenced Lennert Buytenhek in commit df02c6ff2e39
("dsa: fix master interface allmulti/promisc handling").

The bugfix mentioned there, commit b6c40d68ff64 ("net: only invoke
dev->change_rx_flags when device is UP"), was basically a "don't do
that" approach to working around the promiscuity while down issue.

Further work done by Vlad Yasevich in commit d2615bf45069 ("net: core:
Always propagate flag changes to interfaces") has resolved the
underlying issue, and it is strictly up to the DSA and 8021q drivers
now, it is no longer mandated by the networking core that the master
interface must be up when changing its promiscuity.
quoted
From DSA's point of view, deciding to error out in dsa_slave_open
because the master isn't up is (a) a bad user experience and (b) missing
the forest for the trees. Even if there still was an issue with
promiscuity while down, DSA could still do this and avoid it: open the
DSA master manually, then do whatever. Voila, the DSA master is now up,
no need to error out.

Doing it this way has the additional benefit that user space can now
remove DSA-specific workarounds, like systemd-networkd with BindCarrier:
https://github.com/systemd/systemd/issues/7478

And we can finally remove one of the 2 bullets in the "Common pitfalls
using DSA setups" chapter.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help