]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: suppress appending ethtool stats to LAG DSA masters
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 11 Sep 2022 01:07:01 +0000 (04:07 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 20 Sep 2022 08:32:36 +0000 (10:32 +0200)
commit039e93178e40619134753c707f8e694bf75127fd
tree9e15cd542b288f37cf5bb20a3e22ee0a9d89e643
parentb94526e63b31158ece93daf79f0a427abd71e3f9
net: dsa: suppress appending ethtool stats to LAG DSA masters

Similar to the discussion about tracking the admin/oper state of LAG DSA
masters, we have the problem here that struct dsa_port *cpu_dp caches a
single pair of orig_ethtool_ops and netdev_ops pointers.

So if we call dsa_master_setup(bond0, cpu_dp) where cpu_dp is also the
dev->dsa_ptr of one of the physical DSA masters, we'd effectively
overwrite what we cached from that physical netdev with what replaced
from the bonding interface.

We don't need DSA ethtool stats on the bonding interface when used as
DSA master, it's good enough to have them just on the physical DSA
masters, so suppress this logic.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/dsa/master.c