netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	Jakub Kicinski <kuba@kernel.org>,
	hawk@kernel.org, john.fastabend@gmail.com, willemb@google.com,
	sdf@google.com
Subject: [PATCH net-next 2/4] tools: ynl: make sure we use local headers for page-pool
Date: Wed, 29 Nov 2023 11:36:20 -0800	[thread overview]
Message-ID: <20231129193622.2912353-3-kuba@kernel.org> (raw)
In-Reply-To: <20231129193622.2912353-1-kuba@kernel.org>

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: 637567e4a3ef ("tools: ynl: add sample for getting page-pool information")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: hawk@kernel.org
CC: john.fastabend@gmail.com
CC: willemb@google.com
CC: sdf@google.com
---
 tools/net/ynl/samples/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/net/ynl/samples/Makefile b/tools/net/ynl/samples/Makefile
index 1afefc266b7a..28bdb1557a54 100644
--- a/tools/net/ynl/samples/Makefile
+++ b/tools/net/ynl/samples/Makefile
@@ -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
-- 
2.43.0


  parent reply	other threads:[~2023-11-29 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 19:36 [PATCH net-next 0/4] tools: ynl: fixes for the page-pool sample and the generation process Jakub Kicinski
2023-11-29 19:36 ` [PATCH net-next 1/4] tools: ynl: fix build of the page-pool sample Jakub Kicinski
2023-11-29 19:36 ` Jakub Kicinski [this message]
2023-11-29 19:36 ` [PATCH net-next 3/4] tools: ynl: order building samples after generated code Jakub Kicinski
2023-11-29 19:36 ` [PATCH net-next 4/4] tools: ynl: don't skip regeneration from make targets Jakub Kicinski
2023-11-30  0:06 ` [PATCH net-next 0/4] tools: ynl: fixes for the page-pool sample and the generation process Jakub Kicinski
2023-11-30  0:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231129193622.2912353-3-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).