Skip to content

Commit

Permalink
tools: ynl: make sure we use local headers for page-pool
Browse files Browse the repository at this point in the history
Building samples generates the following warning:

  In file included from page-pool.c:11:
  generated/netdev-user.h:21:45: warning: ‘enum netdev_xdp_rx_metadata’ declared inside parameter list will not be visible outside of this definition or declaration
   21 | const char *netdev_xdp_rx_metadata_str(enum netdev_xdp_rx_metadata value);
      |                                             ^~~~~~~~~~~~~~~~~~~~~~

Our magic way of including uAPI headers assumes the sample
name matches the family name. We need to copy the flags over.

Fixes: 637567e ("tools: ynl: add sample for getting page-pool information")
Link: https://lore.kernel.org/r/20231129193622.2912353-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Nov 30, 2023
1 parent ee1eb9d commit 9290037
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/net/ynl/samples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ include $(wildcard *.d)

all: $(BINS)

CFLAGS_page-pool=$(CFLAGS_netdev)

$(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS)
@echo -e '\tCC sample $@'
@$(COMPILE.c) $(CFLAGS_$@) $@.c -o $@.o
Expand Down

0 comments on commit 9290037

Please sign in to comment.