crypto: fixed ipsec_mb lib dependencies 67/29367/7
authorPiotrX Kleski <piotrx.kleski@intel.com>
Mon, 12 Oct 2020 13:33:11 +0000 (15:33 +0200)
committerDamjan Marion <dmarion@me.com>
Wed, 14 Oct 2020 17:38:16 +0000 (17:38 +0000)
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

build/external/Makefile
build/external/packages/dpdk.mk
build/external/packages/ipsec-mb.mk
build/external/patches/ipsec-mb_0.54/0001-nasm-ver-check.patch [new file with mode: 0644]
src/plugins/dpdk/CMakeLists.txt

index b0e3cee..852766f 100644 (file)
@@ -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
index 06f9d19..a4460ca 100644 (file)
@@ -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,                                          \
index 09ca599..0155a04 100644 (file)
 # 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 (file)
index 0000000..d402391
--- /dev/null
@@ -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
index 0236172..7982940 100644 (file)
@@ -82,21 +82,6 @@ endif()
 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
 ##############################################################################