drivers: net: loopback: Increase MTU to match IPv4 MTU

net_pkt_alloc_buffer() will use the maximum packet length of
NET_IPV4_MTU in case the interface MTU is smaller than this. Because of
this, the using the loopback interface with smaller MTU leads to
additional fragmentation at the TCP layer, which impacts performace and
requires more network buffers for tests to execute.

Fix this by matching the loopback interface MTU with NET_IPV4_MTU.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2022-03-24 16:42:25 +01:00 committed by Carles Cufí
commit 823ac60c70

View file

@ -125,4 +125,4 @@ NET_DEVICE_INIT(loopback, "lo",
loopback_dev_init, NULL, NULL, NULL,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&loopback_api, DUMMY_L2,
NET_L2_GET_CTX_TYPE(DUMMY_L2), 536);
NET_L2_GET_CTX_TYPE(DUMMY_L2), 576);