linux/drivers/net/ethernet/mscc
Vladimir Oltean a8015ded89 net: mscc: ocelot: properly account for VLAN header length when setting MRU
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: a556c76adc ("net: mscc: Add initial Ocelot switch support")
Fixes: fa914e9c4d ("net: mscc: ocelot: create a helper for changing the port MTU")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-09 18:58:17 -07:00
..
Kconfig net: mscc: ocelot: make use of SerDes PHYs for handling their configuration 2018-10-05 14:36:44 -07:00
Makefile net: mscc: ocelot: Hardware ofload for tc flower filter 2019-06-02 13:49:49 -07:00
ocelot.c net: mscc: ocelot: properly account for VLAN header length when setting MRU 2020-03-09 18:58:17 -07:00
ocelot.h net: mscc: ocelot: export ANA, DEV and QSYS registers to include/soc/mscc 2020-01-05 23:22:33 -08:00
ocelot_ace.c ocelot_ace: fix action of trap 2019-08-22 15:44:24 -07:00
ocelot_ace.h net: mscc: ocelot: separate net_device related items out of ocelot_port 2019-11-11 12:59:10 -08:00
ocelot_board.c net: mscc: fix in frame extraction 2020-02-17 14:02:29 -08:00
ocelot_flower.c net: mscc: ocelot: separate net_device related items out of ocelot_port 2019-11-11 12:59:10 -08:00
ocelot_io.c net: mscc: ocelot: move resource ioremap and regmap init to common code 2019-11-15 12:32:16 -08:00
ocelot_police.c net: mscc: ocelot: refactor struct ocelot_port out of function prototypes 2019-11-11 12:59:10 -08:00
ocelot_police.h net: mscc: ocelot: refactor struct ocelot_port out of function prototypes 2019-11-11 12:59:10 -08:00
ocelot_ptp.h net: mscc: describe the PTP register range 2019-08-15 16:31:11 -07:00
ocelot_qs.h
ocelot_regs.c net: mscc: ocelot: filter out ocelot SoC specific PCS config from common path 2019-11-15 12:32:16 -08:00
ocelot_rew.h
ocelot_s2.h net: mscc: ocelot: Add support for tcam 2019-06-02 13:49:49 -07:00
ocelot_tc.c net: mscc: ocelot: separate net_device related items out of ocelot_port 2019-11-11 12:59:10 -08:00
ocelot_tc.h net: mscc: ocelot: Implement port policers via tc command 2019-05-29 21:37:49 -07:00
ocelot_vcap.h net: mscc: ocelot: Add support for tcam 2019-06-02 13:49:49 -07:00