# Re: \[PATCH v2 net-next 06/10\] net: dsa: b53: Add MTU configuration support

- From: Vladimir Oltean \<olteanv@gmail.com\>
- Date: 2020-03-26 00:49:05 
- List: netdev
- Page: https://ratatoskr.run/netdev/2020/03/11164723
- Thread: https://ratatoskr.run/netdev/2020/03/11164638/t.md

```text
On Thu, 26 Mar 2020 at 01:22, Florian Fainelli [ref] wrote:
>
>
>
> On 3/25/2020 8:22 AM, Vladimir Oltean wrote:
> > From: Murali Krishna Policharla <redacted>
> >
> > Add b53_change_mtu API to configure mtu settings in B53 switch. Enable
> > jumbo frame support if configured mtu size is for jumbo frame. Also
> > configure BCM583XX devices to send and receive jumbo frames when ports
> > are configured with 10/100 Mbps speed.
> >
> > Signed-off-by: Murali Krishna Policharla <redacted>
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> [snip]
>
> > @@ -658,6 +659,14 @@ static void b53_enable_cpu_port(struct b53_device *dev, int port)
> >       b53_brcm_hdr_setup(dev->ds, port);
> >
> >       b53_br_egress_floods(dev->ds, port, true, true);
> > +
> > +     b53_read32(dev, B53_JUMBO_PAGE, dev->jumbo_pm_reg, &port_mask);
> > +
> > +     if (dev->chip_id == BCM583XX_DEVICE_ID)
> > +             port_mask |= JPM_10_100_JUMBO_EN;
> > +
> > +     port_mask |= BIT(port);
> > +     b53_write32(dev, B53_JUMBO_PAGE, dev->jumbo_pm_reg, port_mask);
>
> This should eventually be brought into b53_set_jumbo() where we already
> have existing logic to configure whether to accept jumbo frames and for
> 10/100M ports, too, not strictly necessary for now though:
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> --
> Florian

What do you mean should be done? This?

     if (!is5325(dev) && !is5365(dev))
-        b53_set_jumbo(dev, dev->enable_jumbo, false);
+        b53_set_jumbo(dev, dev->enable_jumbo, is58xx(dev));

Regards,
-Vladimir
```
