summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorRobert Marko <robert.marko@sartura.hr>2021-11-19 03:03:50 +0100
committerDavid S. Miller <davem@davemloft.net>2021-11-22 12:34:37 +0000
commit65258b9d8cde45689bdc86ca39b50f01f983733b (patch)
treec06310f050021cd3e420e42efcb9e7a072899b59 /tools
parent3b00a07c2443745d62babfe08dbb2ad8e649526e (diff)
downloadlinux-65258b9d8cde45689bdc86ca39b50f01f983733b.tar.gz
net: dsa: qca8k: fix MTU calculation
qca8k has a global MTU, so its tracking the MTU per port to make sure
that the largest MTU gets applied.
Since it uses the frame size instead of MTU the driver MTU change function
will then add the size of Ethernet header and checksum on top of MTU.

The driver currently populates the per port MTU size as Ethernet frame
length + checksum which equals 1518.

The issue is that then MTU change function will go through all of the
ports, find the largest MTU and apply the Ethernet header + checksum on
top of it again, so for a desired MTU of 1500 you will end up with 1536.

This is obviously incorrect, so to correct it populate the per port struct
MTU with just the MTU and not include the Ethernet header + checksum size
as those will be added by the MTU change function.

Fixes: f58d2598cf70 ("net: dsa: qca8k: implement the port MTU callbacks")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions