Skip to contentSkip to conversation

crypto/aesni_mb: support newer version library only

PATCH Superseded Fan Zhang 4 participants 9 messages Mar 4, 2019 – Mar 29, 2019

Subsystems (2)
lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 crypto/aesni_mb: support newer version library only

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---
Although the PMD dependency to the library is changed, the ABI/API are not updated as the APIs to access the PMD remains intact. When the user compile the PMD a error message "IPSec MB version >= 0.52" will be displayed to inform the user to update the library.

 doc/guides/cryptodevs/aesni_mb.rst                 |    8 +-
 doc/guides/rel_notes/deprecation.rst               |    3 -
 drivers/crypto/aesni_mb/Makefile                   |   21 +-
 drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
 drivers/crypto/aesni_mb/meson.build                |   13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 --------------------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
 8 files changed, 16 insertions(+), 2426 deletions(-)
 delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c
doc/guides/cryptodevs/aesni_mb.rst +3 -5
index 47f2ecc2f..d3567d279 100644
@@ -57,10 +57,7 @@ Limitations
 
 * Chained mbufs are not supported.
 * Only in-place is currently supported (destination address is the same as source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or later.
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
+* Only support Intel multi buffer library version 0.52 or later.
 
 
 Installation
@@ -92,7 +89,8 @@ and the Multi-Buffer library version supported by them:
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
    18.02           0.48
-   18.05+          0.49+
+   18.05           0.49
+   19.02+          0.52+
    ==============  ============================
 
 
doc/guides/rel_notes/deprecation.rst +0 -3
index 1b4fcb7e6..8adeaa552 100644
@@ -72,6 +72,3 @@ Deprecation Notices
   replace ``enum rte_meter_color`` in meter library in 19.05. This will help
   to consolidate color definition, which is currently replicated in many places,
   such as: rte_meter.h, rte_mtr.h, rte_tm.h.
-
-* crypto/aesni_mb: the minimum supported intel-ipsec-mb library version will be
-  changed from 0.49.0 to 0.52.0.
drivers/crypto/aesni_mb/Makefile +8 -13
index 8d2024c9e..f3035340a 100644
@@ -32,19 +32,14 @@ IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)
 IMB_VERSION_NUM = $(shell grep -e "IMB_VERSION_NUM" $(IMB_HDR) | cut -d' ' -f3)
 
 ifeq ($(IMB_VERSION),)
-	# files for older version of IMB
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-else
-	ifeq ($(shell expr $(IMB_VERSION_NUM) \>= 0x3400), 1)
-		# files for a new version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
-	else
-		# files for older version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-	endif
+$(error "IPSec_MB version >= 0.52 is required")
 endif
 
+ifeq ($(shell expr $(IMB_VERSION_NUM) \< 0x3400), 1)
+$(error "IPSec_MB version >= 0.52 is required")
+endif
+
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
+
 include $(RTE_SDK)/mk/rte.lib.mk
drivers/crypto/aesni_mb/aesni_mb_ops.h deleted +0 -302

302 lines not on this page · raw message

drivers/crypto/aesni_mb/meson.build +5 -8
index 6313c4bd0..fbc4878af 100644
@@ -10,16 +10,13 @@ else
 	imb_arr = cc.get_define('IMB_VERSION_STR',
 		prefix : '#include<intel-ipsec-mb.h>').split('"')
 
-	imb_ver =''.join(imb_arr)
+	imb_ver = ''.join(imb_arr)
 
-	if imb_ver.version_compare('>=' + IPSec_MB_ver_0_52)
-		message('Build for a new version of library IPSec_MB[' + imb_ver + ']')
-		sources = files('rte_aesni_mb_pmd.c',
-			'rte_aesni_mb_pmd_ops.c')
+	if (imb_ver == '') or (imb_ver.version_compare('<' + IPSec_MB_ver_0_52))
+		message('IPSec_MB version >= 0.52 is required')
+		build = false
 	else
