net: mscc: ocelot: adjust MTU on the CPU port in NPI mode
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 14 Nov 2019 15:03:25 +0000 (17:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:32:16 +0000 (12:32 -0800)
commitba551bc3bc22f3a9f16a31cd856b823e76489009
tree3df385dbe165760a86d3ea260f6fa74e5df52df4
parentf24711fddc36aa7286af724393ef7334b92c5702
net: mscc: ocelot: adjust MTU on the CPU port in NPI mode

When using the NPI port, the DSA tag is passed through Ethernet, so the
switch's MAC needs to accept it as it comes from the DSA master. Increase
the MTU on the external CPU port to account for the length of the
injection header.

Without this patch, MTU-sized frames are dropped by the switch's CPU
port on xmit, which is especially obvious in TCP sessions.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot.h