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 5E773428D2 for ; Wed, 5 Apr 2023 12:45:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 539CC42B8C; Wed, 5 Apr 2023 12:45:03 +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 4E02E41133 for ; Wed, 5 Apr 2023 12:45:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680691500; 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: in-reply-to:in-reply-to:references:references; bh=4FH6L/128sjTbXjiKyFrJp2bVh6LLIrFghhYNFMUk58=; b=dEje182p1TbHlipevBju6tkPVu5JWdkv6a9Pf2MVhEVC7ZCFHXfjsOZP8wQzA1wjct7Wg3 FwcPm5rzdR5kJqSApcI/Dja+5ynwTYAzGfpe+bZ21A3nlZSzH42GFqhz3obc00PVmiwu3K CVzR079sJIoWvGhBHwB2y1a4ZW0GnJQ= 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-316-M0TG_rKFMwGani4XTA_rdg-1; Wed, 05 Apr 2023 06:44:57 -0400 X-MC-Unique: M0TG_rKFMwGani4XTA_rdg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2DA4C101A531; Wed, 5 Apr 2023 10:44:57 +0000 (UTC) Received: from rh.Home (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB87F2027061; Wed, 5 Apr 2023 10:44:55 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: david.marchand@redhat.com, Kevin Traynor , Ciara Loftus , Qi Zhang Subject: [PATCH 21.11 v2] net/af_xdp: squash deprecated-declaration warnings Date: Wed, 5 Apr 2023 11:44:48 +0100 Message-Id: <20230405104448.156003-1-ktraynor@redhat.com> In-Reply-To: <20230404153501.123038-1-ktraynor@redhat.com> References: <20230404153501.123038-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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 | 10 ++++++++++ 1 file changed, 10 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..68bae5610e 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -846,4 +846,7 @@ eth_stats_reset(struct rte_eth_dev *dev) } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + static void remove_xdp_program(struct pmd_internals *internals) @@ -860,4 +863,6 @@ remove_xdp_program(struct pmd_internals *internals) } +#pragma GCC diagnostic pop + static void xdp_umem_destroy(struct xsk_umem_info *umem) @@ -1146,4 +1151,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals, } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + static int load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map) @@ -1183,4 +1191,6 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map) } +#pragma GCC diagnostic pop + /* Detect support for busy polling through setsockopt(). */ static int -- 2.39.2