-		sources = files('rte_aesni_mb_pmd_compat.c',
-			'rte_aesni_mb_pmd_ops_compat.c')
-		message('Build for older version of library IPSec_MB[' + imb_ver + ']')
+		sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c')
 	endif
 
 endif
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c deleted +0 -1313

1,313 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c deleted +0 -745

745 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +0 -37
index 61f419dda..4d439360f 100644
@@ -7,21 +7,6 @@
 
 #include <intel-ipsec-mb.h>
 
-
-/*
- * IMB_VERSION_NUM macro was introduced in version Multi-buffer 0.50,
- * so if macro is not defined, it means that the version is 0.49.
- */
-#if !defined(IMB_VERSION_NUM)
-#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
-#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0)
-#endif
-
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-#include "aesni_mb_ops.h"
-#endif
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_NOT_SUPPORTED = 0,
 	RTE_AESNI_MB_SSE,
@@ -29,8 +14,6 @@ enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_AVX2,
 	RTE_AESNI_MB_AVX512
 };
-#endif
-
 
 #define CRYPTODEV_NAME_AESNI_MB_PMD	crypto_aesni_mb
 /**< AES-NI Multi buffer PMD device name */
@@ -109,13 +92,11 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_CMAC]	= 16,
 		[AES_GMAC]	= 12,
 		[NULL_HASH]	= 0,
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
 		[PLAIN_SHA_256]	= 32,
 		[PLAIN_SHA_384]	= 48,
 		[PLAIN_SHA_512]	= 64
-#endif
 	/**< Vector mode dependent pointer table of the multi-buffer APIs */
 
 };
@@ -149,10 +130,8 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
-#endif
 };
 
 /** AESNI Multi buffer queue pair */
@@ -160,10 +139,6 @@ struct aesni_mb_qp {
 	uint16_t id;
 	/**< Queue Pair Identifier */
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-	/**< Unique Queue Pair Name */
-	const struct aesni_mb_op_fns *op_fns;
-#endif
 	/**< Unique Queue Pair Name */
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
@@ -277,22 +252,10 @@ struct aesni_mb_session {
 	} aead;
 } __rte_cache_aligned;
 
-
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
-/**
- *
- */
 extern int
 aesni_mb_set_session_parameters(const MB_MGR *mb_mgr,
 		struct aesni_mb_session *sess,
 		const struct rte_crypto_sym_xform *xform);
-#else
-extern int
-aesni_mb_set_session_parameters(const struct aesni_mb_op_fns *mb_ops,
-		struct aesni_mb_session *sess,
-		const struct rte_crypto_sym_xform *xform);
-#endif
 
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops;
Signature · 1 line
2.14.5
#1 lore raw

Hi Fan,

Quoted 49 lines

-----Original Message-----
From: Zhang, Roy Fan
Sent: Monday, March 4, 2019 11:47 AM
To: [email protected]
Cc: [email protected]; Zhang, Roy Fan <[email protected]>; Kusztal, ArkadiuszX <[email protected]>; Trahe, Fiona <[email protected]>
Subject: [PATCH] crypto/aesni_mb: support newer version library only

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---
Although the PMD dependency to the library is changed, the ABI/API are not updated as the APIs to access the PMD remains intact. When the user compile the PMD a error message "IPSec MB version >= 0.52" will be displayed to inform the user to update the library.

 doc/guides/cryptodevs/aesni_mb.rst                 |    8 +-
 doc/guides/rel_notes/deprecation.rst               |    3 -
 drivers/crypto/aesni_mb/Makefile                   |   21 +-
 drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
 drivers/crypto/aesni_mb/meson.build                |   13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 --------------------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
 8 files changed, 16 insertions(+), 2426 deletions(-)
 delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c
