* [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI
@ 2025-01-13 9:58 Vishal Chourasia
2025-01-14 1:05 ` Song, Yoong Siang
0 siblings, 1 reply; 3+ messages in thread
From: Vishal Chourasia @ 2025-01-13 9:58 UTC (permalink / raw)
To: bpf, daniel, maciej.fijalkowski, sdf, netdev, sdf, kuba,
yoong.siang.song, ast
Hello all,
While building libbpf, I encountered the following warning:
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'
A brief diff shows discrepancies in the doc comments regarding `union
xsk_tx_metadata` vs. `struct xsk_tx_metadata` references. Below is the
relevant snippet:
$ diff tools/include/uapi/linux/if_xdp.h include/uapi/linux/if_xdp.h
120c120
< * field of union xsk_tx_metadata.
---
> * field of struct xsk_tx_metadata.
125c125
< * are communicated via csum_start and csum_offset fields of union
---
> * are communicated via csum_start and csum_offset fields of struct
This patch aligns the documentation in
`tools/include/uapi/linux/if_xdp.h` with the kernel UAPI header in
`include/uapi/linux/if_xdp.h` to remove the mismatch and associated
warning.
Please consider applying this fix. Let me know if there are any
questions or if additional changes are needed.
vishal.c
diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h
index 2f082b01ff228..42ec5ddaab8dc 100644
--- a/tools/include/uapi/linux/if_xdp.h
+++ b/tools/include/uapi/linux/if_xdp.h
@@ -117,12 +117,12 @@ struct xdp_options {
((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1)
/* Request transmit timestamp. Upon completion, put it into tx_timestamp
- * field of union xsk_tx_metadata.
+ * field of struct xsk_tx_metadata.
*/
#define XDP_TXMD_FLAGS_TIMESTAMP (1 << 0)
/* Request transmit checksum offload. Checksum start position and offset
- * are communicated via csum_start and csum_offset fields of union
+ * are communicated via csum_start and csum_offset fields of struct
* xsk_tx_metadata.
*/
#define XDP_TXMD_FLAGS_CHECKSUM (1 << 1)
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI
2025-01-13 9:58 [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI Vishal Chourasia
@ 2025-01-14 1:05 ` Song, Yoong Siang
2025-01-14 10:40 ` Vishal Chourasia
0 siblings, 1 reply; 3+ messages in thread
From: Song, Yoong Siang @ 2025-01-14 1:05 UTC (permalink / raw)
To: Vishal Chourasia, bpf@vger.kernel.org, daniel@iogearbox.net,
Fijalkowski, Maciej, sdf@fomichev.me, netdev@vger.kernel.org,
sdf@google.com, kuba@kernel.org, ast@kernel.org
On Monday, January 13, 2025 5:59 PM, Vishal Chourasia <vishalc@linux.ibm.com> wrote:
>Hello all,
>
>While building libbpf, I encountered the following warning:
>
>Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from
>latest version at 'include/uapi/linux/if_xdp.h'
>
>A brief diff shows discrepancies in the doc comments regarding `union
>xsk_tx_metadata` vs. `struct xsk_tx_metadata` references. Below is the
>relevant snippet:
>$ diff tools/include/uapi/linux/if_xdp.h include/uapi/linux/if_xdp.h
>120c120
>< * field of union xsk_tx_metadata.
>---
>> * field of struct xsk_tx_metadata.
>125c125
>< * are communicated via csum_start and csum_offset fields of union
>---
>> * are communicated via csum_start and csum_offset fields of struct
>
>This patch aligns the documentation in
>`tools/include/uapi/linux/if_xdp.h` with the kernel UAPI header in
>`include/uapi/linux/if_xdp.h` to remove the mismatch and associated
>warning.
>
>Please consider applying this fix. Let me know if there are any
>questions or if additional changes are needed.
>
>vishal.c
Hi Vishal. C,
Thank you for bringing this to our attention. The changes look good to me.
Could you please confirm if you will be submitting this patch formally,
or do you need assistance to submit it?
Thanks & Regards,
Siang
>
>diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h
>index 2f082b01ff228..42ec5ddaab8dc 100644
>--- a/tools/include/uapi/linux/if_xdp.h
>+++ b/tools/include/uapi/linux/if_xdp.h
>@@ -117,12 +117,12 @@ struct xdp_options {
> ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1)
>
> /* Request transmit timestamp. Upon completion, put it into tx_timestamp
>- * field of union xsk_tx_metadata.
>+ * field of struct xsk_tx_metadata.
> */
> #define XDP_TXMD_FLAGS_TIMESTAMP (1 << 0)
>
> /* Request transmit checksum offload. Checksum start position and offset
>- * are communicated via csum_start and csum_offset fields of union
>+ * are communicated via csum_start and csum_offset fields of struct
> * xsk_tx_metadata.
> */
> #define XDP_TXMD_FLAGS_CHECKSUM (1 << 1)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI
2025-01-14 1:05 ` Song, Yoong Siang
@ 2025-01-14 10:40 ` Vishal Chourasia
0 siblings, 0 replies; 3+ messages in thread
From: Vishal Chourasia @ 2025-01-14 10:40 UTC (permalink / raw)
To: Song, Yoong Siang
Cc: bpf@vger.kernel.org, daniel@iogearbox.net, Fijalkowski, Maciej,
sdf@fomichev.me, netdev@vger.kernel.org, kuba@kernel.org,
ast@kernel.org
On Tue, Jan 14, 2025 at 01:05:06AM +0000, Song, Yoong Siang wrote:
> On Monday, January 13, 2025 5:59 PM, Vishal Chourasia <vishalc@linux.ibm.com> wrote:
> >Hello all,
> >
> >While building libbpf, I encountered the following warning:
> >
> >Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from
> >latest version at 'include/uapi/linux/if_xdp.h'
> >
> >A brief diff shows discrepancies in the doc comments regarding `union
> >xsk_tx_metadata` vs. `struct xsk_tx_metadata` references. Below is the
> >relevant snippet:
> >$ diff tools/include/uapi/linux/if_xdp.h include/uapi/linux/if_xdp.h
> >120c120
> >< * field of union xsk_tx_metadata.
> >---
> >> * field of struct xsk_tx_metadata.
> >125c125
> >< * are communicated via csum_start and csum_offset fields of union
> >---
> >> * are communicated via csum_start and csum_offset fields of struct
> >
> >This patch aligns the documentation in
> >`tools/include/uapi/linux/if_xdp.h` with the kernel UAPI header in
> >`include/uapi/linux/if_xdp.h` to remove the mismatch and associated
> >warning.
> >
> >Please consider applying this fix. Let me know if there are any
> >questions or if additional changes are needed.
> >
> >vishal.c
>
> Hi Vishal. C,
>
> Thank you for bringing this to our attention. The changes look good to me.
> Could you please confirm if you will be submitting this patch formally,
> or do you need assistance to submit it?
>
> Thanks & Regards,
> Siang
Hi Siang,
I need assistance as I am not well-versed in the code or the structures
involved here. I was unsure about the appropriate commit message,
so I submitted it as an RFC patch.
vishal.c
>
> >
> >diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h
> >index 2f082b01ff228..42ec5ddaab8dc 100644
> >--- a/tools/include/uapi/linux/if_xdp.h
> >+++ b/tools/include/uapi/linux/if_xdp.h
> >@@ -117,12 +117,12 @@ struct xdp_options {
> > ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1)
> >
> > /* Request transmit timestamp. Upon completion, put it into tx_timestamp
> >- * field of union xsk_tx_metadata.
> >+ * field of struct xsk_tx_metadata.
> > */
> > #define XDP_TXMD_FLAGS_TIMESTAMP (1 << 0)
> >
> > /* Request transmit checksum offload. Checksum start position and offset
> >- * are communicated via csum_start and csum_offset fields of union
> >+ * are communicated via csum_start and csum_offset fields of struct
> > * xsk_tx_metadata.
> > */
> > #define XDP_TXMD_FLAGS_CHECKSUM (1 << 1)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-14 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 9:58 [RFC] Fix mismatch in if_xdp.h between tools and kernel UAPI Vishal Chourasia
2025-01-14 1:05 ` Song, Yoong Siang
2025-01-14 10:40 ` Vishal Chourasia
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).