Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The newly added rx_page_size probe in require_devmem() fails to execute within the correct network namespace, causing the test to incorrectly skip in containerized environments (like nk_devmem.py). --
--- Patch [3]: [PATCH net-next v7 3/3] selftests/net: devmem.py: add check_rx_large_niov --- commit 53558ad37aa9b0e02e2eb8a09081a53ab1fd981c Author: Bobby Eshleman <[email protected]> selftests/net: devmem.py: add check_rx_large_niov Add a new devmem test case for binding the dmabuf with rx-page-size=16K. The test sweeps RX payload sizes straddling the niov boundary to cover the sub-niov, exact-niov, and multi-niov RX paths. > diff --git a/tools/testing/selftests/drivers/net/hw/devmem_lib.py > b/tools/testing/selftests/drivers/net/hw/devmem_lib.py > index 0921ff03eb81c..cbe3a8e498239 100644 > --- a/tools/testing/selftests/drivers/net/hw/devmem_lib.py > +++ b/tools/testing/selftests/drivers/net/hw/devmem_lib.py [ ... ] > @@ -18,6 +28,25 @@ def require_devmem(cfg): > if not cfg.devmem_supported: > raise KsftSkipEx("Test requires devmem support") > > + if rx_page_size > 0: > + page_size = os.sysconf("SC_PAGE_SIZE") > + if not _is_aligned(rx_page_size, page_size): > + raise KsftSkipEx( > + f"rx-page-size={rx_page_size} is invalid for this platform " > + f"(must be a multiple of PAGE_SIZE={page_size})") > + > + if not hasattr(cfg, "devmem_rx_page_size_probed"): > + cfg.devmem_rx_page_size_probed = {} > + > + if rx_page_size not in cfg.devmem_rx_page_size_probed: > + probe_command = f"{cfg.bin_local} -f {cfg.ifname} -b > {rx_page_size}" > + cfg.devmem_rx_page_size_probed[rx_page_size] = \ > + cmd(probe_command, fail=False, shell=True).ret == 0 [Severity: Medium] Is it intentional that this probe command executes in the default namespace rather than the containerized network namespace? Since cmd() is called without the ns=getattr(cfg, "netns", None) argument, it appears this probe runs outside of the proper network context. Could this cause tests in container environments (like nk_devmem.py) to incorrectly skip because the rx_page_size capability probe fails? > + > + if not cfg.devmem_rx_page_size_probed[rx_page_size]: > + raise KsftSkipEx( > + f"Test requires devmem rx-page-size={rx_page_size} support") > + -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3