doc/guides/cryptodevs/aesni_mb.rst +1 -4
index 47f2ecc2f..d3567d279 100644
@@ -57,10 +57,7 @@ Limitations
 
 * Chained mbufs are not supported.
 * Only in-place is currently supported (destination address is the same as source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or later.
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
+* Only support Intel multi buffer library version 0.52 or later.
 
 
 Installation

doc/guides/cryptodevs/aesni_mb.rst and the Multi-Buffer library version supported by them: · line 93

Quoted 6 lines
doc/guides/cryptodevs/aesni_mb.rst +2 -1
@@ -92,7 +89,8 @@ and the Multi-Buffer library version supported by them:
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
    18.02           0.48
-   18.05+          0.49+
+   18.05           0.49
+   19.02+          0.52+

[Fiona] shouldn't this be
19.05+ 0.52+

author
#2 lore raw

PATCH v2 1/1 crypto/aesni_mb: support newer version library only

In reply to Fan Zhang

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---

v2:
- fixed incorrect version in documentation.

 doc/guides/cryptodevs/aesni_mb.rst                 |    8 +-
 doc/guides/rel_notes/deprecation.rst               |    3 -
 drivers/crypto/aesni_mb/Makefile                   |   21 +-
 drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
 drivers/crypto/aesni_mb/meson.build                |   13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 --------------------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
 8 files changed, 16 insertions(+), 2426 deletions(-)
 delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c
doc/guides/cryptodevs/aesni_mb.rst +3 -5
index 47f2ecc2f..66c44e03a 100644
@@ -57,10 +57,7 @@ Limitations
 
 * Chained mbufs are not supported.
 * Only in-place is currently supported (destination address is the same as source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or later.
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
+* Only support Intel multi buffer library version 0.52 or later.
 
 
 Installation
@@ -92,7 +89,8 @@ and the Multi-Buffer library version supported by them:
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
    18.02           0.48
-   18.05+          0.49+
+   18.05           0.49
+   19.05+          0.52+
    ==============  ============================
 
 
doc/guides/rel_notes/deprecation.rst +0 -3
index 1b4fcb7e6..8adeaa552 100644
@@ -72,6 +72,3 @@ Deprecation Notices
   replace ``enum rte_meter_color`` in meter library in 19.05. This will help
   to consolidate color definition, which is currently replicated in many places,
   such as: rte_meter.h, rte_mtr.h, rte_tm.h.
-
-* crypto/aesni_mb: the minimum supported intel-ipsec-mb library version will be
-  changed from 0.49.0 to 0.52.0.
drivers/crypto/aesni_mb/Makefile +8 -13
index 8d2024c9e..f3035340a 100644
@@ -32,19 +32,14 @@ IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)
 IMB_VERSION_NUM = $(shell grep -e "IMB_VERSION_NUM" $(IMB_HDR) | cut -d' ' -f3)
 
 ifeq ($(IMB_VERSION),)
-	# files for older version of IMB
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-else
-	ifeq ($(shell expr $(IMB_VERSION_NUM) \>= 0x3400), 1)
-		# files for a new version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
-	else
-		# files for older version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-	endif
+$(error "IPSec_MB version >= 0.52 is required")
 endif
 
+ifeq ($(shell expr $(IMB_VERSION_NUM) \< 0x3400), 1)
+$(error "IPSec_MB version >= 0.52 is required")
+endif
+
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
+
 include $(RTE_SDK)/mk/rte.lib.mk
drivers/crypto/aesni_mb/aesni_mb_ops.h deleted +0 -302

302 lines not on this page · raw message

drivers/crypto/aesni_mb/meson.build +5 -8
index 6313c4bd0..fbc4878af 100644
@@ -10,16 +10,13 @@ else
 	imb_arr = cc.get_define('IMB_VERSION_STR',
 		prefix : '#include<intel-ipsec-mb.h>').split('"')
 
-	imb_ver =''.join(imb_arr)
+	imb_ver = ''.join(imb_arr)
 
-	if imb_ver.version_compare('>=' + IPSec_MB_ver_0_52)
-		message('Build for a new version of library IPSec_MB[' + imb_ver + ']')
-		sources = files('rte_aesni_mb_pmd.c',
-			'rte_aesni_mb_pmd_ops.c')
+	if (imb_ver == '') or (imb_ver.version_compare('<' + IPSec_MB_ver_0_52))
+		message('IPSec_MB version >= 0.52 is required')
+		build = false
 	else
-		sources = files('rte_aesni_mb_pmd_compat.c',
-			'rte_aesni_mb_pmd_ops_compat.c')
-		message('Build for older version of library IPSec_MB[' + imb_ver + ']')
+		sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c')
 	endif
 
 endif
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c deleted +0 -1313

1,313 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c deleted +0 -745

745 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +0 -37
index 61f419dda..4d439360f 100644
@@ -7,21 +7,6 @@
 
 #include <intel-ipsec-mb.h>
 
-
-/*
- * IMB_VERSION_NUM macro was introduced in version Multi-buffer 0.50,
- * so if macro is not defined, it means that the version is 0.49.
- */
-#if !defined(IMB_VERSION_NUM)
-#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
-#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0)
-#endif
-
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-#include "aesni_mb_ops.h"
-#endif
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_NOT_SUPPORTED = 0,
 	RTE_AESNI_MB_SSE,
@@ -29,8 +14,6 @@ enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_AVX2,
 	RTE_AESNI_MB_AVX512
 };
-#endif
-
 
 #define CRYPTODEV_NAME_AESNI_MB_PMD	crypto_aesni_mb
 /**< AES-NI Multi buffer PMD device name */
@@ -109,13 +92,11 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_CMAC]	= 16,
 		[AES_GMAC]	= 12,
 		[NULL_HASH]	= 0,
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
 		[PLAIN_SHA_256]	= 32,
 		[PLAIN_SHA_384]	= 48,
 		[PLAIN_SHA_512]	= 64
-#endif
 	/**< Vector mode dependent pointer table of the multi-buffer APIs */
 
 };
@@ -149,10 +130,8 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
-#endif
 };
 
 /** AESNI Multi buffer queue pair */
@@ -160,10 +139,6 @@ struct aesni_mb_qp {
 	uint16_t id;
 	/**< Queue Pair Identifier */
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-	/**< Unique Queue Pair Name */
-	const struct aesni_mb_op_fns *op_fns;
-#endif
 	/**< Unique Queue Pair Name */
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
@@ -277,22 +252,10 @@ struct aesni_mb_session {
 	} aead;
 } __rte_cache_aligned;
 
-
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
-/**
- *
- */
 extern int
 aesni_mb_set_session_parameters(const MB_MGR *mb_mgr,
 		struct aesni_mb_session *sess,
 		const struct rte_crypto_sym_xform *xform);
-#else
-extern int
-aesni_mb_set_session_parameters(const struct aesni_mb_op_fns *mb_ops,
-		struct aesni_mb_session *sess,
-		const struct rte_crypto_sym_xform *xform);
-#endif
 
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops;
Signature · 1 line
2.14.5
Acked-by on v2 1/1
#3 lore raw
Quoted 52 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Fan Zhang
Sent: Monday, March 4, 2019 2:58 PM
To: [email protected]
Cc: [email protected]; Zhang, Roy Fan <[email protected]>; Trahe, Fiona <[email protected]>
Subject: [dpdk-dev] [PATCH v2] crypto/aesni_mb: support newer version library only

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---

v2:
- fixed incorrect version in documentation.

 doc/guides/cryptodevs/aesni_mb.rst                 |    8 +-
 doc/guides/rel_notes/deprecation.rst               |    3 -
 drivers/crypto/aesni_mb/Makefile                   |   21 +-
 drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
 drivers/crypto/aesni_mb/meson.build                |   13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 ------------------
--
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
 8 files changed, 16 insertions(+), 2426 deletions(-)
 delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c
 delete mode 100644

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c

