On 1/26/2021 5:00 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.olt...@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.
> 
> 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.olt...@nxp.com>

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian

Reply via email to