]> git.proxmox.com Git - mirror_ovs.git/commitdiff
netdev-dpdk: Make libnuma dependencies optional
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 4 Aug 2016 10:44:40 +0000 (11:44 +0100)
committerDaniele Di Proietto <diproiettod@vmware.com>
Fri, 5 Aug 2016 00:01:42 +0000 (17:01 -0700)
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@intel.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
.travis.yml
INSTALL.DPDK-ADVANCED.md
INSTALL.DPDK.md
acinclude.m4
rhel/openvswitch-fedora.spec.in

index a46994d3aeb309c64099fafa1acb742bf3e602c7..4ae6a5b02af61c3d4804263a9a05592a01c254c9 100644 (file)
@@ -11,7 +11,6 @@ addons:
     packages:
       - bc
       - gcc-multilib
-      - libnuma-dev
       - libssl-dev
       - llvm-dev
       - libjemalloc1
index c8d69aebba3bb444c51b902e6101026b30ff4136..0ab43d42e94c7d1fd9625b2d2b94d585cd96eb0a 100755 (executable)
@@ -181,7 +181,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
 
index 0dae2ab5b30a54308c50fa0480547aa4fe0482e6..253d0226e0b39231e372d535b4942db019d78245 100644 (file)
@@ -21,7 +21,7 @@ The DPDK support of Open vSwitch is considered 'experimental'.
 
 ### Prerequisites
 
-* Required: DPDK 16.07, libnuma
+* Required: DPDK 16.07
 * Hardware: [DPDK Supported NICs] when physical ports in use
 
 ## <a name="build"></a> 2. Building and Installation
index f02166d7da1a5ec9185ad99fa3d7c9a7a93c7e92..bbbad238a21f915f98de049ee77a7763d6eae193 100644 (file)
@@ -209,7 +209,17 @@ AC_DEFUN([OVS_CHECK_DPDK], [
       [AC_DEFINE([VHOST_CUSE], [1], [DPDK vhost-cuse support enabled, vhost-user disabled.])
        DPDK_EXTRA_LIB="-lfuse"])
 
-    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
     #
@@ -221,7 +231,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>],
index 34c0f37f2cf06aaf522ce2bce72effc1b1513506..0657e815150a1f7af07cd15a7b12b131df922bda 100644 (file)
@@ -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