* building ynl afaics requires updating the UAPI headers first
@ 2026-06-18 13:39 Thorsten Leemhuis
2026-06-19 0:06 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Leemhuis @ 2026-06-18 13:39 UTC (permalink / raw)
To: Jakub Kicinski, Donald Hunter; +Cc: netdev, Riana Tauro
Hi Jakub, Donald! During the past few weeks I two or three times ran
into errors when building ynl as part of my daily -mainline/-next builds
based on a srpm pretty close to the kernel srpm used in Fedora rawhide.
Today I for example ran into this:
"""
> [...]
> GEN_RST team.rst
> GEN_RST wireguard.rst
> CC binder-user.o
> CC dev-energymodel-user.o
> CC devlink-user.o
> CC dpll-user.o
> CC drm_ras-user.o
> drm_ras-user.c:19:10: error: ‘DRM_RAS_CMD_CLEAR_ERROR_COUNTER’ undeclared here (not in a function); did you mean ‘DRM_RAS_CMD_GET_ER
> ROR_COUNTER’?
> 19 | [DRM_RAS_CMD_CLEAR_ERROR_COUNTER] = "clear-error-counter",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | DRM_RAS_CMD_GET_ERROR_COUNTER
> drm_ras-user.c:19:10: error: array index in initializer not of integer type
> drm_ras-user.c:19:10: note: (near initialization for ‘drm_ras_op_strmap’)
> make[1]: *** [Makefile:52: drm_ras-user.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated'
> make: *** [Makefile:28: generated] Error 2
> make: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl
"""
DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
drm_ras") [v7.1-post].
I finally looked closer today and noticed how to prevent this: update
the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
the builder. Thing is: that's basically impossible to do from a srpm, as
those should not change the build environment and can't even when
working as non-root.
Note sure if relevant and just a shot in the dark, so maybe ignore the
following:
While investigating this I noticed this comment in
tools/net/ynl/Makefile.deps:
"""
> # Try to include uAPI headers from the kernel uapi/ path.
> # Most code under tools/ requires the respective kernel uAPI headers
> # to be copied to tools/include. The duplication is annoying.
> # All the family headers should be self-contained. We avoid the copying
> # by selectively including just the uAPI header of the family directly
> # from the kernel sources.
"""
Is that maybe not the case anymore with the recent changes to ynl?
Ciao, Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building ynl afaics requires updating the UAPI headers first
2026-06-18 13:39 building ynl afaics requires updating the UAPI headers first Thorsten Leemhuis
@ 2026-06-19 0:06 ` Jakub Kicinski
2026-06-19 7:28 ` Thorsten Leemhuis
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2026-06-19 0:06 UTC (permalink / raw)
To: Thorsten Leemhuis; +Cc: Donald Hunter, netdev, Riana Tauro
On Thu, 18 Jun 2026 15:39:46 +0200 Thorsten Leemhuis wrote:
> DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
> ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
> drm_ras") [v7.1-post].
>
> I finally looked closer today and noticed how to prevent this: update
> the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
> the builder. Thing is: that's basically impossible to do from a srpm, as
> those should not change the build environment and can't even when
> working as non-root.
>
> Note sure if relevant and just a shot in the dark, so maybe ignore the
> following:
>
> While investigating this I noticed this comment in
> tools/net/ynl/Makefile.deps:
>
> """
> > # Try to include uAPI headers from the kernel uapi/ path.
> > # Most code under tools/ requires the respective kernel uAPI headers
> > # to be copied to tools/include. The duplication is annoying.
> > # All the family headers should be self-contained. We avoid the copying
> > # by selectively including just the uAPI header of the family directly
> > # from the kernel sources.
> """
>
> Is that maybe not the case anymore with the recent changes to ynl?
Can't repro for some reason, but we probably need something like
commit 46e9b0224475abc to add the explicit include rule.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building ynl afaics requires updating the UAPI headers first
2026-06-19 0:06 ` Jakub Kicinski
@ 2026-06-19 7:28 ` Thorsten Leemhuis
2026-06-22 16:05 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Leemhuis @ 2026-06-19 7:28 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: Donald Hunter, netdev, Riana Tauro
On 6/19/26 02:06, Jakub Kicinski wrote:
> On Thu, 18 Jun 2026 15:39:46 +0200 Thorsten Leemhuis wrote:
>> DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
>> ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
>> drm_ras") [v7.1-post].
>>
>> I finally looked closer today and noticed how to prevent this: update
>> the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
>> the builder. Thing is: that's basically impossible to do from a srpm, as
>> those should not change the build environment and can't even when
>> working as non-root.
>> [...]
>
> Can't repro for some reason, but we probably need something like
> commit 46e9b0224475abc to add the explicit include rule.
Thx for the pointer. So I guess you mean something like the below,
which did the trick for me. Will submit this as properly, unless
someone points out something stupid in it.
Ciao, Thorsten
diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
index cc53b2f21c444..43d06ecbae93d 100644
--- a/tools/net/ynl/Makefile.deps
+++ b/tools/net/ynl/Makefile.deps
@@ -14,10 +14,12 @@ UAPI_PATH:=../../../../include/uapi/
get_hdr_inc=-D$(1) -include $(UAPI_PATH)/linux/$(2)
get_hdr_inc2=-D$(1) -D$(2) -include $(UAPI_PATH)/linux/$(3)
+get_hdr_inc_drm=-D$(1) -include $(UAPI_PATH)/drm/$(2)
CFLAGS_dev-energymodel:=$(call get_hdr_inc,_LINUX_DEV_ENERGYMODEL_H,dev_energymodel.h)
CFLAGS_devlink:=$(call get_hdr_inc,_LINUX_DEVLINK_H_,devlink.h)
CFLAGS_dpll:=$(call get_hdr_inc,_LINUX_DPLL_H,dpll.h)
+CFLAGS_drm_ras:=$(call get_hdr_inc_drm,_LINUX_DRM_RAS_H,drm_ras.h)
CFLAGS_ethtool:=$(call get_hdr_inc,_LINUX_TYPELIMITS_H,typelimits.h) \
$(call get_hdr_inc,_LINUX_ETHTOOL_H,ethtool.h) \
$(call get_hdr_inc,_LINUX_ETHTOOL_NETLINK_H_,ethtool_netlink.h) \
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: building ynl afaics requires updating the UAPI headers first
2026-06-19 7:28 ` Thorsten Leemhuis
@ 2026-06-22 16:05 ` Jakub Kicinski
2026-06-22 16:33 ` Thorsten Leemhuis
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2026-06-22 16:05 UTC (permalink / raw)
To: Thorsten Leemhuis; +Cc: Donald Hunter, netdev, Riana Tauro
On Fri, 19 Jun 2026 09:28:47 +0200 Thorsten Leemhuis wrote:
> On 6/19/26 02:06, Jakub Kicinski wrote:
> > On Thu, 18 Jun 2026 15:39:46 +0200 Thorsten Leemhuis wrote:
> >> DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
> >> ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
> >> drm_ras") [v7.1-post].
> >>
> >> I finally looked closer today and noticed how to prevent this: update
> >> the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
> >> the builder. Thing is: that's basically impossible to do from a srpm, as
> >> those should not change the build environment and can't even when
> >> working as non-root.
> >> [...]
> >
> > Can't repro for some reason, but we probably need something like
> > commit 46e9b0224475abc to add the explicit include rule.
>
> Thx for the pointer. So I guess you mean something like the below,
> which did the trick for me. Will submit this as properly, unless
> someone points out something stupid in it.
>
> Ciao, Thorsten
>
> diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
> index cc53b2f21c444..43d06ecbae93d 100644
> --- a/tools/net/ynl/Makefile.deps
> +++ b/tools/net/ynl/Makefile.deps
> @@ -14,10 +14,12 @@ UAPI_PATH:=../../../../include/uapi/
>
> get_hdr_inc=-D$(1) -include $(UAPI_PATH)/linux/$(2)
> get_hdr_inc2=-D$(1) -D$(2) -include $(UAPI_PATH)/linux/$(3)
> +get_hdr_inc_drm=-D$(1) -include $(UAPI_PATH)/drm/$(2)
>
> CFLAGS_dev-energymodel:=$(call get_hdr_inc,_LINUX_DEV_ENERGYMODEL_H,dev_energymodel.h)
> CFLAGS_devlink:=$(call get_hdr_inc,_LINUX_DEVLINK_H_,devlink.h)
> CFLAGS_dpll:=$(call get_hdr_inc,_LINUX_DPLL_H,dpll.h)
> +CFLAGS_drm_ras:=$(call get_hdr_inc_drm,_LINUX_DRM_RAS_H,drm_ras.h)
> CFLAGS_ethtool:=$(call get_hdr_inc,_LINUX_TYPELIMITS_H,typelimits.h) \
> $(call get_hdr_inc,_LINUX_ETHTOOL_H,ethtool.h) \
> $(call get_hdr_inc,_LINUX_ETHTOOL_NETLINK_H_,ethtool_netlink.h) \
Looks good, did you send it? Please send it to networking if possible.
I don't have much experience with DRM trees but I don't want this patch
to get stuck somewhere and keep causing issues.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building ynl afaics requires updating the UAPI headers first
2026-06-22 16:05 ` Jakub Kicinski
@ 2026-06-22 16:33 ` Thorsten Leemhuis
2026-06-22 21:56 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Leemhuis @ 2026-06-22 16:33 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: Donald Hunter, netdev, Riana Tauro
On 6/22/26 18:05, Jakub Kicinski wrote:
> On Fri, 19 Jun 2026 09:28:47 +0200 Thorsten Leemhuis wrote:
>> On 6/19/26 02:06, Jakub Kicinski wrote:
>>> On Thu, 18 Jun 2026 15:39:46 +0200 Thorsten Leemhuis wrote:
>>>> DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
>>>> ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
>>>> drm_ras") [v7.1-post].
>>>>
>>>> I finally looked closer today and noticed how to prevent this: update
>>>> the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
>>>> the builder. Thing is: that's basically impossible to do from a srpm, as
>>>> those should not change the build environment and can't even when
>>>> working as non-root.
>>>> [...]
>>>
>>> Can't repro for some reason, but we probably need something like
>>> commit 46e9b0224475abc to add the explicit include rule.
>>
>> Thx for the pointer. So I guess you mean something like the below,
>> which did the trick for me. Will submit this as properly, unless
>> someone points out something stupid in it.
>
> [...]
>
> Looks good, did you send it?
No, because the funny thing is: now I fail to reproduce it myself. And I
don't know why, as 24h earlier when you had written "Can't repro for
some reason" I had once more checked that I could trigger this by
downgrading Fedora's kernel-headers package to a version from some weeks
ago. Not sure what changed since then.
Want me to sent it nevertheless?
Ciao, Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building ynl afaics requires updating the UAPI headers first
2026-06-22 16:33 ` Thorsten Leemhuis
@ 2026-06-22 21:56 ` Jakub Kicinski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2026-06-22 21:56 UTC (permalink / raw)
To: Thorsten Leemhuis; +Cc: Donald Hunter, netdev, Riana Tauro
On Mon, 22 Jun 2026 18:33:29 +0200 Thorsten Leemhuis wrote:
> On 6/22/26 18:05, Jakub Kicinski wrote:
> > On Fri, 19 Jun 2026 09:28:47 +0200 Thorsten Leemhuis wrote:
> >> On 6/19/26 02:06, Jakub Kicinski wrote:
> >>> Can't repro for some reason, but we probably need something like
> >>> commit 46e9b0224475abc to add the explicit include rule.
> >>
> >> Thx for the pointer. So I guess you mean something like the below,
> >> which did the trick for me. Will submit this as properly, unless
> >> someone points out something stupid in it.
> [...]
>
> No, because the funny thing is: now I fail to reproduce it myself. And I
> don't know why, as 24h earlier when you had written "Can't repro for
> some reason" I had once more checked that I could trigger this by
> downgrading Fedora's kernel-headers package to a version from some weeks
> ago. Not sure what changed since then.
>
> Want me to sent it nevertheless?
Yes, let's get it in place, it can't hurt AFAIU.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-22 21:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 13:39 building ynl afaics requires updating the UAPI headers first Thorsten Leemhuis
2026-06-19 0:06 ` Jakub Kicinski
2026-06-19 7:28 ` Thorsten Leemhuis
2026-06-22 16:05 ` Jakub Kicinski
2026-06-22 16:33 ` Thorsten Leemhuis
2026-06-22 21:56 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox