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 90E05428D2 for ; Wed, 5 Apr 2023 12:41:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AD8441153; Wed, 5 Apr 2023 12:41:36 +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 EAC3541133 for ; Wed, 5 Apr 2023 12:41:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680691294; 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=GX4x0DAXU4hXkKzLbr5F7EwJ9B/Ihmn4hnZYYYXjgXU=; b=RJsi6CXd33RX/xxRZL7kRMjQxcbiABdUzWO7HFHhTSbUYdSH6/cgiiGrRVafkD5/wQVwPc EEgIJwLWupnYWqc/xIFUc4RUMBDIbang3+Y+0cF8eAcy6VDyF6+xaPbdrPRXYHeCS1OSUl R6U57EQj1iTeFNVp7+owhqdv+qyWvPM= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-xWjiYSo0MTewHNec58a_fQ-1; Wed, 05 Apr 2023 06:41:33 -0400 X-MC-Unique: xWjiYSo0MTewHNec58a_fQ-1 Received: by mail-wm1-f70.google.com with SMTP id d11-20020a05600c34cb00b003ee89ce8cc3so16966349wmq.7 for ; Wed, 05 Apr 2023 03:41:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680691292; h=content-transfer-encoding:in-reply-to:subject:references:cc:to:from :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GX4x0DAXU4hXkKzLbr5F7EwJ9B/Ihmn4hnZYYYXjgXU=; b=B014W1KKK3AQMGyF388dt//6H8oiGEHmfFmmJiXGv76wtDk2opDmtvrgkY8pRaJIYT GhXBiqEMMXHRopTD6YKRnYGtPKwwd3zjnq35ufLWJCwlamtWXFUwafKah0C3JFHj6dQD gfDcPY/M8NgCrujQL1cLoU4ChSEjN6d2DHaLgOnd+1W2r1r4e2P0sS5/aH7oCrs1N7Nq e0eHzPTSH3y0h7Mc0PieX2aKabaaC+eJY880GnjlnT0E0UHGu95zsbhAlMd71twDXBQS tGVyZHo/XaHRFf1p1yJHweWgG5cc4uX7Q45EOZcySvsYnbmj4DRuEHSmmTxgR3UTDeiY dgbw== X-Gm-Message-State: AAQBX9e1t8pDVaMmTXq8ukABZxkLtGm9Bn+NbQqeJ84D9lfvkAVadkq8 yQ4q4quClYujBPPxBYR7mJboqpTVy2vRMbVWyPFMmJQBV/X6eHV5kxMIFCgWZeRfIhQblvB7Wy3 a5ffIGTw= X-Received: by 2002:a1c:7219:0:b0:3ef:6819:b2ad with SMTP id n25-20020a1c7219000000b003ef6819b2admr4180689wmc.37.1680691292186; Wed, 05 Apr 2023 03:41:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZKEwMj0R+a7vVU1mtdYH/JkhqXKiSNwmoYUbDi1QxzjDtHzguck+itFaLcOAZKRJUakJ/Snw== X-Received: by 2002:a1c:7219:0:b0:3ef:6819:b2ad with SMTP id n25-20020a1c7219000000b003ef6819b2admr4180677wmc.37.1680691291928; Wed, 05 Apr 2023 03:41:31 -0700 (PDT) Received: from [192.168.0.36] ([78.19.103.115]) by smtp.gmail.com with ESMTPSA id y9-20020a1c4b09000000b003edf2dc7ca3sm1764650wma.34.2023.04.05.03.41.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 03:41:31 -0700 (PDT) Message-ID: <1b90e805-6b40-55c6-2ee4-380a306f81a6@redhat.com> Date: Wed, 5 Apr 2023 11:41:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 From: Kevin Traynor To: David Marchand Cc: stable@dpdk.org, Ciara Loftus , Qi Zhang References: <20230404153501.123038-1-ktraynor@redhat.com> 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 09:45, Kevin Traynor wrote: > 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, I confirmed it. The warnings I had seen with clang were for the ABI reference build and not the current build. I re-tested with just the gcc deprecated-declarations pragma and it is building without warnings on gcc and clang. I will send a v2. Thanks David. > Yes, unknown-pragmas could be removed if the clang pragma is unneeded.