diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-06-10 00:43:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-12 13:01:03 +0300 |
commit | 2d7be507d65e90099c76631bf0448d0b30f7f203 (patch) | |
tree | 3ebf50714b779889c0bba6e02b6a0e6eea59f1f2 /tools/net/ynl/generated/Makefile | |
parent | 68335713d2eaf8e3e064c584b39da45fdee6e365 (diff) | |
download | linux-2d7be507d65e90099c76631bf0448d0b30f7f203.tar.xz |
tools: ynl: generate code for the ethtool family
Generate the protocol code for ethtool. Skip the stats
for now, they are the only outlier in terms of complexity.
Stats are a sort-of semi-polymorphic (attr space of a nest
depends on value of another attr) or a type-value-scalar,
depending on how one wants to look at it...
A challenge for another time.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/net/ynl/generated/Makefile')
-rw-r--r-- | tools/net/ynl/generated/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/net/ynl/generated/Makefile b/tools/net/ynl/generated/Makefile index 8ce610910b8d..f15c24893296 100644 --- a/tools/net/ynl/generated/Makefile +++ b/tools/net/ynl/generated/Makefile @@ -7,9 +7,12 @@ ifeq ("$(DEBUG)","1") CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan endif +YNL_GEN_ARG_ethtool:=--user-header linux/ethtool_netlink.h \ + --exclude-op stats-get + TOOL:=../ynl-gen-c.py -GENS:=devlink handshake fou netdev +GENS:=ethtool devlink handshake fou netdev SRCS=$(patsubst %,%-user.c,${GENS}) HDRS=$(patsubst %,%-user.h,${GENS}) OBJS=$(patsubst %,%-user.o,${GENS}) @@ -22,11 +25,11 @@ protos.a: $(OBJS) %-user.h: ../../../../Documentation/netlink/specs/%.yaml $(TOOL) @echo -e "\tGEN $@" - @$(TOOL) --mode user --header --spec $< > $@ + @$(TOOL) --mode user --header --spec $< $(YNL_GEN_ARG_$*) > $@ %-user.c: ../../../../Documentation/netlink/specs/%.yaml $(TOOL) @echo -e "\tGEN $@" - @$(TOOL) --mode user --source --spec $< > $@ + @$(TOOL) --mode user --source --spec $< $(YNL_GEN_ARG_$*) > $@ %-user.o: %-user.c %-user.h @echo -e "\tCC $@" |