doc/guides/cryptodevs/aesni_mb.rst +0 -0
index 47f2ecc2f..66c44e03a 100644
@@ -57,10 +57,7 @@ Limitations
 
 * Chained mbufs are not supported.
 * Only in-place is currently supported (destination address is the same as

source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is

doc/guides/cryptodevs/aesni_mb.rst +0 -2
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or

later.

doc/guides/cryptodevs/aesni_mb.rst Limitations · line 60

Quoted 2 lines
doc/guides/cryptodevs/aesni_mb.rst +1 -1
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
+* Only support Intel multi buffer library version 0.52 or later.

I'd say it is not needed to state this as a limitation.

doc/guides/cryptodevs/aesni_mb.rst and the Multi-Buffer library version supported by them: · line 92

Quoted 8 lines

Installation

doc/guides/cryptodevs/aesni_mb.rst +1 -1
@@ -92,7 +89,8 @@ and the Multi-Buffer library version supported by them:
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
    18.02           0.48
-   18.05+          0.49+
+   18.05           0.49

Change to 18.05 - 19.02 0.49 - 0.52

doc/guides/cryptodevs/aesni_mb.rst and the Multi-Buffer library version supported by them: · line 96

Quoted 4 lines
doc/guides/cryptodevs/aesni_mb.rst +1 -0
+   19.05+          0.52+
    ==============  ============================
 
 

Apart from this:

author
#4 lore raw

PATCH v3 1/1 crypto/aesni_mb: support newer version library only

In reply to Fan Zhang

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---
v3:
- updated documentation.

v2:
- fixed incorrect version in documentation.

 doc/guides/cryptodevs/aesni_mb.rst                 |    7 +-
 doc/guides/rel_notes/deprecation.rst               |    3 -
 drivers/crypto/aesni_mb/Makefile                   |   21 +-
 drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
 drivers/crypto/aesni_mb/meson.build                |   13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 --------------------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
 8 files changed, 15 insertions(+), 2426 deletions(-)
 delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c
 delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c
doc/guides/cryptodevs/aesni_mb.rst +2 -5
index 47f2ecc2f..0e29ed126 100644
@@ -57,10 +57,6 @@ Limitations
 
 * Chained mbufs are not supported.
 * Only in-place is currently supported (destination address is the same as source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or later.
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
 
 
 Installation
@@ -92,7 +88,8 @@ and the Multi-Buffer library version supported by them:
    17.05 - 17.08   0.45 - 0.48
    17.11           0.47 - 0.48
    18.02           0.48
-   18.05+          0.49+
+   18.05 - 19.02   0.49 - 0.52
+   19.05+          0.52+
    ==============  ============================
 
 
doc/guides/rel_notes/deprecation.rst +0 -3
index 1b4fcb7e6..8adeaa552 100644
@@ -72,6 +72,3 @@ Deprecation Notices
   replace ``enum rte_meter_color`` in meter library in 19.05. This will help
   to consolidate color definition, which is currently replicated in many places,
   such as: rte_meter.h, rte_mtr.h, rte_tm.h.
-
-* crypto/aesni_mb: the minimum supported intel-ipsec-mb library version will be
-  changed from 0.49.0 to 0.52.0.
drivers/crypto/aesni_mb/Makefile +8 -13
index 8d2024c9e..f3035340a 100644
@@ -32,19 +32,14 @@ IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)
 IMB_VERSION_NUM = $(shell grep -e "IMB_VERSION_NUM" $(IMB_HDR) | cut -d' ' -f3)
 
 ifeq ($(IMB_VERSION),)
-	# files for older version of IMB
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-	SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-else
-	ifeq ($(shell expr $(IMB_VERSION_NUM) \>= 0x3400), 1)
-		# files for a new version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
-	else
-		# files for older version of IMB
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_compat.c
-		SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops_compat.c
-	endif
+$(error "IPSec_MB version >= 0.52 is required")
 endif
 
+ifeq ($(shell expr $(IMB_VERSION_NUM) \< 0x3400), 1)
+$(error "IPSec_MB version >= 0.52 is required")
+endif
+
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
+
 include $(RTE_SDK)/mk/rte.lib.mk
drivers/crypto/aesni_mb/aesni_mb_ops.h deleted +0 -302

302 lines not on this page · raw message

drivers/crypto/aesni_mb/meson.build +5 -8
index 6313c4bd0..fbc4878af 100644
@@ -10,16 +10,13 @@ else
 	imb_arr = cc.get_define('IMB_VERSION_STR',
 		prefix : '#include<intel-ipsec-mb.h>').split('"')
 
-	imb_ver =''.join(imb_arr)
+	imb_ver = ''.join(imb_arr)
 
-	if imb_ver.version_compare('>=' + IPSec_MB_ver_0_52)
-		message('Build for a new version of library IPSec_MB[' + imb_ver + ']')
-		sources = files('rte_aesni_mb_pmd.c',
-			'rte_aesni_mb_pmd_ops.c')
+	if (imb_ver == '') or (imb_ver.version_compare('<' + IPSec_MB_ver_0_52))
+		message('IPSec_MB version >= 0.52 is required')
+		build = false
 	else
-		sources = files('rte_aesni_mb_pmd_compat.c',
-			'rte_aesni_mb_pmd_ops_compat.c')
-		message('Build for older version of library IPSec_MB[' + imb_ver + ']')
+		sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c')
 	endif
 
 endif
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c deleted +0 -1313

1,313 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c deleted +0 -745

745 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +0 -37
index 61f419dda..4d439360f 100644
@@ -7,21 +7,6 @@
 
 #include <intel-ipsec-mb.h>
 
-
-/*
- * IMB_VERSION_NUM macro was introduced in version Multi-buffer 0.50,
- * so if macro is not defined, it means that the version is 0.49.
- */
-#if !defined(IMB_VERSION_NUM)
-#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
-#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0)
-#endif
-
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-#include "aesni_mb_ops.h"
-#endif
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_NOT_SUPPORTED = 0,
 	RTE_AESNI_MB_SSE,
@@ -29,8 +14,6 @@ enum aesni_mb_vector_mode {
 	RTE_AESNI_MB_AVX2,
 	RTE_AESNI_MB_AVX512
 };
-#endif
-
 
 #define CRYPTODEV_NAME_AESNI_MB_PMD	crypto_aesni_mb
 /**< AES-NI Multi buffer PMD device name */
@@ -109,13 +92,11 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_CMAC]	= 16,
 		[AES_GMAC]	= 12,
 		[NULL_HASH]	= 0,
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
 		[PLAIN_SHA_256]	= 32,
 		[PLAIN_SHA_384]	= 48,
 		[PLAIN_SHA_512]	= 64
