| #
e0aa0c61 |
| 07-Mar-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: move samples to tests
The "samples" were always poor man's tests (used to manually confirm that C YNL works).
Move all C sample programs from tools/net/ynl/samples/ to tools/net/ynl/tes
tools: ynl: move samples to tests
The "samples" were always poor man's tests (used to manually confirm that C YNL works).
Move all C sample programs from tools/net/ynl/samples/ to tools/net/ynl/tests/, "merge" the Makefiles. The subsequent changes will convert each sample into a proper KTAP selftests.
Since these are now tests rather than samples - default to enabling asan. After all we're testing user space code here.
Sort the gitignore while at it, the page-pool entry was a leftover so delete it.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Tested-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260307033630.1396085-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
a917cd0a |
| 16-Jan-2026 |
Michel Lind <michel@michel-slm.name> |
tools/net/ynl: Makefile's install target now installs ynltool
This tool is built by default, but was not being installed by default when running `make install`. Fix this by calling ynltool's install
tools/net/ynl: Makefile's install target now installs ynltool
This tool is built by default, but was not being installed by default when running `make install`. Fix this by calling ynltool's install target.
Signed-off-by: Michel Lind <michel@michel-slm.name> Link: https://patch.msgid.link/aWqr9gUT4hWZwwcI@mbp-m3-fedora.vm Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
790792eb |
| 06-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: don't install tests
make's install target is meant for installing the production artifacts, AFAIU. Don't install test_ynl_cli and test_ynl_ethtool from under the main YNL install target.
tools: ynl: don't install tests
make's install target is meant for installing the production artifacts, AFAIU. Don't install test_ynl_cli and test_ynl_ethtool from under the main YNL install target. The install target under tests/ is retained in case someone wants the tests to be installed.
Fixes: 308b7dee3e5c ("tools: ynl: add YNL test framework") Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260106163426.1468943-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
129dc607 |
| 27-Nov-2025 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: add a lint makefile target
Add a lint target to run yamllint on the YNL specs.
make -C tools/net/ynl lint make: Entering directory '/home/donaldh/net-next/tools/net/ynl' yamllint ../../
tools: ynl: add a lint makefile target
Add a lint target to run yamllint on the YNL specs.
make -C tools/net/ynl lint make: Entering directory '/home/donaldh/net-next/tools/net/ynl' yamllint ../../../Documentation/netlink/specs/*.yaml ../../../Documentation/netlink/specs/ethtool.yaml 1272:21 warning truthy value should be one of [false, true] (truthy)
make: Leaving directory '/home/donaldh/net-next/tools/net/ynl'
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20251127123502.89142-3-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
362d051c |
| 27-Nov-2025 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: add schema checking
Add a --validate flag to pyynl for explicit schema check with error reporting and add a schema_check make target to check all YNL specs.
make -C tools/net/ynl schema
tools: ynl: add schema checking
Add a --validate flag to pyynl for explicit schema check with error reporting and add a schema_check make target to check all YNL specs.
make -C tools/net/ynl schema_check make: Entering directory '/home/donaldh/net-next/tools/net/ynl' ok 1 binder.yaml schema validation not ok 2 conntrack.yaml schema validation 'labels mask' does not match '^[0-9a-z-]+$'
Failed validating 'pattern' in schema['properties']['attribute-sets']['items']['properties']['attributes']['items']['properties']['name']: {'type': 'string', 'pattern': '^[0-9a-z-]+$'}
On instance['attribute-sets'][14]['attributes'][22]['name']: 'labels mask'
ok 3 devlink.yaml schema validation [...]
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20251127123502.89142-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
308b7dee |
| 24-Nov-2025 |
Hangbin Liu <liuhangbin@gmail.com> |
tools: ynl: add YNL test framework
Add a test framework for YAML Netlink (YNL) tools, covering both CLI and ethtool functionality. The framework includes:
1) cli: family listing, netdev, ethtool, r
tools: ynl: add YNL test framework
Add a test framework for YAML Netlink (YNL) tools, covering both CLI and ethtool functionality. The framework includes:
1) cli: family listing, netdev, ethtool, rt-* families, and nlctrl operations 2) ethtool: device info, statistics, ring/coalesce/pause parameters, and feature gettings
The current YNL syntax is a bit obscure, and end users may not always know how to use it. This test framework provides usage examples and also serves as a regression test to catch potential breakages caused by future changes.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/20251124022055.33389-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
b02d2290 |
| 07-Nov-2025 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynltool: create skeleton for the C command
Based on past discussions it seems like integration of YNL into iproute2 is unlikely. YNL itself is not great as a C library, since it has no backwa
tools: ynltool: create skeleton for the C command
Based on past discussions it seems like integration of YNL into iproute2 is unlikely. YNL itself is not great as a C library, since it has no backward compat (we routinely change types).
Most of the operations can be performed with the generic Python CLI directly. There is, however, a handful of operations where summarization of kernel output is very useful (mostly related to stats: page-pool, qstat).
Create a command (inspired by bpftool, I think it stood the test of time reasonably well) to be able to plug the subcommands into.
Link: https://lore.kernel.org/1754895902-8790-1-git-send-email-ernis@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20251107162227.980672-2-kuba@kernel.org Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| #
e5ad1d98 |
| 08-Jan-2025 |
Jan Stancek <jstancek@redhat.com> |
tools: ynl: add main install target
This will install C library, specs, rsts and pyynl. The initial structure is:
$ mkdir /tmp/myroot $ make DESTDIR=/tmp/myroot install
/usr /usr/lib64 /usr/l
tools: ynl: add main install target
This will install C library, specs, rsts and pyynl. The initial structure is:
$ mkdir /tmp/myroot $ make DESTDIR=/tmp/myroot install
/usr /usr/lib64 /usr/lib64/libynl.a /usr/lib/python3.XX/site-packages/pyynl/* /usr/lib/python3.XX/site-packages/pyynl-0.0.1.dist-info/* /usr/bin /usr/bin/ynl /usr/bin/ynl-ethtool /usr/include/ynl/*.h /usr/share /usr/share/doc /usr/share/doc/ynl /usr/share/doc/ynl/*.rst /usr/share/ynl /usr/share/ynl/genetlink-c.yaml /usr/share/ynl/genetlink-legacy.yaml /usr/share/ynl/genetlink.yaml /usr/share/ynl/netlink-raw.yaml /usr/share/ynl/specs /usr/share/ynl/specs/devlink.yaml /usr/share/ynl/specs/dpll.yaml /usr/share/ynl/specs/ethtool.yaml /usr/share/ynl/specs/fou.yaml /usr/share/ynl/specs/handshake.yaml /usr/share/ynl/specs/mptcp_pm.yaml /usr/share/ynl/specs/netdev.yaml /usr/share/ynl/specs/net_shaper.yaml /usr/share/ynl/specs/nfsd.yaml /usr/share/ynl/specs/nftables.yaml /usr/share/ynl/specs/nlctrl.yaml /usr/share/ynl/specs/ovs_datapath.yaml /usr/share/ynl/specs/ovs_flow.yaml /usr/share/ynl/specs/ovs_vport.yaml /usr/share/ynl/specs/rt_addr.yaml /usr/share/ynl/specs/rt_link.yaml /usr/share/ynl/specs/rt_neigh.yaml /usr/share/ynl/specs/rt_route.yaml /usr/share/ynl/specs/rt_rule.yaml /usr/share/ynl/specs/tcp_metrics.yaml /usr/share/ynl/specs/tc.yaml /usr/share/ynl/specs/team.yaml
Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/c882688d751295c7f35c7d4eba104cd5174a0861.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
ab88c2b3 |
| 08-Jan-2025 |
Jan Stancek <jstancek@redhat.com> |
tools: ynl: move python code to separate sub-directory
Move python code to a separate directory so it can be packaged as a python module. Updates existing references in selftests and docs.
Also ren
tools: ynl: move python code to separate sub-directory
Move python code to a separate directory so it can be packaged as a python module. Updates existing references in selftests and docs.
Also rename ynl-gen-[c|rst] to ynl_gen_[c|rst], avoid dashes as these prevent easy imports for entrypoints.
Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/a4151bad0e6984e7164d395125ce87fd2e048bf1.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
07c3cc51 |
| 28-Jun-2024 |
Jakub Kicinski <kuba@kernel.org> |
tools: net: package libynl for use in selftests
Support building the C YNL userspace library into one big static file. We can then link selftests against it for easy to use C netlink interface.
Sig
tools: net: package libynl for use in selftests
Support building the C YNL userspace library into one big static file. We can then link selftests against it for easy to use C netlink interface.
Signed-off-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/20240628003253.1694510-14-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
1d8617b2 |
| 05-Mar-2024 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: add distclean to .PHONY in all makefiles
Donald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
Suggested-by: Donald Hunter <don
tools: ynl: add distclean to .PHONY in all makefiles
Donald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
Suggested-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| #
4e887471 |
| 05-Mar-2024 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: rename make hardclean -> distclean
The make target to remove all generated files used to be called "hardclean" because it deleted files which were tracked by git. We no longer track gene
tools: ynl: rename make hardclean -> distclean
The make target to remove all generated files used to be called "hardclean" because it deleted files which were tracked by git. We no longer track generated user space files, so use the more common "distclean" name.
Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| #
9cf9b570 |
| 29-Nov-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: order building samples after generated code
Parallel builds of ynl:
make -C tools/net/ynl/ -j 4
don't work correctly right now. samples get handled before generated, so build of samp
tools: ynl: order building samples after generated code
Parallel builds of ynl:
make -C tools/net/ynl/ -j 4
don't work correctly right now. samples get handled before generated, so build of samples does not notice that protos.a has changed. Order samples to be last.
Link: https://lore.kernel.org/r/20231129193622.2912353-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
a5066017 |
| 03-Oct-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: don't regen on every make
As far as I can tell the normal Makefile dependency tracking works, generated files get re-generated if the YAML was updated. Let make do its job, don't force t
tools: ynl: don't regen on every make
As far as I can tell the normal Makefile dependency tracking works, generated files get re-generated if the YAML was updated. Let make do its job, don't force the re-generation. make hardclean can be used to force regeneration.
Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/20231003153416.2479808-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
25b5a2a1 |
| 27-Jul-2023 |
Stanislav Fomichev <sdf@google.com> |
ynl: regenerate all headers
Also add support to pass topdir to ynl-regen.sh (Jakub) and call it from the makefile to update the UAPI headers.
Signed-off-by: Stanislav Fomichev <sdf@google.com> Co-d
ynl: regenerate all headers
Also add support to pass topdir to ynl-regen.sh (Jakub) and call it from the makefile to update the UAPI headers.
Signed-off-by: Stanislav Fomichev <sdf@google.com> Co-developed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230727163001.3952878-4-sdf@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| #
86878f14 |
| 05-Jun-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: user space helpers
Add "fixed" part of the user space Netlink Spec-based library. This will get linked with the protocol implementations to form a full API.
Acked-by: Willem de Bruijn <
tools: ynl: user space helpers
Add "fixed" part of the user space Netlink Spec-based library. This will get linked with the protocol implementations to form a full API.
Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|