[ovs-dev] [PATCH v3 5/5] netdev-dpdk: Make libnuma dependencies optional
Ciara Loftus
ciara.loftus at intel.com
Thu Jul 28 16:21:15 UTC 2016
Prior to this patch, OVS with DPDK required the libnuma packages to
build. This patch removes this dependency, making it only a requirement
when the CONFIG_RTE_LIBRTE_VHOST_NUMA option is detected as enabled in
the DPDK build.
Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
---
.travis.yml | 1 -
INSTALL.DPDK-ADVANCED.md | 2 +-
INSTALL.DPDK.md | 2 +-
acinclude.m4 | 14 ++++++++++++--
rhel/openvswitch-fedora.spec.in | 2 --
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a46994d..4ae6a5b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,6 @@ addons:
packages:
- bc
- gcc-multilib
- - libnuma-dev
- libssl-dev
- llvm-dev
- libjemalloc1
diff --git a/INSTALL.DPDK-ADVANCED.md b/INSTALL.DPDK-ADVANCED.md
index fb37584..28d5d67 100644
--- a/INSTALL.DPDK-ADVANCED.md
+++ b/INSTALL.DPDK-ADVANCED.md
@@ -180,7 +180,7 @@ right PCIe slot.
CONFIG_RTE_LIBRTE_VHOST_NUMA=y, vHost User ports automatically
detect the NUMA socket of the QEMU vCPUs and will be serviced by a PMD
from the same node provided a core on this node is enabled in the
- pmd-cpu-mask.
+ pmd-cpu-mask. libnuma packages are required for this feature.
### 3.7 Compiler Optimizations
diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
index 4feb7be..312d7f5 100644
--- a/INSTALL.DPDK.md
+++ b/INSTALL.DPDK.md
@@ -21,7 +21,7 @@ The DPDK support of Open vSwitch is considered 'experimental'.
### Prerequisites
-* Required: DPDK 16.04, libnuma
+* Required: DPDK 16.04
* Hardware: [DPDK Supported NICs] when physical ports in use
## <a name="build"></a> 2. Building and Installation
diff --git a/acinclude.m4 b/acinclude.m4
index b07dae2..53724a5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -197,7 +197,17 @@ AC_DEFUN([OVS_CHECK_DPDK], [
LDFLAGS="$LDFLAGS -L${DPDK_LIB_DIR}"
fi
- AC_SEARCH_LIBS([get_mempolicy],[numa],[],[AC_MSG_ERROR([unable to find libnuma, install the dependency package])])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ #include <rte_config.h>
+#if RTE_LIBRTE_VHOST_NUMA
+#error
+#endif
+ ], [])
+ ], [],
+ [AC_SEARCH_LIBS([get_mempolicy],[numa],[],[AC_MSG_ERROR([unable to find libnuma, install the dependency package])])
+ DPDK_EXTRA_LIB="-lnuma"])
# On some systems we have to add -ldl to link with dpdk
#
@@ -209,7 +219,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [
DPDKLIB_FOUND=false
save_LIBS=$LIBS
for extras in "" "-ldl"; do
- LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB -lnuma"
+ LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <rte_config.h>
#include <rte_eal.h>],
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 088afcb..5354298 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -54,8 +54,6 @@ BuildRequires: libcap-ng libcap-ng-devel
%endif
%if %{with dpdk}
BuildRequires: dpdk-devel >= 2.2.0
-BuildRequires: numactl-devel
-Requires: numactl-libs
Provides: %{name}-dpdk = %{version}-%{release}
%endif
--
2.4.3
More information about the dev
mailing list