aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2023-12-09 23:37:35 +0100
committerPaolo Abeni <[email protected]>2023-12-12 14:17:06 +0100
commitd577ca429af36a3aea38d53d11be56dff015dfc9 (patch)
tree75116060c7610463140e11cb94df65e0a67f9ced /tools/testing/selftests/bpf/progs/test_autoload.c
parent389119c842187e2425d8e0354aabe5c3383c5020 (diff)
net: dsa: realtek: Rewrite RTL8366RB MTU handling
The MTU callbacks are in layer 1 size, so for example 1500 bytes is a normal setting. Cache this size, and only add the layer 2 framing right before choosing the setting. On the CPU port this will however include the DSA tag since this is transmitted from the parent ethernet interface! Add the layer 2 overhead such as ethernet and VLAN framing and FCS before selecting the size in the register. This will make the code easier to understand. The rtl8366rb_max_mtu() callback returns a bogus MTU just subtracting the CPU tag, which is the only thing we should NOT subtract. Return the correct layer 1 max MTU after removing headers and checksum. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Alvin Šipraga <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions