On Thu, Apr 9, 2026 at 8:27 AM Jakub Kicinski <[email protected]> wrote: > > On Wed, 8 Apr 2026 10:04:09 +0800 Xu Du wrote: > > On Tue, Apr 7, 2026 at 11:08 PM Jakub Kicinski <[email protected]> wrote: > > > > > > On Tue, 7 Apr 2026 10:45:09 +0800 Xu Du wrote: > > > > As the YNL Python module cannot be invoked across different devices or > > > > environments directly in its current form, the helper abstracts the > > > > YNL CLI calls to ensure proper configuration of the tunneling device > > > > features. > > > > > > Can you explain more? Why can't you use class RtnlFamily? > > > > I want to test the gro-hint parameter functionality of the GENEVE tunnel, > > so I intend to use YNL for the testing. I am conducting the test between > > two machines using SSH type. I want to add the gro-hint parameter on > > both the local and remote nodes; however, I am unable to invoke class > > RtnlFamily on the remote node via SSH. > > Oh. But that's not really what you're doing: > > +def ynlcli(family, args, json=None, ns=None, host=None): > + if (KSFT_DIR / "kselftest-list.txt").exists(): > + cli = KSFT_DIR / "net/lib/ynl/pyynl/cli.py" > + spec = KSFT_DIR / f"net/lib/specs/{family}.yaml" > + else: > + cli = KSRC / "tools/net/ynl/pyynl/cli.py" > + spec = KSRC / f"Documentation/netlink/specs/{family}.yaml" > + if not cli.exists(): > + raise FileNotFoundError(f"cli not found at {cli}") > + args = f"--spec {spec} --no-schema {args}" > + return tool(cli.as_posix(), args, json=json, ns=ns, host=host, > shell=True) > > You're not deploying anything to the remote system. > Are you assuming that the remote system magically has the same > filesystem layout? > > You can use the ynl CLI but it has to be whatever version is on > the remote system. Just call ynl --family rt-link, don't dig > around for the spec paths etc. >
In fact, I have tested this from two different locations. The first is in tools/testing/selftests/drivers/net/hw/ using python3 tso.py, which utilizes the specs located in Documentation/netlink/specs/. The second follows the testing methodology described in the README.rst of tools/testing/selftests/drivers/net/, which uses the specs in net/lib/specs/. Based on this, I include that different processes utilize different spec locations. I also referred to the implementation in net/lib/py/ynl.py, which employs a similar handling logic. Both using the source code repository and installing the package can meet the requirements for remote testing. -- Regards, Xu

