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 3501F427E7 for ; Wed, 5 Apr 2023 09:39:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08CEE41151; Wed, 5 Apr 2023 09:39:18 +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 F355F40FDF for ; Wed, 5 Apr 2023 09:39:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680680356; 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=Sc/4z+Qn0QeItOhDUQoCNvFu/qb84nyd5SaGbxj4PHs=; b=TiUBOkwVasr7h6d6G1bV+V8DObHJsisvRhBWXFx0KvGRcd14HYUety8AyIdaDGqSaY9GdM BVXCdd1eZVibxs2TwwakY6EoS2Fm6LHV/hT4dPAz4vM36sN+ASXstKy9Uy5HFR18WJ2/Jw oPn3evKMKCgiHxqWCWyfbnYFfXXFlWo= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-SNjAo5uzNZ-hUbdxynjDUA-1; Wed, 05 Apr 2023 03:39:14 -0400 X-MC-Unique: SNjAo5uzNZ-hUbdxynjDUA-1 Received: by mail-pj1-f69.google.com with SMTP id b1-20020a17090a8c8100b002400db03706so9340765pjo.0 for ; Wed, 05 Apr 2023 00:39:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680680353; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sc/4z+Qn0QeItOhDUQoCNvFu/qb84nyd5SaGbxj4PHs=; b=XaenaKvtWn7ts3op/c17W3p8HiPZEmaDNG3OyC5kJAC7JQf3HnqeLSfA9+7QZBhts3 a5accw+0GZmlWwO1qD7lqw4y3B3XnJQj6kbtyFQpL/ADbfHmJ+CUufDjYTCbQtSHAJWw QisloQN09Y8ekVOL/1Dp82TMQem8GdruNL0sj0FuXIb3mCFw6PBMPYXLKPPE0Myldgt1 a9tKs/t6ulNBBd+d60L+qvKJO1yV0cWIr10Za33SdRHgcWrfoqS7HcRYTu04HI3kNFDp vHCLLfy7J0Y8jDtFi/UBdz5oJ4wDH4uEG8XwBAgOLWeAIUIhLYiTTNhf8BFQ2jUahE1N 9fHg== X-Gm-Message-State: AAQBX9cenMecRtjwYyh7vaveRV4uu+7GGwMeXbnFAPzKHdhk1eMIH+Km ind9Zx6gGvVmwnpMKsGLCBRF9a7qTPT9+Bi72/zRsTA0f/FqAltn5ogGu+SGVI6YcsThRvYrdB7 cTJZOcD3RalCeyBjUM6lf8SI= X-Received: by 2002:a05:6a00:2e20:b0:624:3ff:db10 with SMTP id fc32-20020a056a002e2000b0062403ffdb10mr2948212pfb.5.1680680352939; Wed, 05 Apr 2023 00:39:12 -0700 (PDT) X-Google-Smtp-Source: AKy350YOT1abz6XUurXmsLqWKW0FNQ7EnK9z4N21rHqBguWQQmKktM3Kc3r2ASuV73gJqn+NKaiIV7GIei4bdztNV90= X-Received: by 2002:a05:6a00:2e20:b0:624:3ff:db10 with SMTP id fc32-20020a056a002e2000b0062403ffdb10mr2948202pfb.5.1680680352621; Wed, 05 Apr 2023 00:39:12 -0700 (PDT) MIME-Version: 1.0 References: <20230404153501.123038-1-ktraynor@redhat.com> In-Reply-To: <20230404153501.123038-1-ktraynor@redhat.com> From: David Marchand Date: Wed, 5 Apr 2023 09:39:01 +0200 Message-ID: Subject: Re: [PATCH 21.11] net/af_xdp: squash deprecated-declaration warnings To: Kevin Traynor Cc: stable@dpdk.org, Ciara Loftus , Qi Zhang X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Tue, Apr 4, 2023 at 5:35=E2=80=AFPM 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: =E2=80=98bpf_get_link_xdp_id=E2=80=99 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 f= lags); > | ^~~~~~~~~~~~~~~~~~~ > ../drivers/net/af_xdp/rte_eth_af_xdp.c:858:9: > warning: =E2=80=98bpf_set_link_xdp_fd=E2=80=99 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 =E2=80=98load_custom_= xdp_prog=E2=80=99: > ../drivers/net/af_xdp/rte_eth_af_xdp.c:1171:9: > warning: =E2=80=98bpf_set_link_xdp_fd=E2=80=99 is deprecated: > libbpf v0.8+: use bpf_xdp_attach() instead [-Wdeprecated-declarations] > | ret =3D 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. --=20 David Marchand