-#endif
 	/**< Vector mode dependent pointer table of the multi-buffer APIs */
 
 };
@@ -149,10 +130,8 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
-#endif
 };
 
 /** AESNI Multi buffer queue pair */
@@ -160,10 +139,6 @@ struct aesni_mb_qp {
 	uint16_t id;
 	/**< Queue Pair Identifier */
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-#if IMB_VERSION_NUM < IMB_VERSION(0, 52, 0)
-	/**< Unique Queue Pair Name */
-	const struct aesni_mb_op_fns *op_fns;
-#endif
 	/**< Unique Queue Pair Name */
 	MB_MGR *mb_mgr;
 	/**< Multi-buffer instance */
@@ -277,22 +252,10 @@ struct aesni_mb_session {
 	} aead;
 } __rte_cache_aligned;
 
-
-
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
-/**
- *
- */
 extern int
 aesni_mb_set_session_parameters(const MB_MGR *mb_mgr,
 		struct aesni_mb_session *sess,
 		const struct rte_crypto_sym_xform *xform);
-#else
-extern int
-aesni_mb_set_session_parameters(const struct aesni_mb_op_fns *mb_ops,
-		struct aesni_mb_session *sess,
-		const struct rte_crypto_sym_xform *xform);
-#endif
 
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops;
Signature · 1 line
2.14.5
#5 lore raw
Quoted 56 lines · Fan Zhang

As stated in 19.02 deprecation notice, this patch updates the aesni_mb PMD to remove the support of older Intel-ipsec-mb library version eariler than 0.52.

---
v3:
- updated documentation.

