DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
@ 2018-03-27 12:14 Kovacevic, Marko
  2018-03-27 12:14 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Kovacevic, Marko @ 2018-03-27 12:14 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Marko Kovacevic

From: Marko Kovacevic <marko.kovacevic@intel.com>

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 devtools/test-build.sh                     |  2 --
 doc/guides/cryptodevs/aesni_mb.rst         | 13 ++++++-------
 drivers/crypto/aesni_mb/Makefile           | 10 +---------
 drivers/crypto/aesni_mb/aesni_mb_ops.h     |  3 +--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 12 ++++++------
 mk/rte.app.mk                              |  2 +-
 6 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 3362edc..cc72234 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -183,8 +183,6 @@ config () # <directory> <target> <options>
 		test -z "$ARMV8_CRYPTO_LIB_PATH" || \
 		sed -ri   's,(PMD_ARMV8_CRYPTO=)n,\1y,' $1/.config
 		test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
-		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
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 3950daa..1680c4a 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -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.
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index d9f8fb9..806a95e 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -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
diff --git a/drivers/crypto/aesni_mb/aesni_mb_ops.h b/drivers/crypto/aesni_mb/aesni_mb_ops.h
index 4d596e8..56fd829 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_ops.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_ops.h
@@ -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,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index cb97175..6f06ec4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -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 */
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 94525dc..b05a9ed 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -198,7 +198,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
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-03-27 12:14 [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49 Kovacevic, Marko
@ 2018-03-27 12:14 ` Kovacevic, Marko
  2018-03-30 15:16   ` De Lara Guarch, Pablo
  2018-03-30 15:16 ` [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Kovacevic, Marko @ 2018-03-27 12:14 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Kovacevic, Marko

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 devtools/test-build.sh                   |  3 ---
 doc/guides/cryptodevs/aesni_gcm.rst      | 13 ++++++-------
 drivers/crypto/aesni_gcm/Makefile        | 10 +---------
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h |  3 +--
 mk/rte.app.mk                            |  2 +-
 5 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index cc72234..c93270c 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -33,7 +33,6 @@
 default_path=$PATH
 
 # Load config options:
-# - AESNI_MULTI_BUFFER_LIB_PATH
 # - ARMV8_CRYPTO_LIB_PATH
 # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2)
 # - DPDK_DEP_ARCHIVE
@@ -182,8 +181,6 @@ 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" || \
-		sed -ri      's,(PMD_AESNI_GCM=)n,\1y,' $1/.config
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
 		test -z "$LIBSSO_KASUMI_PATH" || \
diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
index ffd6ba9..01590e8 100644
--- a/doc/guides/cryptodevs/aesni_gcm.rst
+++ b/doc/guides/cryptodevs/aesni_gcm.rst
@@ -36,12 +36,13 @@ Installation
 To build DPDK with the AESNI_GCM_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 in `<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 in `<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 external crypto libraries supported by them:
@@ -55,7 +56,8 @@ and the external crypto libraries supported by them:
    =============  ================================
    16.04 - 16.11  Multi-buffer library 0.43 - 0.44
    17.02 - 17.05  ISA-L Crypto v2.18
-   17.08+         Multi-buffer library 0.46+
+   17.08 - 18.02  Multi-buffer library 0.46 - 0.48
+   18.05          Multi-buffer library 0.49
    =============  ================================
 
 
@@ -64,9 +66,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_GCM=y in config/common_base.
diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d06c544..0a5c1a8 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -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_gcm.a
 
@@ -23,9 +17,7 @@ LIBABIVER := 1
 EXPORT_MAP := rte_pmd_aesni_gcm_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
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
index 59e504e..4506166 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
@@ -9,8 +9,7 @@
 #define LINUX
 #endif
 
-#include <gcm_defines.h>
-#include <aux_funcs.h>
+#include <intel-ipsec-mb.h>
 
 /** Supported vector modes */
 enum aesni_gcm_vector_mode {
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index b05a9ed..c68ce72 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -200,7 +200,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -lrte_pmd_aesni_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_AESNI_GCM)   +=  -lIPSec_MB
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL)     += -lrte_pmd_openssl -lcrypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)         += -lrte_pmd_qat -lcrypto
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-03-27 12:14 [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49 Kovacevic, Marko
  2018-03-27 12:14 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
@ 2018-03-30 15:16 ` De Lara Guarch, Pablo
  2018-03-30 15:40   ` De Lara Guarch, Pablo
  2018-03-31 13:40 ` Thomas Monjalon
  2018-04-03 13:29 ` [dpdk-dev] [PATCH v2 " Kovacevic, Marko
  3 siblings, 1 reply; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-03-30 15:16 UTC (permalink / raw)
  To: Kovacevic, Marko, dev



> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Tuesday, March 27, 2018 1:14 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic,
> Marko <marko.kovacevic@intel.com>
> Subject: [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib
> v0.49
> 
> From: Marko Kovacevic <marko.kovacevic@intel.com>
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-03-27 12:14 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
@ 2018-03-30 15:16   ` De Lara Guarch, Pablo
  2018-03-30 15:41     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-03-30 15:16 UTC (permalink / raw)
  To: Kovacevic, Marko, dev



> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Tuesday, March 27, 2018 1:15 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>
> Subject: [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-03-30 15:16 ` [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
@ 2018-03-30 15:40   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-03-30 15:40 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Kovacevic, Marko, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Friday, March 30, 2018 4:16 PM
> To: Kovacevic, Marko <marko.kovacevic@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-
> buffer lib v0.49
> 
> 
> 
> > -----Original Message-----
> > From: Kovacevic, Marko
> > Sent: Tuesday, March 27, 2018 1:14 PM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic,
> > Marko <marko.kovacevic@intel.com>
> > Subject: [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer
> > lib
> > v0.49
> >
> > From: Marko Kovacevic <marko.kovacevic@intel.com>
> >
> > Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-03-30 15:16   ` De Lara Guarch, Pablo
@ 2018-03-30 15:41     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-03-30 15:41 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Kovacevic, Marko, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Friday, March 30, 2018 4:16 PM
> To: Kovacevic, Marko <marko.kovacevic@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-
> buffer lib v0.49
> 
> 
> 
> > -----Original Message-----
> > From: Kovacevic, Marko
> > Sent: Tuesday, March 27, 2018 1:15 PM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic,
> > Marko <marko.kovacevic@intel.com>
> > Subject: [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer
> > lib v0.49
> >
> > Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-03-27 12:14 [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49 Kovacevic, Marko
  2018-03-27 12:14 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
  2018-03-30 15:16 ` [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
@ 2018-03-31 13:40 ` Thomas Monjalon
  2018-04-03 13:29 ` [dpdk-dev] [PATCH v2 " Kovacevic, Marko
  3 siblings, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2018-03-31 13:40 UTC (permalink / raw)
  To: Kovacevic, Marko; +Cc: dev, pablo.de.lara.guarch

27/03/2018 14:14, Kovacevic, Marko:
> From: Marko Kovacevic <marko.kovacevic@intel.com>
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>

No comment at all?
This new version doesn't work with the env variable.
It is probably worth few words.

> --- a/devtools/test-build.sh
> +++ b/devtools/test-build.sh
> @@ -183,8 +183,6 @@ config () # <directory> <target> <options>
>  		test -z "$ARMV8_CRYPTO_LIB_PATH" || \
>  		sed -ri   's,(PMD_ARMV8_CRYPTO=)n,\1y,' $1/.config
>  		test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
> -		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

The purpose of test-build.sh is to test the build :)
So you need to provide a way to enable this PMD if the dependency
is available. Look at DPDK_DEP_SSL as an example.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-03-27 12:14 [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49 Kovacevic, Marko
                   ` (2 preceding siblings ...)
  2018-03-31 13:40 ` Thomas Monjalon
@ 2018-04-03 13:29 ` Kovacevic, Marko
  2018-04-03 13:30   ` [dpdk-dev] [PATCH v2 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
  2018-04-03 15:22   ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " Kovacevic, Marko
  3 siblings, 2 replies; 13+ messages in thread
From: Kovacevic, Marko @ 2018-04-03 13:29 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Marko Kovacevic

From: Marko Kovacevic <marko.kovacevic@intel.com>

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>

---

 V2: Added commit message
---
 devtools/test-build.sh                     |  6 ++++--
 doc/guides/cryptodevs/aesni_mb.rst         | 13 ++++++-------
 drivers/crypto/aesni_mb/Makefile           | 10 +---------
 drivers/crypto/aesni_mb/aesni_mb_ops.h     |  3 +--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 12 ++++++------
 mk/rte.app.mk                              |  2 +-
 6 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 3362edc..600a763 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -43,6 +43,7 @@ default_path=$PATH
 # - DPDK_DEP_NUMA ([y]/n)
 # - DPDK_DEP_PCAP (y/[n])
 # - DPDK_DEP_SSL (y/[n])
+# - DPDK_DEP_AESNI_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_AESNI_MB
 	unset DPDK_DEP_SZE
 	unset DPDK_DEP_ZLIB
 	unset AESNI_MULTI_BUFFER_LIB_PATH
@@ -180,11 +182,11 @@ config () # <directory> <target> <options>
 		sed -ri            's,(NFP_PMD=)n,\1y,' $1/.config
 		test "$DPDK_DEP_PCAP" != y || \
 		sed -ri               's,(PCAP=)n,\1y,' $1/.config
+		test "$DPDK_DEP_AESNI_MB" != y || \
+		sed -ri       's,(PMD_AESNI_MB=)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" || \
-		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
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 3950daa..1680c4a 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -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.
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index d9f8fb9..806a95e 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -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
diff --git a/drivers/crypto/aesni_mb/aesni_mb_ops.h b/drivers/crypto/aesni_mb/aesni_mb_ops.h
index 4d596e8..56fd829 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_ops.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_ops.h
@@ -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,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index cb97175..6f06ec4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -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 */
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 94525dc..b05a9ed 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -198,7 +198,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
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-04-03 13:29 ` [dpdk-dev] [PATCH v2 " Kovacevic, Marko
@ 2018-04-03 13:30   ` Kovacevic, Marko
  2018-04-03 15:22   ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " Kovacevic, Marko
  1 sibling, 0 replies; 13+ messages in thread
From: Kovacevic, Marko @ 2018-04-03 13:30 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Kovacevic, Marko

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>

---

 V2: Added commit body message
---
 devtools/test-build.sh                   |  7 ++++---
 doc/guides/cryptodevs/aesni_gcm.rst      | 13 ++++++-------
 drivers/crypto/aesni_gcm/Makefile        | 10 +---------
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h |  3 +--
 mk/rte.app.mk                            |  2 +-
 5 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 600a763..20c261c 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -33,7 +33,6 @@
 default_path=$PATH
 
 # Load config options:
-# - AESNI_MULTI_BUFFER_LIB_PATH
 # - ARMV8_CRYPTO_LIB_PATH
 # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2)
 # - DPDK_DEP_ARCHIVE
@@ -44,6 +43,7 @@ default_path=$PATH
 # - DPDK_DEP_PCAP (y/[n])
 # - DPDK_DEP_SSL (y/[n])
 # - DPDK_DEP_AESNI_MB (y/[n])
+# - DPDK_DEP_AESNI_GCM (y/[n])
 # - DPDK_DEP_SZE (y/[n])
 # - DPDK_DEP_ZLIB (y/[n])
 # - DPDK_MAKE_JOBS (int)
@@ -129,6 +129,7 @@ reset_env ()
 	unset DPDK_DEP_PCAP
 	unset DPDK_DEP_SSL
 	unset DPDK_DEP_AESNI_MB
+	unset DPDK_DEP_AESNI_GCM
 	unset DPDK_DEP_SZE
 	unset DPDK_DEP_ZLIB
 	unset AESNI_MULTI_BUFFER_LIB_PATH
@@ -184,10 +185,10 @@ config () # <directory> <target> <options>
 		sed -ri               's,(PCAP=)n,\1y,' $1/.config
 		test "$DPDK_DEP_AESNI_MB" != y || \
 		sed -ri       's,(PMD_AESNI_MB=)n,\1y,' $1/.config
+		test "$DPDK_DEP_AESNI_GCM" != y || \
+		sed -ri       's,(PMD_AESNI_GCM=)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" || \
-		sed -ri      's,(PMD_AESNI_GCM=)n,\1y,' $1/.config
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
 		test -z "$LIBSSO_KASUMI_PATH" || \
diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
index ffd6ba9..01590e8 100644
--- a/doc/guides/cryptodevs/aesni_gcm.rst
+++ b/doc/guides/cryptodevs/aesni_gcm.rst
@@ -36,12 +36,13 @@ Installation
 To build DPDK with the AESNI_GCM_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 in `<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 in `<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 external crypto libraries supported by them:
@@ -55,7 +56,8 @@ and the external crypto libraries supported by them:
    =============  ================================
    16.04 - 16.11  Multi-buffer library 0.43 - 0.44
    17.02 - 17.05  ISA-L Crypto v2.18
-   17.08+         Multi-buffer library 0.46+
+   17.08 - 18.02  Multi-buffer library 0.46 - 0.48
+   18.05          Multi-buffer library 0.49
    =============  ================================
 
 
@@ -64,9 +66,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_GCM=y in config/common_base.
diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d06c544..0a5c1a8 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -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_gcm.a
 
@@ -23,9 +17,7 @@ LIBABIVER := 1
 EXPORT_MAP := rte_pmd_aesni_gcm_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
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
index 59e504e..4506166 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
@@ -9,8 +9,7 @@
 #define LINUX
 #endif
 
-#include <gcm_defines.h>
-#include <aux_funcs.h>
+#include <intel-ipsec-mb.h>
 
 /** Supported vector modes */
 enum aesni_gcm_vector_mode {
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index b05a9ed..c68ce72 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -200,7 +200,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -lrte_pmd_aesni_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_AESNI_GCM)   +=  -lIPSec_MB
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL)     += -lrte_pmd_openssl -lcrypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)         += -lrte_pmd_qat -lcrypto
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-04-03 13:29 ` [dpdk-dev] [PATCH v2 " Kovacevic, Marko
  2018-04-03 13:30   ` [dpdk-dev] [PATCH v2 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
@ 2018-04-03 15:22   ` Kovacevic, Marko
  2018-04-03 15:22     ` [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
  2018-04-04 12:32     ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
  1 sibling, 2 replies; 13+ messages in thread
From: Kovacevic, Marko @ 2018-04-03 15:22 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Marko Kovacevic

From: Marko Kovacevic <marko.kovacevic@intel.com>

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

---

 V2: added commit message

 V3: changed variable name to something more practical

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 devtools/test-build.sh                     |  6 ++++--
 doc/guides/cryptodevs/aesni_mb.rst         | 13 ++++++-------
 drivers/crypto/aesni_mb/Makefile           | 10 +---------
 drivers/crypto/aesni_mb/aesni_mb_ops.h     |  3 +--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 12 ++++++------
 mk/rte.app.mk                              |  2 +-
 6 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 3362edc..3ba9bc2 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -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
@@ -180,11 +182,11 @@ config () # <directory> <target> <options>
 		sed -ri            's,(NFP_PMD=)n,\1y,' $1/.config
 		test "$DPDK_DEP_PCAP" != y || \
 		sed -ri               's,(PCAP=)n,\1y,' $1/.config
+		test "$DPDK_DEP_IPSEC_MB" != y || \
+		sed -ri       's,(PMD_AESNI_MB=)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" || \
-		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
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 3950daa..1680c4a 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -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.
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index d9f8fb9..806a95e 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -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
diff --git a/drivers/crypto/aesni_mb/aesni_mb_ops.h b/drivers/crypto/aesni_mb/aesni_mb_ops.h
index 4d596e8..56fd829 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_ops.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_ops.h
@@ -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,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index cb97175..6f06ec4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -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 */
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 94525dc..b05a9ed 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -198,7 +198,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
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-04-03 15:22   ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " Kovacevic, Marko
@ 2018-04-03 15:22     ` Kovacevic, Marko
  2018-04-04 12:33       ` De Lara Guarch, Pablo
  2018-04-04 12:32     ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
  1 sibling, 1 reply; 13+ messages in thread
From: Kovacevic, Marko @ 2018-04-03 15:22 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Kovacevic, Marko

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>

---

 V2: added commit message

 V3: changed variable name to what the first patch
     made
---
 devtools/test-build.sh                   |  5 ++---
 doc/guides/cryptodevs/aesni_gcm.rst      | 13 ++++++-------
 drivers/crypto/aesni_gcm/Makefile        | 10 +---------
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h |  3 +--
 mk/rte.app.mk                            |  2 +-
 5 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 3ba9bc2..4a7c007 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -33,7 +33,6 @@
 default_path=$PATH
 
 # Load config options:
-# - AESNI_MULTI_BUFFER_LIB_PATH
 # - ARMV8_CRYPTO_LIB_PATH
 # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2)
 # - DPDK_DEP_ARCHIVE
@@ -184,10 +183,10 @@ config () # <directory> <target> <options>
 		sed -ri               's,(PCAP=)n,\1y,' $1/.config
 		test "$DPDK_DEP_IPSEC_MB" != y || \
 		sed -ri       's,(PMD_AESNI_MB=)n,\1y,' $1/.config
+		test "$DPDK_DEP_IPSEC_MB" != y || \
+		sed -ri       's,(PMD_AESNI_GCM=)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" || \
-		sed -ri      's,(PMD_AESNI_GCM=)n,\1y,' $1/.config
 		test -z "$LIBSSO_SNOW3G_PATH" || \
 		sed -ri         's,(PMD_SNOW3G=)n,\1y,' $1/.config
 		test -z "$LIBSSO_KASUMI_PATH" || \
diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
index ffd6ba9..01590e8 100644
--- a/doc/guides/cryptodevs/aesni_gcm.rst
+++ b/doc/guides/cryptodevs/aesni_gcm.rst
@@ -36,12 +36,13 @@ Installation
 To build DPDK with the AESNI_GCM_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 in `<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 in `<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 external crypto libraries supported by them:
@@ -55,7 +56,8 @@ and the external crypto libraries supported by them:
    =============  ================================
    16.04 - 16.11  Multi-buffer library 0.43 - 0.44
    17.02 - 17.05  ISA-L Crypto v2.18
-   17.08+         Multi-buffer library 0.46+
+   17.08 - 18.02  Multi-buffer library 0.46 - 0.48
+   18.05          Multi-buffer library 0.49
    =============  ================================
 
 
@@ -64,9 +66,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_GCM=y in config/common_base.
diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d06c544..0a5c1a8 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -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_gcm.a
 
@@ -23,9 +17,7 @@ LIBABIVER := 1
 EXPORT_MAP := rte_pmd_aesni_gcm_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
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
index 59e504e..4506166 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_ops.h
@@ -9,8 +9,7 @@
 #define LINUX
 #endif
 
-#include <gcm_defines.h>
-#include <aux_funcs.h>
+#include <intel-ipsec-mb.h>
 
 /** Supported vector modes */
 enum aesni_gcm_vector_mode {
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index b05a9ed..c68ce72 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -200,7 +200,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)    += -lrte_pmd_aesni_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_AESNI_GCM)   +=  -lIPSec_MB
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL)     += -lrte_pmd_openssl -lcrypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)         += -lrte_pmd_qat -lcrypto
-- 
2.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
  2018-04-03 15:22   ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " Kovacevic, Marko
  2018-04-03 15:22     ` [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
@ 2018-04-04 12:32     ` De Lara Guarch, Pablo
  1 sibling, 0 replies; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-04-04 12:32 UTC (permalink / raw)
  To: Kovacevic, Marko, dev



> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Tuesday, April 3, 2018 4:22 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>
> Subject: [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49
> 
> From: Marko Kovacevic <marko.kovacevic@intel.com>
> 
> 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

Applied and merged into existing patch in dpdk-next-crypto.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
  2018-04-03 15:22     ` [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
@ 2018-04-04 12:33       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 13+ messages in thread
From: De Lara Guarch, Pablo @ 2018-04-04 12:33 UTC (permalink / raw)
  To: Kovacevic, Marko, dev



> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Tuesday, April 3, 2018 4:22 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>
> Subject: [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
> 
> 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>

Applied and merged into existing commit in dpdk-next-crypto.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-04-04 12:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27 12:14 [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer lib v0.49 Kovacevic, Marko
2018-03-27 12:14 ` [dpdk-dev] [PATCH v1 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
2018-03-30 15:16   ` De Lara Guarch, Pablo
2018-03-30 15:41     ` De Lara Guarch, Pablo
2018-03-30 15:16 ` [dpdk-dev] [PATCH v1 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo
2018-03-30 15:40   ` De Lara Guarch, Pablo
2018-03-31 13:40 ` Thomas Monjalon
2018-04-03 13:29 ` [dpdk-dev] [PATCH v2 " Kovacevic, Marko
2018-04-03 13:30   ` [dpdk-dev] [PATCH v2 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
2018-04-03 15:22   ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " Kovacevic, Marko
2018-04-03 15:22     ` [dpdk-dev] [PATCH v3 2/2] crypto/aesni_gcm: support IPsec Multi-buffer " Kovacevic, Marko
2018-04-04 12:33       ` De Lara Guarch, Pablo
2018-04-04 12:32     ` [dpdk-dev] [PATCH v3 1/2] crypto/aesni_mb: support IPsec MUlti-buffer " De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).