Re: getsockopt(XDP_MMAP_OFFSETS) syscall ABI breakage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 19, 2019 at 10:47 PM Alex Forster <aforster@xxxxxxxxxxxxxx> wrote:
>
> The getsockopt(XDP_MMAP_OFFSETS) socket option returns a struct
> xdp_mmap_offsets (from uapi/linux/if_xdp.h) which is defined as:
>
>     struct xdp_mmap_offsets {
>         struct xdp_ring_offset rx;
>         struct xdp_ring_offset tx;
>         struct xdp_ring_offset fr; /* Fill */
>         struct xdp_ring_offset cr; /* Completion */
>     };
>
> Prior to kernel 5.4, struct xdp_ring_offset (from the same header) was
> defined as:
>
>     struct xdp_ring_offset {
>         __u64 producer;
>         __u64 consumer;
>         __u64 desc;
>     };
>
> A few months ago, in 77cd0d7, it was changed to the following:
>
>     struct xdp_ring_offset {
>         __u64 producer;
>         __u64 consumer;
>         __u64 desc;
>         __u64 flags;
>     };
>
> I believe this constitutes a syscall ABI breakage, which I did not
> think was allowed. Have I misunderstood the current stability
> guarantees for AF_XDP?

Version 5.4 and above supports both the old definition and the new. If
you enter the size of the old struct xdp_mmap_offsets into the
getsockopt, you get the results in the form that was there before 5.4.
If you enter the size of the new struct, you get the results in the
new form introduced in commit 77cd0d7.

> Alex Forster



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux