From: Jakub Kicinski <kuba@kernel•org>
To: Zahari Doychev <zaharido@web•de>
Cc: Zahari Doychev <zahari.doychev@linux•com>,
donald.hunter@gmail•com, davem@davemloft•net,
edumazet@google•com, pabeni@redhat•com, horms@kernel•org,
jacob.e.keller@intel•com, ast@fiberby•net, matttbe@kernel•org,
netdev@vger•kernel.org, jhs@mojatatu•com,
xiyou.wangcong@gmail•com, jiri@resnulli•us,
johannes@sipsolutions•net
Subject: Re: [PATCH v2 1/3] ynl: samples: add tc filter example
Date: Tue, 11 Nov 2025 15:54:24 -0800 [thread overview]
Message-ID: <20251111155424.68f085a6@kernel.org> (raw)
In-Reply-To: <cgsea6u5h26klyzcqcbbhhfs2a5zee54b2ixedbrlh6utjgsbn@wnrqu3pnapu5>
On Tue, 11 Nov 2025 21:09:11 +0200 Zahari Doychev wrote:
> On Mon, Nov 10, 2025 at 05:17:39PM -0800, Jakub Kicinski wrote:
> > On Thu, 6 Nov 2025 16:15:27 +0100 Zahari Doychev wrote:
> > > diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
> > > index 865fd2e8519e..96c390af060e 100644
> > > --- a/tools/net/ynl/Makefile.deps
> > > +++ b/tools/net/ynl/Makefile.deps
> > > @@ -47,4 +47,5 @@ CFLAGS_tc:= $(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h) \
> > > $(call get_hdr_inc,_TC_MIRRED_H,tc_act/tc_mirred.h) \
> > > $(call get_hdr_inc,_TC_SKBEDIT_H,tc_act/tc_skbedit.h) \
> > > $(call get_hdr_inc,_TC_TUNNEL_KEY_H,tc_act/tc_tunnel_key.h)
> > > +CFLAGS_tc-filter-add:=$(CFLAGS_tc)
> >
> > Why do we need this? This file is intended for families themselves,
> > if sample needs flags it should be specified in samples/Makefile ?
>
> I am getting compile errors as without the CFLAGS my system
> headers files are used and not the ones in the kernel tree.
> As samples/Makfile is passing the CFLAGS_tc-filter-add when
> compiling I thought this was the way to do this similiar to the
> other examples.
>
> Actually the following flags are fixing my problem:
> -D__LINUX_PKT_SCHED_H -include ../../../../include/uapi//linux/pkt_sched.h
> -D__LINUX_PKT_CLS_H -include ../../../../include/uapi//linux/pkt_cls.h
>
> If I need to fix this in samples/Makefile then I probably need to create
> a new target. Is this really the expectation?
I meant:
diff --git a/tools/net/ynl/samples/Makefile b/tools/net/ynl/samples/Makefile
index c9494a564da4..552356473b68 100644
--- a/tools/net/ynl/samples/Makefile
+++ b/tools/net/ynl/samples/Makefile
@@ -19,6 +19,7 @@ include $(wildcard *.d)
all: $(BINS)
CFLAGS_page-pool=$(CFLAGS_netdev)
+CFLAGS_tc-filter-add=$(CFLAGS_tc)
$(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS)
@echo -e '\tCC sample $@'
I could be missing something, I have 6.17 headers installed so it
builds for me without any extra flags :(
next prev parent reply other threads:[~2025-11-11 23:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 15:15 [PATCH v2 0/3] ynl: Fix tc filters with actions Zahari Doychev
2025-11-06 15:15 ` [PATCH v2 1/3] ynl: samples: add tc filter example Zahari Doychev
2025-11-11 1:17 ` Jakub Kicinski
2025-11-11 19:09 ` Zahari Doychev
2025-11-11 23:54 ` Jakub Kicinski [this message]
2025-11-06 15:15 ` [PATCH v2 2/3] tools: ynl: call nested attribute free function for indexed arrays Zahari Doychev
2025-11-06 15:15 ` [PATCH v2 3/3] tools: ynl: ignore index 0 for indexed-arrays Zahari Doychev
2025-11-11 1:20 ` Jakub Kicinski
2025-11-11 19:34 ` Zahari Doychev
2025-11-11 23:49 ` Jakub Kicinski
2025-11-11 1:30 ` [PATCH v2 0/3] ynl: Fix tc filters with actions 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=20251111155424.68f085a6@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=ast@fiberby$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=donald.hunter@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=johannes@sipsolutions$(echo .)net \
--cc=matttbe@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
--cc=zahari.doychev@linux$(echo .)com \
--cc=zaharido@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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