Skip to contentSkip to conversation

net: dsa: don't fail to probe if we couldn't set the MTU

PATCH Applied Vladimir Oltean 3 participants 3 messages Apr 21, 2020 – Apr 23, 2020

Subsystems (3)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH v2 1/1 net: dsa: don't fail to probe if we couldn't set the MTU

From: Vladimir Oltean <[email protected]>

There is no reason to fail the probing of the switch if the MTU couldn't be configured correctly (either the switch port itself, or the host port) for whatever reason. MTU-sized traffic probably won't work, sure, but we can still probably limp on and support some form of communication anyway, which the users would probably appreciate more.

Fixes bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
---
 net/dsa/slave.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
net/dsa/slave.c +3 -5
index e94eb1aac602..d1068803cd11 100644
@@ -1770,11 +1770,9 @@ int dsa_slave_create(struct dsa_port *port)
 	rtnl_lock();
 	ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
 	rtnl_unlock();
-	if (ret && ret != -EOPNOTSUPP) {
-		dev_err(ds->dev, "error %d setting MTU on port %d\n",
-			ret, port->index);
-		goto out_free;
-	}
+	if (ret)
+		dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n",
+			 ret, port->index);
 
 	netif_carrier_off(slave_dev);
 
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Vladimir Oltean

From: Vladimir Oltean <[email protected]>

There is no reason to fail the probing of the switch if the MTU couldn't be configured correctly (either the switch port itself, or the host port) for whatever reason. MTU-sized traffic probably won't work, sure, but we can still probably limp on and support some form of communication anyway, which the users would probably appreciate more.

Fixes bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
Signature · 1 line
Florian
maintainer Applied
#2 lore raw
In reply to Vladimir Oltean

From: Vladimir Oltean <[email protected]>
Date: Tue, 21 Apr 2020 20:18:53 +0300

Quoted 11 lines

From: Vladimir Oltean <[email protected]>

There is no reason to fail the probing of the switch if the MTU couldn't be configured correctly (either the switch port itself, or the host port) for whatever reason. MTU-sized traffic probably won't work, sure, but we can still probably limp on and support some form of communication anyway, which the users would probably appreciate more.

Fixes bfcb813203e6 ("net: dsa: configure the MTU for switch ports")

Applied, thanks Vlad.