[PATCH v8 4/8] net: dsa: allow rcv() and xmit() to be optional
Tim Harvey
tharvey at gateworks.com
Tue Nov 29 23:53:15 CET 2022
On Mon, Nov 28, 2022 at 7:58 AM Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Oct 27, 2022 at 05:49:33PM -0700, Tim Harvey wrote:
>
> > Allow rcv() and xmit() dsa driver ops to be optional in case a driver
> > does not care to mangle a packet as in U-Boot only one network port is
> > enabled at a time and thus no packet mangling is necessary.
> >
> > Suggested-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> > Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> > Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> > Reviewed-by: Fabio Estevam <festevam at denx.de>
>
> This causes:
> FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_dsa] - AssertionError: assert False
>
> In sandbox, and I don't know if the test or the code is wrong.
>
Tom,
I'm not familiar at all with U-Boot's sandbox or unit test
infrastructure and am trying to learn.
I've figured out how to build sandbox and run the dm_test_dsa
(./u-boot -T -c "ut dm dsa") and see the same failure as you but I
don't understand how to debug this as it seems prints I add in
dsa_port_send and dsa_port_recv (which is what this patch modifies)
don't get print when run from the test infrastructure.
When I boot u-boot sandbox (./u-boot) I don't see any network devices
at all - perhaps I'm not booting sandbox with dm or something? I need
to understand what devices/drivers sandbox is using and how to
recreate the network environment that the dm_test_dsa function is
using which calls 'net_loop':
net_ping_ip = string_to_ip("1.2.3.5");
env_set("ethact", "eth2");
ut_assertok(net_loop(PING));
env_set("ethact", "lan0");
ut_assertok(net_loop(PING));
env_set("ethact", "lan1");
ut_assertok(net_loop(PING));
env_set("ethact", "");
Best Regards,
Tim
More information about the U-Boot
mailing list