From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 11069A04C0;
	Tue, 12 Nov 2019 13:38:01 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 562459E4;
	Tue, 12 Nov 2019 13:38:00 +0100 (CET)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id AEA9C2AB
 for <dev@dpdk.org>; Tue, 12 Nov 2019 13:37:59 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1573562279;
 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=7OVWvEHta231KWhqwdfEDIhQiVBa6vuklWw2NZ98pj0=;
 b=PT65G2PgMUgGfvOB7+1E5maN2XelDryf90u4ZYUH8VhhgszTkIWre4jFFaS1/h7XMcmirz
 qA/8DfJf/OHNLd+/iP6dsKcXASsYPfdaKuqhY2akNcyMQQwPzDaFUwatbBfeHAcfQVHcfl
 2ymXVE0oQGa0oIbLxh5NlNbBajojHm8=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-438-4TOPFaGWP96YbJceWXeqxw-1; Tue, 12 Nov 2019 07:37:58 -0500
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
 [10.5.11.12])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 46A398017E0;
 Tue, 12 Nov 2019 12:37:56 +0000 (UTC)
Received: from dmarchan.remote.csb (unknown [10.40.205.213])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 120396106C;
 Tue, 12 Nov 2019 12:37:52 +0000 (UTC)
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Marko Kovacevic <marko.kovacevic@intel.com>, Ori Kam <orika@mellanox.com>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Radu Nicolau <radu.nicolau@intel.com>, Akhil Goyal <akhil.goyal@nxp.com>,
 Tomasz Kantecki <tomasz.kantecki@intel.com>,
 Sunil Kumar Kori <skori@marvell.com>,
 Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 12 Nov 2019 13:37:33 +0100
Message-Id: <1573562253-10332-1-git-send-email-david.marchand@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-MC-Unique: 4TOPFaGWP96YbJceWXeqxw-1
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [dpdk-dev] [PATCH] examples/l2fwd: fix build warning with system
	wide install
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Caught when compiling this example with pkg-config:

 ## Building l2fwd
 ...
 main.c: In function =E2=80=98main=E2=80=99:
 main.c:716:3: warning: =E2=80=98rte_eth_dev_set_ptypes=E2=80=99 is depreca=
ted: Symbol
 is not yet part of stable ABI [-Wdeprecated-declarations]
   716 |   ret =3D rte_eth_dev_set_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL,
       |   ^~~
 In file included from main.c:38:
 ...build-x86-default/install-root/usr/local/include/rte_ethdev.h:2661:5:
 note: declared here
  2661 | int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t
 ptype_mask,
       |     ^~~~~~~~~~~~~~~~~~~~~~
 ln -sf l2fwd-shared build/l2fwd

Fixes: 9731df2e7554 ("examples/l2fwd: disable packet type parsing")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/l2fwd/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 59b2b4a..9c50684 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -21,6 +21,8 @@ PKGCONF=3Dpkg-config --define-prefix
=20
 PC_FILE :=3D $(shell $(PKGCONF) --path libdpdk)
 CFLAGS +=3D -O3 $(shell $(PKGCONF) --cflags libdpdk)
+# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype AP=
I
+CFLAGS +=3D -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED =3D $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk=
)
=20
--=20
1.8.3.1