On Fri, Oct 25, 2019 at 2:17 AM Magnus Karlsson <magnus.karlsson@xxxxxxxxx> wrote: > > When the need_wakeup flag was added to AF_XDP, the format of the > XDP_MMAP_OFFSETS getsockopt was extended. Code was added to the > kernel to take care of compatibility issues arrising from running > applications using any of the two formats. However, libbpf was > not extended to take care of the case when the application/libbpf > uses the new format but the kernel only supports the old > format. This patch adds support in libbpf for parsing the old > format, before the need_wakeup flag was added, and emulating a > set of static need_wakeup flags that will always work for the > application. > > v2 -> v3: > * Incorporated code improvements suggested by Jonathan Lemon > > v1 -> v2: > * Rebased to bpf-next > * Rewrote the code as the previous version made you blind > > Fixes: a4500432c2587cb2a ("libbpf: add support for need_wakeup flag in AF_XDP part") > Reported-by: Eloy Degen <degeneloy@xxxxxxxxx> > Signed-off-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx> Applied. Thanks