net: dsa: don't print non-fatal MTU error if not supported
Subsystems (3)
Vladimir Oltean
maintainerPATCH 1/1 net: dsa: don't print non-fatal MTU error if not supported
Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that.
--- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/slave.c +1 -1
@@ -1784,7 +1784,7 @@ int dsa_slave_create(struct dsa_port *port)rtnl_lock (); ret =dsa_slave_change_mtu (slave_dev,ETH_DATA_LEN );rtnl_unlock (); -if (ret) +if (ret && ret != -EOPNOTSUPP )dev_warn (ds->dev,"nonfatal error %d setting MTU on port %d\n" , ret, port->index);
Signature · 1 line
2.25.1
Quoted 5 lines · Vladimir Oltean
Commit
72579e14a1d3("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err !=-EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that.
Hi Vladimir
In some ways, this has been good. A lot more DSA drivers now have MTU support and jumbo packet support.
Quoted 1 line
Signed-off-by Vladimir Oltean <[email protected]>
Andrew
Vladimir Oltean
maintainerQuoted 4 lines · Andrew Lunn
Hi Vladimir
In some ways, this has been good. A lot more DSA drivers now have MTU support and jumbo packet support.
Yes, I suspect this is because many people wanted to experiment with jumbo frames anyway, and the warning in dmesg acted as a sort of reminder that the infrastructure is there. If it weren't for this pre-existing interest, I would have expected a patch that silenced this warning sooner, and not from me (the switches that I have don't print this message).
Thanks,
-Vladimir
Quoted 7 lines · Vladimir Oltean
Commit
72579e14a1d3("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err !=-EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that.Signed-off-by Vladimir Oltean <[email protected]>
Signature · 1 line
Florian
Quoted 7 lines · On Tue, 8 Sep 2020 02:25:56 +0300 Vladimir Oltean wrote:
Commit
72579e14a1d3("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err !=-EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that.Signed-off-by Vladimir Oltean <[email protected]>
Applied, thanks everyone!