Jan Stancek
e5ad1d9823
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 >
2025-01-09 12:53:27 -08:00
Jan Stancek
ab88c2b373
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 >
2025-01-09 12:53:27 -08:00
Jakub Kicinski
07c3cc51a0
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 >
2024-07-02 18:59:33 -07:00
Jakub Kicinski
1d8617b2a6
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 >
2024-03-06 12:05:10 +00:00
Jakub Kicinski
4e887471e8
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 >
2024-03-06 12:05:10 +00:00
Jakub Kicinski
9cf9b57082
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 >
2023-11-29 16:07:00 -08:00
Jakub Kicinski
a50660173c
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 >
2023-10-04 17:33:54 -07:00
Stanislav Fomichev
25b5a2a190
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 >
2023-07-28 09:33:12 -07:00
Jakub Kicinski
86878f14d7
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 >
2023-06-06 12:31:31 -07:00