[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200309.175551.444627983233718053.davem@davemloft.net>
Date: Mon, 09 Mar 2020 17:55:51 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: olteanv@...il.com
Cc: horatiu.vultur@...rochip.com, alexandre.belloni@...tlin.com,
andrew@...n.ch, f.fainelli@...il.com, vivien.didelot@...il.com,
joergen.andreasen@...rochip.com, allan.nielsen@...rochip.com,
claudiu.manoil@....com, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com, alexandru.marginean@....com,
xiaoliang.yang_1@....com, yangbo.lu@....com
Subject: Re: [PATCH net] net: mscc: ocelot: properly account for VLAN
header length when setting MRU
From: Vladimir Oltean <olteanv@...il.com>
Date: Mon, 9 Mar 2020 22:16:08 +0200
> From: Vladimir Oltean <vladimir.oltean@....com>
>
> What the driver writes into MAC_MAXLEN_CFG does not actually represent
> VLAN_ETH_FRAME_LEN but instead ETH_FRAME_LEN + ETH_FCS_LEN. Yes they are
> numerically equal, but the difference is important, as the switch treats
> VLAN-tagged traffic specially and knows to increase the maximum accepted
> frame size automatically. So it is always wrong to account for VLAN in
> the MAC_MAXLEN_CFG register.
>
> Unconditionally increase the maximum allowed frame size for
> double-tagged traffic. Accounting for the additional length does not
> mean that the other VLAN membership checks aren't performed, so there's
> no harm done.
>
> Also, stop abusing the MTU name for configuring the MRU. There is no
> support for configuring the MRU on an interface at the moment.
>
> Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support")
> Fixes: fa914e9c4d94 ("net: mscc: ocelot: create a helper for changing the port MTU")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
This doesn't apply cleanly to the current net tree, please respin.
Thank you.
Powered by blists - more mailing lists