Skip to contentSkip to conversation

examples/l2fwd: fix build warning with system wide install

PATCH In review David Marchand 2 participants 3 messages Nov 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/l2fwd: fix build warning with system wide install

Caught when compiling this example with pkg-config:

## Building l2fwd
...
main.c: In function ‘main’:
main.c:716:3: warning: ‘rte_eth_dev_set_ptypes’ is deprecated: Symbol is not yet part of stable ABI [-Wdeprecated-declarations]

   716 |   ret = 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")
---
 examples/l2fwd/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/l2fwd/Makefile +2 -0
index 59b2b4a..9c50684 100644
@@ -21,6 +21,8 @@ PKGCONF=pkg-config --define-prefix
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · David Marchand

Caught when compiling this example with pkg-config:

## Building l2fwd
...
main.c: In function ‘main’:
main.c:716:3: warning: ‘rte_eth_dev_set_ptypes’ is deprecated: Symbol is not yet part of stable ABI [-Wdeprecated-declarations]

   716 |   ret = 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,
       |     ^~~~~~~~~~~~~~~~~~~~~~
Quoted 5 lines

ln -sf l2fwd-shared build/l2fwd

Fixes 9731df2e7554 ("examples/l2fwd: disable packet type parsing")
#2 lore raw
Quoted 19 lines · Ferruh Yigit
Quoted 17 lines · David Marchand

Caught when compiling this example with pkg-config:

## Building l2fwd
...
main.c: In function ‘main’:
main.c:716:3: warning: ‘rte_eth_dev_set_ptypes’ is deprecated: Symbol is not yet part of stable ABI [-Wdeprecated-declarations]

   716 |   ret = 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

Quoted 5 lines
Quoted 3 lines
Fixes 9731df2e7554 ("examples/l2fwd: disable packet type parsing")

Thanks.
Applied.

--
David Marchand