Message ID | 20240930171753.2572922-12-sdf@fomichev.me (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | selftests: ncdevmem: Add ncdevmem to ksft | expand |
On Mon, Sep 30, 2024 at 10:18 AM Stanislav Fomichev <sdf@fomichev.me> wrote: > > This is where all the tests that depend on the HW functionality live in > and this is where the automated test is gonna be added in the next > patch. > Tbh I don't like this very much. I wanted to take ncdevmem in the opposite direction: to make at least the control path tests runnable on netdevsim or something like that and have it not require any HW support at all. But I see in the cover letter that Jakub himself asked for the move, so if there is some strong reason to make this in hw, sure. Does it being under HW preclude future improvements to making it a non-HW dependent test?
On 10/03, Mina Almasry wrote: > On Mon, Sep 30, 2024 at 10:18 AM Stanislav Fomichev <sdf@fomichev.me> wrote: > > > > This is where all the tests that depend on the HW functionality live in > > and this is where the automated test is gonna be added in the next > > patch. > > > > Tbh I don't like this very much. I wanted to take ncdevmem in the > opposite direction: to make at least the control path tests runnable > on netdevsim or something like that and have it not require any HW > support at all. > > But I see in the cover letter that Jakub himself asked for the move, > so if there is some strong reason to make this in hw, sure. > > Does it being under HW preclude future improvements to making it a > non-HW dependent test? I'm moving it under drivers/net/hw only because I want ncdevmem to end up as a TEST_GEN_FILES dependency (drivers/net/hw is the directory that the vendors will eventually run against their HW so this is where the HW-dependent tests are gonna stay for now). And I'm not sure I can do a cross directory dependency in TEST_GEN_FILES. But maybe I haven't looked hard enough? Let's not marry too much to the location? When you get ncdevmem working with netdevsim, we can move the file to a different location.
On Thu, Oct 3, 2024 at 10:26 AM Stanislav Fomichev <stfomichev@gmail.com> wrote: > > On 10/03, Mina Almasry wrote: > > On Mon, Sep 30, 2024 at 10:18 AM Stanislav Fomichev <sdf@fomichev.me> wrote: > > > > > > This is where all the tests that depend on the HW functionality live in > > > and this is where the automated test is gonna be added in the next > > > patch. > > > > > > > Tbh I don't like this very much. I wanted to take ncdevmem in the > > opposite direction: to make at least the control path tests runnable > > on netdevsim or something like that and have it not require any HW > > support at all. > > > > But I see in the cover letter that Jakub himself asked for the move, > > so if there is some strong reason to make this in hw, sure. > > > > Does it being under HW preclude future improvements to making it a > > non-HW dependent test? > > I'm moving it under drivers/net/hw only because I want ncdevmem to end > up as a TEST_GEN_FILES dependency (drivers/net/hw is the directory > that the vendors will eventually run against their HW so this is > where the HW-dependent tests are gonna stay for now). Ah, OK. Makes sense then. Reviewed-by: Mina Almasry <almasrymina@google.com> Thanks!
diff --git a/tools/testing/selftests/drivers/net/hw/.gitignore b/tools/testing/selftests/drivers/net/hw/.gitignore new file mode 100644 index 000000000000..e9fe6ede681a --- /dev/null +++ b/tools/testing/selftests/drivers/net/hw/.gitignore @@ -0,0 +1 @@ +ncdevmem diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile index c9f2f48fc30f..7bce46817953 100644 --- a/tools/testing/selftests/drivers/net/hw/Makefile +++ b/tools/testing/selftests/drivers/net/hw/Makefile @@ -26,4 +26,13 @@ TEST_INCLUDES := \ ../../../net/forwarding/tc_common.sh \ # +# YNL files, must be before "include ..lib.mk" +EXTRA_CLEAN += $(OUTPUT)/libynl.a $(OUTPUT)/ncdevmem +YNL_GEN_FILES := ncdevmem +TEST_GEN_FILES += $(YNL_GEN_FILES) + include ../../../lib.mk + +# YNL build +YNL_GENS := ethtool netdev +include ../../../net/ynl.mk diff --git a/tools/testing/selftests/net/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c similarity index 100% rename from tools/testing/selftests/net/ncdevmem.c rename to tools/testing/selftests/drivers/net/hw/ncdevmem.c diff --git a/tools/testing/selftests/net/.gitignore b/tools/testing/selftests/net/.gitignore index 1c04c780db66..923bf098e2eb 100644 --- a/tools/testing/selftests/net/.gitignore +++ b/tools/testing/selftests/net/.gitignore @@ -17,7 +17,6 @@ ipv6_flowlabel ipv6_flowlabel_mgr log.txt msg_zerocopy -ncdevmem nettest psock_fanout psock_snd diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 9c970e96ed33..22a5d6a7c3f3 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -97,11 +97,6 @@ TEST_PROGS += fq_band_pktlimit.sh TEST_PROGS += vlan_hw_filter.sh TEST_PROGS += bpf_offload.py -# YNL files, must be before "include ..lib.mk" -EXTRA_CLEAN += $(OUTPUT)/libynl.a -YNL_GEN_FILES := ncdevmem -TEST_GEN_FILES += $(YNL_GEN_FILES) - TEST_FILES := settings TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh @@ -111,10 +106,6 @@ TEST_INCLUDES := forwarding/lib.sh include ../lib.mk -# YNL build -YNL_GENS := ethtool netdev -include ynl.mk - $(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap $(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma $(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto
This is where all the tests that depend on the HW functionality live in and this is where the automated test is gonna be added in the next patch. Cc: Mina Almasry <almasrymina@google.com> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> --- tools/testing/selftests/drivers/net/hw/.gitignore | 1 + tools/testing/selftests/drivers/net/hw/Makefile | 9 +++++++++ .../testing/selftests/{net => drivers/net/hw}/ncdevmem.c | 0 tools/testing/selftests/net/.gitignore | 1 - tools/testing/selftests/net/Makefile | 9 --------- 5 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 tools/testing/selftests/drivers/net/hw/.gitignore rename tools/testing/selftests/{net => drivers/net/hw}/ncdevmem.c (100%)