crypto/aesni_mb: support IPsec Multi-buffer lib v0.49
authorMarko Kovacevic <marko.kovacevic@intel.com>
Tue, 27 Mar 2018 12:14:29 +0000 (13:14 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 23 Apr 2018 15:57:55 +0000 (16:57 +0100)
Adds support for the v0.49 of the IPsec Multi-buffer lib,
which now gets compiled and installed as a shared object.
Therefore, there is no need to pass the AESNI_MULTI_BUFFER_LIB_PATH

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
devtools/test-build.sh
doc/guides/cryptodevs/aesni_mb.rst
drivers/crypto/aesni_mb/Makefile
drivers/crypto/aesni_mb/aesni_mb_ops.h
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
mk/rte.app.mk

index 28e0324..11357c7 100755 (executable)
@@ -43,6 +43,7 @@ default_path=$PATH
 # - DPDK_DEP_NUMA ([y]/n)
 # - DPDK_DEP_PCAP (y/[n])
 # - DPDK_DEP_SSL (y/[n])
+# - DPDK_DEP_IPSEC_MB (y/[n])
 # - DPDK_DEP_SZE (y/[n])
 # - DPDK_DEP_ZLIB (y/[n])
 # - DPDK_MAKE_JOBS (int)
@@ -127,6 +128,7 @@ reset_env ()
        unset DPDK_DEP_NUMA
        unset DPDK_DEP_PCAP
        unset DPDK_DEP_SSL
+       unset DPDK_DEP_IPSEC_MB
        unset DPDK_DEP_SZE
        unset DPDK_DEP_ZLIB
        unset AESNI_MULTI_BUFFER_LIB_PATH
@@ -182,7 +184,7 @@ config () # <directory> <target> <options>
                sed -ri               's,(PCAP=)n,\1y,' $1/.config
                test -z "$ARMV8_CRYPTO_LIB_PATH" || \
                sed -ri   's,(PMD_ARMV8_CRYPTO=)n,\1y,' $1/.config
-               test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
+               test "$DPDK_DEP_IPSEC_MB" != y || \
                sed -ri       's,(PMD_AESNI_MB=)n,\1y,' $1/.config
                test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
                sed -ri      's,(PMD_AESNI_GCM=)n,\1y,' $1/.config
index 3950daa..1680c4a 100644 (file)
@@ -56,12 +56,13 @@ Installation
 To build DPDK with the AESNI_MB_PMD the user is required to download the multi-buffer
 library from `here <https://github.com/01org/intel-ipsec-mb>`_
 and compile it on their user system before building DPDK.
-The latest version of the library supported by this PMD is v0.48, which
-can be downloaded from `<https://github.com/01org/intel-ipsec-mb/archive/v0.48.zip>`_.
+The latest version of the library supported by this PMD is v0.49, which
+can be downloaded from `<https://github.com/01org/intel-ipsec-mb/archive/v0.49.zip>`_.
 
 .. code-block:: console
 
-       make
+    make
+    make install
 
 As a reference, the following table shows a mapping between the past DPDK versions
 and the Multi-Buffer library version supported by them:
@@ -77,7 +78,8 @@ and the Multi-Buffer library version supported by them:
    17.02           0.44
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
-   18.02+          0.48
+   18.02           0.48
+   18.05           0.49
    ==============  ============================
 
 
@@ -86,9 +88,6 @@ Initialization
 
 In order to enable this virtual crypto PMD, user must:
 
-* Export the environmental variable AESNI_MULTI_BUFFER_LIB_PATH with the path where
-  the library was extracted.
-
 * Build the multi buffer library (explained in Installation section).
 
 * Set CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y in config/common_base.
index d9f8fb9..806a95e 100644 (file)
@@ -3,12 +3,6 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-ifneq ($(MAKECMDGOALS),clean)
-ifeq ($(AESNI_MULTI_BUFFER_LIB_PATH),)
-$(error "Please define AESNI_MULTI_BUFFER_LIB_PATH environment variable")
-endif
-endif
-
 # library name
 LIB = librte_pmd_aesni_mb.a
 
@@ -23,9 +17,7 @@ LIBABIVER := 1
 EXPORT_MAP := rte_pmd_aesni_mb_version.map
 
 # external library dependencies
-CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)
-CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
-LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+LDLIBS += -lIPSec_MB
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
index 4d596e8..56fd829 100644 (file)
@@ -9,8 +9,7 @@
 #define LINUX
 #endif
 
-#include <mb_mgr.h>
-#include <aux_funcs.h>
+#include <intel-ipsec-mb.h>
 
 enum aesni_mb_vector_mode {
        RTE_AESNI_MB_NOT_SUPPORTED = 0,
index cb97175..6f06ec4 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright(c) 2015-2017 Intel Corporation
  */
 
-#include <des.h>
+#include <intel-ipsec-mb.h>
 
 #include <rte_common.h>
 #include <rte_hexdump.h>
@@ -517,15 +517,15 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
        /* Set authentication parameters */
        job->hash_alg = session->auth.algo;
        if (job->hash_alg == AES_XCBC) {
-               job->_k1_expanded = session->auth.xcbc.k1_expanded;
-               job->_k2 = session->auth.xcbc.k2;
-               job->_k3 = session->auth.xcbc.k3;
+               job->u.XCBC._k1_expanded = session->auth.xcbc.k1_expanded;
+               job->u.XCBC._k2 = session->auth.xcbc.k2;
+               job->u.XCBC._k3 = session->auth.xcbc.k3;
        } else if (job->hash_alg == AES_CCM) {
                job->u.CCM.aad = op->sym->aead.aad.data + 18;
                job->u.CCM.aad_len_in_bytes = session->aead.aad_len;
        } else {
-               job->hashed_auth_key_xor_ipad = session->auth.pads.inner;
-               job->hashed_auth_key_xor_opad = session->auth.pads.outer;
+               job->u.HMAC._hashed_auth_key_xor_ipad = session->auth.pads.inner;
+               job->u.HMAC._hashed_auth_key_xor_opad = session->auth.pads.outer;
        }
 
        /* Mutable crypto operation parameters */
index 8bab901..f390047 100644 (file)
@@ -203,7 +203,7 @@ endif # CONFIG_RTE_LIBRTE_BBDEV
 
 ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -lrte_pmd_aesni_mb
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -lIPSec_MB
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL)     += -lrte_pmd_openssl -lcrypto