From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 421F1A0503 for ; Fri, 6 May 2022 13:03:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D9704014F; Fri, 6 May 2022 13:03:50 +0200 (CEST) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by mails.dpdk.org (Postfix) with ESMTP id 835A84014F for ; Fri, 6 May 2022 13:03:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651835027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2oGFAL+fQcpxEJveDZkW16b//oadwWqEmUbVMuC8GKM=; b=JkkoQk5Cj6ZiNvWNLnjLiuCyQPnKpanRh1Ifi89g6ZhcT3VhmIZjeGsXI2SqHp1K+RUanJ Cbxeg/bMPYG0XmcBrcZbbihXrLf2xAdvE4vnfD0Hf9/l6cZWhhOTWGKTiRMkb8HfgSD326 RYVWbBh7hCLVP/I4u9oYT8Rr3DxUqw0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-133-XrwFobS9MwCjl3nJOxKbHg-1; Fri, 06 May 2022 07:03:45 -0400 X-MC-Unique: XrwFobS9MwCjl3nJOxKbHg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DB361014A61; Fri, 6 May 2022 11:03:44 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BAC41121315; Fri, 6 May 2022 11:03:39 +0000 (UTC) From: Kevin Traynor To: ciara.loftus@intel.com, stable@dpdk.org Cc: bluca@debian.org, christian.ehrhardt@canonical.com, xuemingl@nvidia.com, Kevin Traynor Subject: [PATCH 21.11 0/2] Fix UNH CI af_xdp build errors. Date: Fri, 6 May 2022 12:03:35 +0100 Message-Id: <20220506110337.267796-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org UNH CI is reporting [0] build errors [1] for 21.11 branch on Arch Linux. The cause is that libbpf 0.7.0 has been installed and now that af_xdp is being compiled with that version there are some deprecated calls being used. This can be fixed by taking some patches from DPDK main branch to use libxdp. It will be nice if we can keep it working for users who upgrade library versions, but the most important is to not cause regressions for users who do not. Ciara, please let me know if you see any any issues with these patches for 21.11 branch? Reproduced compile failures on F35 with updated library versions without the patches and passing when patches applied. Compile tested on F35 with new versions: Run-time dependency libxdp found: YES 1.2.2 Run-time dependency libbpf found: YES 0.7.0 Also compile tested for regressions on F35 with packaged versions: Dependency libxdp found: NO found 1.1.0 but need: '>=1.2.2' Run-time dependency libxdp found: NO (tried pkgconfig) Run-time dependency libbpf found: YES 0.4.0 thanks, Kevin. [0] https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/19678/ [1] In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:43: ../drivers/net/af_xdp/compat.h: In function ‘create_shared_socket’: ../drivers/net/af_xdp/compat.h:25:9: error: ‘xsk_socket__create_shared’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 25 | return xsk_socket__create_shared(xsk_ptr, ifname, queue_id, umem, rx, | ^~~~~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:317:5: note: declared here 317 | int xsk_socket__create_shared(struct xsk_socket **xsk_ptr, | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘af_xdp_rx_zc’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:285:25: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 285 | (void)recvfrom(xsk_socket__fd(rxq->xsk), NULL, 0, | ^ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘kick_tx’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:470:17: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 470 | while (send(xsk_socket__fd(txq->pair->xsk), NULL, | ^~~~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘eth_stats_get’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:819:17: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 819 | ret = getsockopt(xsk_socket__fd(rxq->xsk), SOL_XDP, | ^~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘eth_dev_close’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:897:17: error: ‘xsk_socket__delete’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 897 | xsk_socket__delete(rxq->xsk); | ^~~~~~~~~~~~~~~~~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:330:6: note: declared here 330 | void xsk_socket__delete(struct xsk_socket *xsk); | ^~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c:901:25: error: ‘xsk_umem__delete’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 901 | (void)xsk_umem__delete(rxq->umem->umem); | ^ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:328:5: note: declared here 328 | int xsk_umem__delete(struct xsk_umem *umem); | ^~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘xdp_umem_configure’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1064:17: error: ‘xsk_umem__create’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1064 | ret = xsk_umem__create(&umem->umem, base_addr, umem_size, | ^~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:292:5: note: declared here 292 | int xsk_umem__create(struct xsk_umem **umem, | ^~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘load_custom_xdp_prog’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1156:9: error: ‘bpf_prog_load_deprecated’ is deprecated: libbpf v0.7+: use bpf_object__open() and bpf_object__load() instead [-Werror=deprecated-declarations] 1156 | ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, &obj, &prog_fd); | ^~~ In file included from /usr/include/bpf/xsk.h:20, from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/libbpf.h:850:16: note: declared here 850 | LIBBPF_API int bpf_prog_load_deprecated(const char *file, enum bpf_prog_type type, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘configure_preferred_busy_poll’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1192:9: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1192 | int fd = xsk_socket__fd(rxq->xsk); | ^~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘xsk_configure’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1291:17: error: ‘xsk_socket__create’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1291 | ret = xsk_socket__create(&rxq->xsk, internals->if_name, | ^~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:310:5: note: declared here 310 | int xsk_socket__create(struct xsk_socket **xsk, | ^~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c:1304:17: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1304 | fd = xsk_socket__fd(rxq->xsk); | ^~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c:1338:9: error: ‘xsk_socket__delete’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1338 | xsk_socket__delete(rxq->xsk); | ^~~~~~~~~~~~~~~~~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:330:6: note: declared here 330 | void xsk_socket__delete(struct xsk_socket *xsk); | ^~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘eth_rx_queue_setup’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1390:9: error: ‘xsk_socket__fd’ is deprecated: libbpf v0.7+: AF_XDP support deprecated and moved to libxdp [-Werror=deprecated-declarations] 1390 | rxq->fds[0].fd = xsk_socket__fd(rxq->xsk); | ^~~ In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:19: /usr/include/bpf/xsk.h:257:5: note: declared here 257 | int xsk_socket__fd(const struct xsk_socket *xsk); | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors Ciara Loftus (2): net/af_xdp: use libxdp if available net/af_xdp: make compatible with libbpf >= 0.7.0 doc/guides/nics/af_xdp.rst | 6 ++-- drivers/net/af_xdp/compat.h | 45 ++++++++++++++++++++++++++++- drivers/net/af_xdp/meson.build | 44 +++++++++++++++++++++++----- drivers/net/af_xdp/rte_eth_af_xdp.c | 10 +++---- 4 files changed, 87 insertions(+), 18 deletions(-) -- 2.34.1