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 29855428AF for ; Wed, 5 Apr 2023 10:45:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2407F42B71; Wed, 5 Apr 2023 10:45:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2A68B427F2 for ; Wed, 5 Apr 2023 10:45:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680684335; 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=sRrqezPPU/A7JM9DMnf6UfKOqXVar6NTevUg0+leqjo=; b=T1ALudUnxZwqq58Yib5Kf7YRcVtZ388Hc5io7IAHIjhaF3Y4js8BM0Xo8nXQtrD45KDoAQ czH8gWPswprwUPFHsdLoXt5thenbTh3KOGqLYOOcruDuQDUDULJp8UbM4RhuZbeqAwBE1/ 4gvhNnkQZex+8VduBLwIgjbbwSRFvYA= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-4qIoa6NgPYmjZr-pICQl3w-1; Wed, 05 Apr 2023 04:45:34 -0400 X-MC-Unique: 4qIoa6NgPYmjZr-pICQl3w-1 Received: by mail-wr1-f69.google.com with SMTP id s28-20020adfa29c000000b002d92bb99383so4326318wra.23 for ; Wed, 05 Apr 2023 01:45:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680684333; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sRrqezPPU/A7JM9DMnf6UfKOqXVar6NTevUg0+leqjo=; b=wwj1AJL8CpdUYW7rpz4jbznWVeSF658ANJakc7U/D1d+Ca72tEEhvvWTPhR5mSwxro XBPsmVKlUsxe0BKUhYr9WKBjLvp3Ph5SVt9HglE8cOcf+zd0S4Zp/mTq6O4i0hPwQVW+ Jw9gk9oYyMxJdOmcy8LhccN7ujrktpzv5ygfP+G1lmcdXArXnOELhickA4+sJ3pKM7G+ Lj0ELHEFyd1X484lEW4K856mLskBqfuVziAWIKrcppZYjtY1NuQnAL/+kNpyjQ4p1IbK 3JFVEc7O0NFcRSexk6iHOb19YPkcDGawjoW8nHAJBntAgd7oPl9QOXRoWIMSBsH7Wufj Rjsg== X-Gm-Message-State: AAQBX9fngczc+rEQHPOm5uhtUOZHEamHV1jsEP3XwBUcKR/6MczmLMZh U+qlYEy/F7O2NyLyRoAP158Pij6gX2aBTauf5uapubwD7nu6UQyyH8YuBEf5Z5+2A6+t7WS/QFk o+Ygu0Mk= X-Received: by 2002:a1c:7917:0:b0:3f0:5815:8a58 with SMTP id l23-20020a1c7917000000b003f058158a58mr4252601wme.15.1680684333650; Wed, 05 Apr 2023 01:45:33 -0700 (PDT) X-Google-Smtp-Source: AKy350YfIZoeEAugHpe6jc/i/vQZTHX7RT9XD0lHPxi44csbSEjabWq+mHPKIM2nInmqUUC2lCrIvA== X-Received: by 2002:a1c:7917:0:b0:3f0:5815:8a58 with SMTP id l23-20020a1c7917000000b003f058158a58mr4252591wme.15.1680684333377; Wed, 05 Apr 2023 01:45:33 -0700 (PDT) Received: from [192.168.0.36] ([78.19.103.115]) by smtp.gmail.com with ESMTPSA id fj12-20020a05600c0c8c00b003ef67848a21sm1470710wmb.13.2023.04.05.01.45.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 01:45:33 -0700 (PDT) Message-ID: Date: Wed, 5 Apr 2023 09:45:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: David Marchand Cc: stable@dpdk.org, Ciara Loftus , Qi Zhang References: <20230404153501.123038-1-ktraynor@redhat.com> From: Kevin Traynor Subject: Re: [PATCH 21.11] net/af_xdp: squash deprecated-declaration warnings In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 On 05/04/2023 08:39, David Marchand wrote: > On Tue, Apr 4, 2023 at 5:35 PM Kevin Traynor wrote: >> >> 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" > > clang recognises GCC pragmas, so this clang pragma is unneeded. > https://clang.llvm.org/docs/UsersManual.html#id34 > > And I suspect disabling unknown-pragmas is unneeded once clang pragmas > are removed. > > hmm, ok thanks, I will re-check. I saw the warning after applying the GCC one, but it was with test-meson-builds, so perhaps I confused with the ABI reference build. Yes, unknown-pragmas could be removed if the clang pragma is unneeded.