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 275C3428CE for ; Tue, 4 Apr 2023 17:35:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 006B740EF0; Tue, 4 Apr 2023 17:35:40 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A526440A7E for ; Tue, 4 Apr 2023 17:35:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680622536; 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=fGZx2tNh+RGukR0jsNqnVBuK5x8OlXW8jO+4NN3HZro=; b=RZ1Jz/Qh19+0kvI2hhd0zb8XMEZP6t1WDXO1Kyv6bNHM9+61t9hF7w5kUXsIACK5p+ygzP 6D8HyfdAv4BdEWHNgq0+c+Ai/YfukDKMg0e80jRk0wDnCh+GinpiwZYwwjinKkAk3011kQ 3w53zBjpr1RtjISHG+Ew9sViCKrC6OA= 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-654-e_4ylQ2yM_OxGDXiC2SyHg-1; Tue, 04 Apr 2023 11:35:18 -0400 X-MC-Unique: e_4ylQ2yM_OxGDXiC2SyHg-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 E6BD1101A552; Tue, 4 Apr 2023 15:35:07 +0000 (UTC) Received: from rh.Home (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28A8C1121314; Tue, 4 Apr 2023 15:35:07 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: Kevin Traynor , Ciara Loftus , Qi Zhang Subject: [PATCH 21.11] net/af_xdp: squash deprecated-declaration warnings Date: Tue, 4 Apr 2023 16:35:01 +0100 Message-Id: <20230404153501.123038-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 Fedora 37 with versions libbpf-0.8.0-2.fc37.x86_64 and libxdp-1.2.6-1.fc37.x86_64 gives the following warnings [0]. Squash these for a clean build on Fedora 37 and any other distros or systems using newer libbpf and libxdp versions. Discussed on mail list at: http://inbox.dpdk.org/dev/d718d0fe-09a2-8840-e8a4-dd41b732b391@redhat.com/ [0] ../drivers/net/af_xdp/rte_eth_af_xdp.c:853:9: warning: ‘bpf_get_link_xdp_id’ is deprecated: libbpf v0.8+: use bpf_xdp_query_id() instead [-Wdeprecated-declarations] | if (bpf_get_link_xdp_id(internals->if_index, &curr_prog_id, | ^~ In file included from /usr/include/xdp/xsk.h:17, from ../drivers/net/af_xdp/compat.h:6, from ../drivers/net/af_xdp/rte_eth_af_xdp.c:41: /usr/include/bpf/libbpf.h:1169:16: note: declared here | LIBBPF_API int bpf_get_link_xdp_id(int ifindex, __u32 *prog_id, __u32 flags); | ^~~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c:858:9: warning: ‘bpf_set_link_xdp_fd’ is deprecated: libbpf v0.8+: use bpf_xdp_attach() instead [-Wdeprecated-declarations] | bpf_set_link_xdp_fd(internals->if_index, -1, | ^~~~~~~~~~~~~~~~~~~ /usr/include/bpf/libbpf.h:1164:16: note: declared here | LIBBPF_API int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags); | ^~~~~~~~~~~~~~~~~~~ ../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘load_custom_xdp_prog’: ../drivers/net/af_xdp/rte_eth_af_xdp.c:1171:9: warning: ‘bpf_set_link_xdp_fd’ is deprecated: libbpf v0.8+: use bpf_xdp_attach() instead [-Wdeprecated-declarations] | ret = bpf_set_link_xdp_fd(if_index, prog_fd, | ^~~ /usr/include/bpf/libbpf.h:1164:16: note: declared here | LIBBPF_API int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags); | ^~~~~~~~~~~~~~~~~~~ Cc: Ciara Loftus Cc: Qi Zhang Signed-off-by: Kevin Traynor --- drivers/net/af_xdp/rte_eth_af_xdp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 9db76d4562..b04aa30325 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -846,4 +846,10 @@ eth_stats_reset(struct rte_eth_dev *dev) } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + static void remove_xdp_program(struct pmd_internals *internals) @@ -860,4 +866,7 @@ remove_xdp_program(struct pmd_internals *internals) } +#pragma clang diagnostic pop +#pragma GCC diagnostic pop + static void xdp_umem_destroy(struct xsk_umem_info *umem) @@ -1146,4 +1155,10 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals, } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + static int load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map) @@ -1183,4 +1198,7 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map) } +#pragma clang diagnostic pop +#pragma GCC diagnostic pop + /* Detect support for busy polling through setsockopt(). */ static int -- 2.39.2