v2:
- fixed incorrect version in documentation.

  doc/guides/cryptodevs/aesni_mb.rst                 |    7 +-
  doc/guides/rel_notes/deprecation.rst               |    3 -
  drivers/crypto/aesni_mb/Makefile                   |   21 +-
  drivers/crypto/aesni_mb/aesni_mb_ops.h             |  302 -----
  drivers/crypto/aesni_mb/meson.build                |   13 +-
  drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c  | 1313 --------------------
  .../crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c  |  745 -----------
  drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   37 -
  8 files changed, 15 insertions(+), 2426 deletions(-)

delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_compat.c delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops_compat.c

doc/guides/cryptodevs/aesni_mb.rst +2 -5
index 47f2ecc2f..0e29ed126 100644
@@ -57,10 +57,6 @@ Limitations
 
  * Chained mbufs are not supported.
  * Only in-place is currently supported (destination address is the same as source address).
-* RTE_CRYPTO_AEAD_AES_GCM only works properly when the multi-buffer library is
-  0.51.0 or newer.
-* RTE_CRYPTO_HASH_AES_GMAC is supported by library version v0.51 or later.
-* RTE_CRYPTO_HASH_SHA* is supported by library version v0.52 or later.
 
 
  Installation
@@ -92,7 +88,8 @@ and the Multi-Buffer library version supported by them:
     17.05 - 17.08   0.45 - 0.48
     17.11           0.47 - 0.48
     18.02           0.48
-   18.05+          0.49+
+   18.05 - 19.02   0.49 - 0.52
+   19.05+          0.52+
     ==============  ============================
 
 
doc/guides/rel_notes/deprecation.rst +0 -0
index 1b4fcb7e6..8adeaa552 100644

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 77

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +0 -3
@@ -72,6 +72,3 @@ Deprecation Notices
    replace ``enum rte_meter_color`` in meter library in 19.05. This will help
    to consolidate color definition, which is currently replicated in many places,
    such as: rte_meter.h, rte_mtr.h, rte_tm.h.
-
-* crypto/aesni_mb: the minimum supported intel-ipsec-mb library version will be
-  changed from 0.49.0 to 0.52.0.

I think this deserve to be updated in the release note as well.

#6 lore raw

Hi Akhil,

I have discussed with Ferruh in relation to the updating release note for this change.
However the change seems not apply to any section under the release note.

The change does not introduce new feature, nor breaks ABI/API - it only changes the requirement of the dependent external library version, and makefile/meson will pop up error when the library version is too old and prevents compiling.

Regards,
Fan

Quoted 10 lines

-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Tuesday, March 26, 2019 9:11 AM
To: Zhang, Roy Fan <[email protected]>; [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] crypto/aesni_mb: support newer version library only

Quoted 1 line

I think this deserve to be updated in the release note as well.

#7 lore raw
Quoted 6 lines · Roy Fan

Hi Akhil,

I have discussed with Ferruh in relation to the updating release note for this change.
However the change seems not apply to any section under the release note.

Quoted 7 lines

The change does not introduce new feature, nor breaks ABI/API - it only changes the requirement of the dependent external library version, and makefile/meson will pop up error when the library version is too old and prevents compiling.

Regards,
Fan

ok. I will pick the patch.

Quoted 10 lines
Quoted 10 lines

-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Tuesday, March 26, 2019 9:11 AM
To: Zhang, Roy Fan <[email protected]>; [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] crypto/aesni_mb: support newer version library only
I think this deserve to be updated in the release note as well.

Applied
#8 lore raw
Quoted 8 lines · Akhil Goyal
Quoted 6 lines · Roy Fan

Hi Akhil,

I have discussed with Ferruh in relation to the updating release note for this change.
However the change seems not apply to any section under the release note.

Quoted 17 lines
Quoted 7 lines

The change does not introduce new feature, nor breaks ABI/API - it only changes the requirement of the dependent external library version, and makefile/meson will pop up error when the library version is too old and prevents compiling.

Regards,
Fan

ok. I will pick the patch.

Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Tuesday, March 26, 2019 9:11 AM
To: Zhang, Roy Fan <[email protected]>; [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] crypto/aesni_mb: support newer version library only
I think this deserve to be updated in the release note as well.

Applied to dpdk-next-crypto

Thanks.