Skip to contentSkip to conversation

selftests/bpf: Fix bpf selftest build warning

PATCH RESEND In review Saket Kumar Bhaskar 3 participants 3 messages May 12, 2025 – May 13, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 selftests/bpf: Fix bpf selftest build warning

On linux-next, build for bpf selftest displays a warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'.

Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") changed the header guard from _LINUX_IF_XDP_H to _UAPI_LINUX_IF_XDP_H in include/uapi/linux/if_xdp.h.

To resolve the warning, update tools/include/uapi/linux/if_xdp.h to align with the changes in include/uapi/linux/if_xdp.h

Fixes 8066e388be48 ("net: add UAPI to the header guard in various network headers")

---

[RESEND]:
- Added Fixes and Tested-by tag.
- Added Greg as receipent for driver-core tree.

Original patch: https://lore.kernel.org/all/[email protected]/

 tools/include/uapi/linux/if_xdp.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/include/uapi/linux/if_xdp.h +3 -3
index 42869770776e..44f2bb93e7e6 100644
@@ -7,8 +7,8 @@
  *	      Magnus Karlsson <[email protected]>
  */
 
-#ifndef _LINUX_IF_XDP_H
-#define _LINUX_IF_XDP_H
+#ifndef _UAPI_LINUX_IF_XDP_H
+#define _UAPI_LINUX_IF_XDP_H
 
 #include <linux/types.h>
 
@@ -180,4 +180,4 @@ struct xdp_desc {
 /* TX packet carries valid metadata. */
 #define XDP_TX_METADATA (1 << 1)
 
-#endif /* _LINUX_IF_XDP_H */
+#endif /* _UAPI_LINUX_IF_XDP_H */
Signature · 1 line
2.43.5
#1 lore raw
Quoted 17 lines · Saket Kumar Bhaskar

On linux-next, build for bpf selftest displays a warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'.

Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") changed the header guard from _LINUX_IF_XDP_H to _UAPI_LINUX_IF_XDP_H in include/uapi/linux/if_xdp.h.

To resolve the warning, update tools/include/uapi/linux/if_xdp.h to align with the changes in include/uapi/linux/if_xdp.h

Fixes 8066e388be48 ("net: add UAPI to the header guard in various network headers")
Quoted 5 lines

---

[RESEND]:
- Added Fixes and Tested-by tag.
- Added Greg as receipent for driver-core tree.

Why? Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") is not in that tree/branch, so why do I need it?

confused,

greg k-h

#2 lore raw
Quoted 21 lines · Greg KH
Quoted 19 lines · Saket Kumar Bhaskar

On linux-next, build for bpf selftest displays a warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'.

Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") changed the header guard from _LINUX_IF_XDP_H to _UAPI_LINUX_IF_XDP_H in include/uapi/linux/if_xdp.h.

To resolve the warning, update tools/include/uapi/linux/if_xdp.h to align with the changes in include/uapi/linux/if_xdp.h

Fixes 8066e388be48 ("net: add UAPI to the header guard in various network headers")

---

Quoted 6 lines
Quoted 3 lines

[RESEND]:
- Added Fixes and Tested-by tag.
- Added Greg as receipent for driver-core tree.

Why? Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") is not in that tree/branch, so why do I need it?

Certainly not driver-core.

Please resend with [PATCH net-next] and cc netdev.