mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
David S. Miller
parent
68335713d2
commit
2d7be507d6
@@ -7,9 +7,12 @@ ifeq ("$(DEBUG)","1")
|
|||||||
CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
|
CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
YNL_GEN_ARG_ethtool:=--user-header linux/ethtool_netlink.h \
|
||||||
|
--exclude-op stats-get
|
||||||
|
|
||||||
TOOL:=../ynl-gen-c.py
|
TOOL:=../ynl-gen-c.py
|
||||||
|
|
||||||
GENS:=devlink handshake fou netdev
|
GENS:=ethtool devlink handshake fou netdev
|
||||||
SRCS=$(patsubst %,%-user.c,${GENS})
|
SRCS=$(patsubst %,%-user.c,${GENS})
|
||||||
HDRS=$(patsubst %,%-user.h,${GENS})
|
HDRS=$(patsubst %,%-user.h,${GENS})
|
||||||
OBJS=$(patsubst %,%-user.o,${GENS})
|
OBJS=$(patsubst %,%-user.o,${GENS})
|
||||||
@@ -22,11 +25,11 @@ protos.a: $(OBJS)
|
|||||||
|
|
||||||
%-user.h: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
|
%-user.h: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
|
||||||
@echo -e "\tGEN $@"
|
@echo -e "\tGEN $@"
|
||||||
@$(TOOL) --mode user --header --spec $< > $@
|
@$(TOOL) --mode user --header --spec $< $(YNL_GEN_ARG_$*) > $@
|
||||||
|
|
||||||
%-user.c: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
|
%-user.c: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
|
||||||
@echo -e "\tGEN $@"
|
@echo -e "\tGEN $@"
|
||||||
@$(TOOL) --mode user --source --spec $< > $@
|
@$(TOOL) --mode user --source --spec $< $(YNL_GEN_ARG_$*) > $@
|
||||||
|
|
||||||
%-user.o: %-user.c %-user.h
|
%-user.o: %-user.c %-user.h
|
||||||
@echo -e "\tCC $@"
|
@echo -e "\tCC $@"
|
||||||
|
6353
tools/net/ynl/generated/ethtool-user.c
Normal file
6353
tools/net/ynl/generated/ethtool-user.c
Normal file
File diff suppressed because it is too large
Load Diff
5531
tools/net/ynl/generated/ethtool-user.h
Normal file
5531
tools/net/ynl/generated/ethtool-user.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user