Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported
@ 2020-09-07 23:25 Vladimir Oltean
2020-09-08 0:57 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vladimir Oltean @ 2020-09-07 23:25 UTC (permalink / raw)
To: kuba; +Cc: f.fainelli, vivien.didelot, andrew, netdev
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 <olteanv@gmail.com>
---
net/dsa/slave.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 27931141d30f..4987f94a8f52 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -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);
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported
2020-09-07 23:25 [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported Vladimir Oltean
@ 2020-09-08 0:57 ` Andrew Lunn
2020-09-08 1:08 ` Vladimir Oltean
2020-09-08 3:06 ` Florian Fainelli
2020-09-08 4:01 ` Jakub Kicinski
2 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2020-09-08 0:57 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: kuba, f.fainelli, vivien.didelot, netdev
On Tue, Sep 08, 2020 at 02:25:56AM +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.
Hi Vladimir
In some ways, this has been good. A lot more DSA drivers now have MTU
support and jumbo packet support.
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported
2020-09-08 0:57 ` Andrew Lunn
@ 2020-09-08 1:08 ` Vladimir Oltean
0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Oltean @ 2020-09-08 1:08 UTC (permalink / raw)
To: Andrew Lunn; +Cc: kuba, f.fainelli, vivien.didelot, netdev
On Tue, Sep 08, 2020 at 02:57:09AM +0200, Andrew Lunn wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported
2020-09-07 23:25 [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported Vladimir Oltean
2020-09-08 0:57 ` Andrew Lunn
@ 2020-09-08 3:06 ` Florian Fainelli
2020-09-08 4:01 ` Jakub Kicinski
2 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2020-09-08 3:06 UTC (permalink / raw)
To: Vladimir Oltean, kuba; +Cc: vivien.didelot, andrew, netdev
On 9/7/2020 4:25 PM, 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 <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported
2020-09-07 23:25 [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported Vladimir Oltean
2020-09-08 0:57 ` Andrew Lunn
2020-09-08 3:06 ` Florian Fainelli
@ 2020-09-08 4:01 ` Jakub Kicinski
2 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2020-09-08 4:01 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: f.fainelli, vivien.didelot, andrew, netdev
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 <olteanv@gmail.com>
Applied, thanks everyone!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-08 4:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 23:25 [PATCH net-next] net: dsa: don't print non-fatal MTU error if not supported Vladimir Oltean
2020-09-08 0:57 ` Andrew Lunn
2020-09-08 1:08 ` Vladimir Oltean
2020-09-08 3:06 ` Florian Fainelli
2020-09-08 4:01 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).