Skip to content

Compiling errors after updating dpdk to version higher then v21.11-rc1 #1159

Open
@Emanuesson

Description

@Emanuesson

Due to changes in the shipped headers by DPDK, especially within the following
commit, libpcap became incompatible to compile against dpdk:
DPDK/dpdk@295968d

How to reproduce:

mkdir build && cd build
cmake .. && make

Reproduced with the following versions:

$ git describe --tags --always
 libpcap-1.10-bp-695-g8cb3bac2
$ uname -a
 Linux pc1 6.1.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 24 Jan 2023 21:07:04 +0000 x86_64 GNU/Linux
$ gcc -v
 gcc version 12.2.1 20230111 (GCC) 
$ cmake --version
 cmake version 3.25.2
$ pkg-config --modversion libdpdk
 22.11.1

The following compiler-errors are visible during the build:

/libpcap/pcap-dpdk.c:202:18: error: ‘struct rte_eth_rxmode’ has no member named ‘split_hdr_size’
  202 |                 .split_hdr_size = 0,
      |                  ^~~~~~~~~~~~~~
/libpcap/pcap-dpdk.c:205:28: error: ‘ETH_MQ_TX_NONE’ undeclared here (not in a function); did you mean ‘RTE_ETH_MQ_TX_NONE’?
  205 |                 .mq_mode = ETH_MQ_TX_NONE,
      |                            ^~~~~~~~~~~~~~
      |                            RTE_ETH_MQ_TX_NONE
/libpcap/pcap-dpdk.c: In function ‘check_link_status’:
/libpcap/pcap-dpdk.c:502:38: error: ‘ETH_LINK_UP’ undeclared (first use in this function); did you mean ‘RTE_ETH_LINK_UP’?
  502 |         return plink->link_status == ETH_LINK_UP;
      |                                      ^~~~~~~~~~~
      |                                      RTE_ETH_LINK_UP
/libpcap/pcap-dpdk.c:502:38: note: each undeclared identifier is reported only once for each function it appears in
/libpcap/pcap-dpdk.c: In function ‘pcap_dpdk_activate’:
/libpcap/pcap-dpdk.c:838:48: error: ‘DEV_TX_OFFLOAD_MBUF_FAST_FREE’ undeclared (first use in this function); did you mean ‘RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE’?
  838 |                 if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE
In file included from /libpcap/pcap-dpdk.c:97:
/libpcap/pcap-dpdk.c:975:62: error: ‘ETH_LINK_FULL_DUPLEX’ undeclared (first use in this function); did you mean ‘RTE_ETH_LINK_FULL_DUPLEX’?
  975 |                                         (link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
      |                                                              ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/pcap.dir/build.make:398: CMakeFiles/pcap.dir/pcap-dpdk.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:161: CMakeFiles/pcap.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions