lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/3] dsa: marvell: Provide per device information about max frame size
> I tend to agree... The number of switched which suppor 1522 B max frame
> is only six. This may be why the problem was not noticed.
>
> The fixed function maybe should look like below:
>
>
> static int mv88e6xxx_get_max_mtu(struct dsa_switch *ds, int port)
> {
> ....
>
>
> int max_mtu;
>
> max_mtu = chip->info->max_frame_size - VLAN_ETH_HLEN -
> ETH_FCS_LE;
>
> if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
> max_mtu -= EDSA_HLEN;
>
> return max_mtu;
> }
>
> Comments more than welcome.


I would suggest some comments are added, explaining what is going on
here. Given the number of Fixes: tags in this area, it is clearly
tricky to get right, given how different switches operate.

I've not looked back to the email archive, but i have a vague
recollection that it could be some switches don't impose the MTU limit
on CPU and DSA ports, just the user ports. So the value reported for
those ports can actually be bigger than then the max mtu, in order to
accommodate the DSA header.

Andrew

\
 
 \ /
  Last update: 2023-03-26 23:39    [W:0.049 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site