summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotrX Kleski <piotrx.kleski@intel.com>2020-10-12 15:33:11 +0200
committerDamjan Marion <dmarion@me.com>2020-10-14 17:38:16 +0000
commit9235d43d231b103285be539ebe64d37620fe9930 (patch)
tree36e801ebf90f76b4e139cd4d05719924a2943757
parent444e800f42565ffb123209f8694751607dc34596 (diff)
crypto: fixed ipsec_mb lib dependencies
Type: fix This patch re-enables libIPSec_MB build for the ipsecmb crypto engine plugin. Also since DPDK meson build relies on system installed libIPSec_MB.so that may be inconsistent with VPP compiled one (system installed version vs VPP locally compiled version for example), this patch also disables all libIPSec_MB dependant PMDs from DPDK build. Also ipsec-mb version is incresed to 0.54. Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com> Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: I2ff9e7cd0c35cff9fa642895301a26a5350ea94e
-rw-r--r--build/external/Makefile6
-rw-r--r--build/external/packages/dpdk.mk5
-rw-r--r--build/external/packages/ipsec-mb.mk4
-rw-r--r--build/external/patches/ipsec-mb_0.54/0001-nasm-ver-check.patch13
-rw-r--r--src/plugins/dpdk/CMakeLists.txt15
5 files changed, 24 insertions, 19 deletions
diff --git a/build/external/Makefile b/build/external/Makefile
index b0e3cee4faa..852766f8624 100644
--- a/build/external/Makefile
+++ b/build/external/Makefile
@@ -33,6 +33,8 @@ else
CMAKE?=cmake
endif
+ARCH_X86_64=$(filter x86_64,$(shell uname -m))
+
include packages.mk
include packages/nasm.mk
include packages/ipsec-mb.mk
@@ -46,10 +48,10 @@ clean:
@rm -rf $(B) $(I)
.PHONY: install
-install: dpdk-install rdma-core-install quicly-install libbpf-install
+install: $(if $(ARCH_X86_64), nasm-install ipsec-mb-install) dpdk-install rdma-core-install quicly-install libbpf-install
.PHONY: config
-config: dpdk-config rdma-core-config
+config: $(if $(ARCH_X86_64), nasm-config ipsec-mb-config) dpdk-config rdma-core-config
##############################################################################
# .deb packaging
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
index 06f9d193d63..a4460ca8862 100644
--- a/build/external/packages/dpdk.mk
+++ b/build/external/packages/dpdk.mk
@@ -45,6 +45,11 @@ DPDK_DRIVERS_DISABLED := baseband/\*, \
crypto/ccp, \
crypto/dpaa_sec, \
crypto/openssl, \
+ crypto/aesni_mb, \
+ crypto/aesni_gcm, \
+ crypto/kasumi, \
+ crypto/snow3g, \
+ crypto/zuc, \
event/\*, \
mempool/dpaa, \
net/af_packet, \
diff --git a/build/external/packages/ipsec-mb.mk b/build/external/packages/ipsec-mb.mk
index 09ca599ceeb..0155a04b577 100644
--- a/build/external/packages/ipsec-mb.mk
+++ b/build/external/packages/ipsec-mb.mk
@@ -11,14 +11,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ipsec-mb_version := 0.53
+ipsec-mb_version := 0.54
ipsec-mb_tarball := v$(ipsec-mb_version).tar.gz
ipsec-mb_tarball_md5sum_0.49 := 3a2bee86f25f6c8ed720da5b4b8d4297
ipsec-mb_tarball_md5sum_0.52 := 11ecfa6db4dc0c4ca6e5c616c141ac46
ipsec-mb_tarball_md5sum_0.53 := e9b3507590efd1c23321518612b644cd
+ipsec-mb_tarball_md5sum_0.54 := 258941f7ba90c275fcf9d19c622d2d21
ipsec-mb_tarball_md5sum := $(ipsec-mb_tarball_md5sum_$(ipsec-mb_version))
ipsec-mb_tarball_strip_dirs := 1
-ipsec-mb_depends := nasm
ipsec-mb_url := http://github.com/01org/intel-ipsec-mb/archive/$(ipsec-mb_tarball)
define ipsec-mb_config_cmds
diff --git a/build/external/patches/ipsec-mb_0.54/0001-nasm-ver-check.patch b/build/external/patches/ipsec-mb_0.54/0001-nasm-ver-check.patch
new file mode 100644
index 00000000000..d4023916d46
--- /dev/null
+++ b/build/external/patches/ipsec-mb_0.54/0001-nasm-ver-check.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 329da9f..c7fa8ad 100644
+--- a/Makefile
++++ b/Makefile
+@@ -51,7 +51,7 @@ YASM ?= yasm
+ NASM ?= nasm
+
+ # Detect NASM version (minimum version required: 2.14)
+-NASM_VERSION = $(shell nasm -v | cut -d " " -f 3)
++NASM_VERSION = $(shell $(NASM) -v | cut -d " " -f 3)
+
+ NASM_MAJOR_REQ = 2
+ NASM_MINOR_REQ = 14
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index 0236172792d..79829401c93 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -83,21 +83,6 @@ vpp_plugin_find_library(dpdk NUMA_LIB "numa")
list(APPEND DPDK_LINK_LIBRARIES ${NUMA_LIB})
##############################################################################
-# AESNI libraries
-##############################################################################
-if(DPDK_RTE_LIBRTE_PMD_AESNI_MB OR DPDK_RTE_LIBRTE_PMD_AESNI_GCM)
- if(DPDK_IS_SHARED_LIB)
- vpp_plugin_find_library(dpdk IPSECMB_LIB "libIPSec_MB.so")
- list(APPEND DPDK_LINK_LIBRARIES "${IPSECMB_LIB}")
- else()
- vpp_plugin_find_library(dpdk IPSECMB_LIB "libIPSec_MB.a")
- get_filename_component(IPSECMB_LIB_DIR ${IPSECMB_LIB} DIRECTORY)
- string_append(DPDK_LINK_FLAGS "-L${IPSECMB_LIB_DIR}")
- string_append(DPDK_LINK_FLAGS "-Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a")
- endif()
-endif()
-
-##############################################################################
# Mellanox libraries
##############################################################################
if(DPDK_RTE_LIBRTE_MLX4_PMD OR DPDK_RTE_LIBRTE_MLX5_PMD)