[ovs-dev] Fwd: [PATCH] build: check libibverbs deps before linking with dpdk

Harold Huang baymaxhuang at gmail.com
Sun Nov 14 09:27:00 UTC 2021


David Marchand <david.marchand at redhat.com> 于2021年11月12日周五 下午7:01写道:
>
> OVS requests ibverbs only if mlx drivers are present in DPDK build (+
> option RTE_IBVERBS_LINK_DLOPEN iirc).
>
> For your issue, things that come to mind are an outdated build
> directory, maybe following a pull from OVS sources, or maybe you had
> ibverbs installed in the past on this system, and now it has been
> removed.
>
> Did you compile OVS from a scratch/clean environment?

Hi, David,
   I also started a clean centos 8.2 vm environment and init the vm
environment with the following command:
$dnf -y install 'dnf-command(config-manager)' && dnf config-manager
--set-enabled PowerTools && dnf install -y gcc make numactl-devel
meson autoconf automake libtool unbound unbound-devel

I could also build dpdk and link ovs successfully. But after I
installed libpcap-devel and rebuild dpdk, I could not link ovs
anymore. And the error message is the same as what I posted before. I
found libpcap.pc also has a dependency about libibverbs:
#
# pkg-config file for libpcap.
#
# These variables come from the configure script, so includedir and
# libdir may be defined in terms of prefix and exec_prefix, so the
# latter must be defined as well.
#
prefix="/usr"
exec_prefix="/usr"
includedir="/usr/include"
libdir="/usr/lib64"

Name: libpcap
Description: Platform-independent network traffic capture library
Version: 1.9.1
Libs: -L${libdir} -lpcap
Libs.private: -libverbs
Cflags: -I${includedir}

As a result, maybe libverbs should also be added in:
    AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [
      OVS_FIND_DEPENDENCY([pcap_dump_close], [pcap], [libpcap],[libverbs])
    ], [], [[#include <rte_config.h>]])

Thanks
Harold Huang


More information about the dev mailing list