Project

General

Profile

Actions

Bug #5832

closed

source-xdp: build errors/warnings with libbpf 0.8+

Added by Jason Ish almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Can be seen on Fedora 37 when libbpf-devel is installed:

source-af-xdp.c: In function ‘AFXDPSocketCreation’:
source-af-xdp.c:490:5: error: ‘bpf_get_link_xdp_id’ is deprecated: libbpf v0.8+: use bpf_xdp_query_id() instead [-Werror=deprecated-declarations]
  490 |     if (bpf_get_link_xdp_id(ptv->ifindex, &ptv->prog_id, ptv->xsk.cfg.xdp_flags)) {
      |     ^~
In file included from /usr/include/xdp/xsk.h:17,
                 from source-af-xdp.c:64:
/usr/include/bpf/libbpf.h:1169:16: note: declared here
 1169 | LIBBPF_API int bpf_get_link_xdp_id(int ifindex, __u32 *prog_id, __u32 flags);
      |                ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF