test: Rename interfaces defined in checksum offload test

The struct net_if object placement in linker 'net_if_area' section
now depends on the order of ETH_NET_DEVICE_INIT() macros in the source
code (for the same object file - like app/libapp.a(main.c.obj)).

Currently the 'eth_offloading_enabled_test' device is placed first,
followed by 'eth_offloading_disabled_test'.

This placement is important when one would like to access those
interfaces with net_if_get_default() function.

After the rename the order is explicit, when we append the device name
to the ._net_if.static.<dev name> object in linker's net_if_area.

The code now works as all struct net_if interfaces are placed as
'._net_if.static.net_if' objects.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Lukasz Majewski 2021-04-01 10:49:18 +02:00 committed by Anas Nashif
commit b8148922ee

View file

@ -290,16 +290,16 @@ static int eth_init(const struct device *dev)
return 0;
}
ETH_NET_DEVICE_INIT(eth_offloading_disabled_test,
"eth_offloading_disabled_test",
ETH_NET_DEVICE_INIT(eth1_offloading_disabled_test,
"eth1_offloading_disabled_test",
eth_init, device_pm_control_nop,
&eth_context_offloading_disabled, NULL,
CONFIG_ETH_INIT_PRIORITY,
&api_funcs_offloading_disabled,
NET_ETH_MTU);
ETH_NET_DEVICE_INIT(eth_offloading_enabled_test,
"eth_offloading_enabled_test",
ETH_NET_DEVICE_INIT(eth0_offloading_enabled_test,
"eth0_offloading_enabled_test",
eth_init, device_pm_control_nop,
&eth_context_offloading_enabled, NULL,
CONFIG_ETH_INIT_PRIORITY,