* [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values
@ 2020-07-18 18:04 Vladimir Oltean
2020-07-18 18:43 ` Florian Fainelli
2020-07-21 1:36 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2020-07-18 18:04 UTC (permalink / raw)
To: kuba, davem, netdev
Cc: andrew, f.fainelli, vivien.didelot, noodles, mnhagan88
Now that DSA supports MTU configuration, undo the effects of commit
8b1efc0f83f1 ("net: remove MTU limits on a few ether_setup callers") and
let DSA interfaces use the default min_mtu and max_mtu specified by
ether_setup(). This is more important for min_mtu: since DSA is
Ethernet, the minimum MTU is the same as of any other Ethernet
interface, and definitely not zero. For the max_mtu, we have a callback
through which drivers can override that, if they want to.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
net/dsa/slave.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 3856a5788e39..58412a664b98 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1940,11 +1940,8 @@ int dsa_slave_create(struct dsa_port *port)
if (ds->ops->port_fdb_add && ds->ops->port_egress_floods)
slave_dev->priv_flags |= IFF_UNICAST_FLT;
slave_dev->netdev_ops = &dsa_slave_netdev_ops;
- slave_dev->min_mtu = 0;
if (ds->ops->port_max_mtu)
slave_dev->max_mtu = ds->ops->port_max_mtu(ds, port->index);
- else
- slave_dev->max_mtu = ETH_MAX_MTU;
SET_NETDEV_DEVTYPE(slave_dev, &dsa_type);
vlan_dev_ivdf_set(slave_dev, true);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values
2020-07-18 18:04 [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values Vladimir Oltean
@ 2020-07-18 18:43 ` Florian Fainelli
2020-07-21 1:36 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-07-18 18:43 UTC (permalink / raw)
To: Vladimir Oltean, kuba, davem, netdev
Cc: andrew, vivien.didelot, noodles, mnhagan88
On 7/18/2020 11:04 AM, Vladimir Oltean wrote:
> Now that DSA supports MTU configuration, undo the effects of commit
> 8b1efc0f83f1 ("net: remove MTU limits on a few ether_setup callers") and
> let DSA interfaces use the default min_mtu and max_mtu specified by
> ether_setup(). This is more important for min_mtu: since DSA is
> Ethernet, the minimum MTU is the same as of any other Ethernet
> interface, and definitely not zero. For the max_mtu, we have a callback
> through which drivers can override that, if they want to.
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values
2020-07-18 18:04 [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values Vladimir Oltean
2020-07-18 18:43 ` Florian Fainelli
@ 2020-07-21 1:36 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-07-21 1:36 UTC (permalink / raw)
To: olteanv
Cc: kuba, netdev, andrew, f.fainelli, vivien.didelot, noodles, mnhagan88
From: Vladimir Oltean <olteanv@gmail.com>
Date: Sat, 18 Jul 2020 21:04:18 +0300
> Now that DSA supports MTU configuration, undo the effects of commit
> 8b1efc0f83f1 ("net: remove MTU limits on a few ether_setup callers") and
> let DSA interfaces use the default min_mtu and max_mtu specified by
> ether_setup(). This is more important for min_mtu: since DSA is
> Ethernet, the minimum MTU is the same as of any other Ethernet
> interface, and definitely not zero. For the max_mtu, we have a callback
> through which drivers can override that, if they want to.
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-21 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-18 18:04 [PATCH net-next] net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values Vladimir Oltean
2020-07-18 18:43 ` Florian Fainelli
2020-07-21 1:36 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.