Skip to contentSkip to conversation

crypto/armv8: fix typos and compilation

PATCH In review Ruifeng Wang 3 participants 11 messages Jul 27, 2020 – Jul 28, 2020 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/armv8: fix typos and compilation

Typo in debug log switch macro caused debug log cannot be enabled. Fixed the typo to match option defined in config file.

Typo in crypto dev name macro caused unexpected device name in log. Fixed the typo to log with correct device name.

Solved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’

  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")

---
https://mails.dpdk.org/archives/dev/2020-July/175241.html

 drivers/crypto/armv8/armv8_pmd_private.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +6 -6
index e08d0df78..b183c739b 100644
@@ -12,25 +12,25 @@
 
 #define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
 	RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
 			__func__, __LINE__, ## args)
 
-#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
+#ifdef RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG
 #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
 	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
 			__func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
 	RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
 			__func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_ASSERT(con)				\
 do {								\
 	if (!(con)) {						\
-		rte_panic("%s(): "				\
-		    con "condition failed, line %u", __func__);	\
+		rte_panic("condition failed, line %u",		\
+			__LINE__);				\
 	}							\
 } while (0)
 
Signature · 1 line
2.17.1
#1 lore raw

Hello Ruifeng,

Quoted 7 lines · Ruifeng Wang

Typo in debug log switch macro caused debug log cannot be enabled. Fixed the typo to match option defined in config file.

Typo in crypto dev name macro caused unexpected device name in log. Fixed the typo to log with correct device name.

Quoted 9 lines

Solved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’

  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Quoted 12 lines

---
https://mails.dpdk.org/archives/dev/2020-July/175241.html

 drivers/crypto/armv8/armv8_pmd_private.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +0 -0
index e08d0df78..b183c739b 100644

drivers/crypto/armv8/armv8_pmd_private.h line 17

Quoted 7 lines
drivers/crypto/armv8/armv8_pmd_private.h +1 -1
@@ -12,25 +12,25 @@
 
 #define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
        RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)
 

- Those macros can use a dedicated logtype for this driver rather than pollute the CRYPTODEV general logtype.

- Looking at their uses:
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)
drivers/crypto/armv8/rte_armv8_pmd.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("Invalid/unsupported operation");

drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(

drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
drivers/crypto/armv8/rte_armv8_pmd.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_INFO(
drivers/crypto/armv8/rte_armv8_pmd_ops.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("invalid session struct"); drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");

There is nothing for debug, and the rest of these messages are in setup steps. I would rather have them always enabled and remove the debug option entirely.

WDYT?

Quoted 13 lines
drivers/crypto/armv8/armv8_pmd_private.h +3 -3
-#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
+#ifdef RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG
 #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
        RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
        RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)

drivers/crypto/armv8/armv8_pmd_private.h line 35

Quoted 10 lines
drivers/crypto/armv8/armv8_pmd_private.h +2 -2
 
 #define ARMV8_CRYPTO_ASSERT(con)                               \
 do {                                                           \
        if (!(con)) {                                           \
-               rte_panic("%s(): "                              \
-                   con "condition failed, line %u", __func__); \
+               rte_panic("condition failed, line %u",          \
+                       __LINE__);                              \
        }                                                       \
 } while (0)

RTE_VERIFY does the same.

Signature · 1 line
David Marchand
#2 lore raw
Quoted 48 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Monday, July 27, 2020 5:39 PM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; dev <[email protected]>; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; dpdk stable <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] crypto/armv8: fix typos and compilation

Hello Ruifeng,

Quoted 10 lines · Ruifeng Wang

Typo in debug log switch macro caused debug log cannot be enabled. Fixed the typo to match option defined in config file.

Typo in crypto dev name macro caused unexpected device name in log. Fixed the typo to log with correct device name.

Solved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’

Quoted 7 lines
  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8

processors")
Cc: [email protected]

Quoted 14 lines

---
https://mails.dpdk.org/archives/dev/2020-July/175241.html

 drivers/crypto/armv8/armv8_pmd_private.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +0 -0
index e08d0df78..b183c739b 100644
@@ -12,25 +12,25 @@
 
Quoted 11 lines

drivers/crypto/armv8/armv8_pmd_private.h line 17

Quoted 6 lines
drivers/crypto/armv8/armv8_pmd_private.h +1 -1
 #define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
        RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)
 

- Those macros can use a dedicated logtype for this driver rather than pollute the CRYPTODEV general logtype.

Agreed. Will add a dedicated logtype for this driver.

Quoted 31 lines

- Looking at their uses:
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) drivers/crypto/armv8/armv8_pmd_private.h:#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)
drivers/crypto/armv8/rte_armv8_pmd.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR( drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("Invalid/unsupported operation");

drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd.c:           ARMV8_CRYPTO_LOG_ERR(

drivers/crypto/armv8/rte_armv8_pmd.c:
ARMV8_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
drivers/crypto/armv8/rte_armv8_pmd.c: ARMV8_CRYPTO_LOG_ERR(
drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_INFO( drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR( drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("invalid session struct"); drivers/crypto/armv8/rte_armv8_pmd_ops.c:
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");

Quoted 6 lines

There is nothing for debug, and the rest of these messages are in setup steps. I would rather have them always enabled and remove the debug option entirely.

WDYT?

Agreed. The logs are not in data path. They can be always enabled. Will change in next version.

Quoted 15 lines
Quoted 15 lines
drivers/crypto/armv8/armv8_pmd_private.h +3 -3
-#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
+#ifdef RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG
 #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
        RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
        RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-                       RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+                       RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
                        __func__, __LINE__, ## args)
 
Quoted 13 lines

drivers/crypto/armv8/armv8_pmd_private.h line 35

Quoted 9 lines
drivers/crypto/armv8/armv8_pmd_private.h +2 -2
 #define ARMV8_CRYPTO_ASSERT(con)                               \
 do {                                                           \
        if (!(con)) {                                           \
-               rte_panic("%s(): "                              \
-                   con "condition failed, line %u", __func__); \
+               rte_panic("condition failed, line %u",          \
+                       __LINE__);                              \
        }                                                       \
 } while (0)

RTE_VERIFY does the same.

Yes. Will switch to RTE_VERIFY in next version.

Quoted 3 lines

--
David Marchand

#3 lore raw

v2 cover armv8 crypto PMD

In reply to Ruifeng Wang

This series updated log system used by armv8 crypto PMD. The config option used to enable and disable logs was removed, and logs are always enabled.
Created dedicated log type for the PMD and not to use crypto dev generic log type.

v2:
Removed config option to always enable log.
Added new log type for the PMD.
Removed redundant assert definition.

Ruifeng Wang (3):
crypto/armv8: remove log debug option crypto/armv8: use dedicated log type crypto/armv8: remove redundant assert definition

 config/common_base                       |  1 -
 drivers/crypto/armv8/armv8_pmd_private.h | 38 +++++++++---------------
 drivers/crypto/armv8/rte_armv8_pmd.c     |  4 ++-
 3 files changed, 17 insertions(+), 26 deletions(-)
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 1/3 crypto/armv8: remove log debug option

Typo in debug log switch macro caused debug log cannot be enabled. Since no log used in data path, remove the debug option entirely and have logs always enabled.

Resolved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’

  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
---
 config/common_base                       |  1 -
 drivers/crypto/armv8/armv8_pmd_private.h | 11 ++---------
 2 files changed, 2 insertions(+), 10 deletions(-)
config/common_base +0 -1
index f76585f16..c70b8f68b 100644
@@ -605,7 +605,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
 # Compile PMD for ARMv8 Crypto device
 #
 CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n
-CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 
 #
 # Compile NXP CAAM JR crypto Driver
drivers/crypto/armv8/armv8_pmd_private.h +2 -9
index e08d0df78..19940809b 100644
@@ -15,7 +15,6 @@
 			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
 			__func__, __LINE__, ## args)
 
-#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
 #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
 	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
 			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
@@ -29,17 +28,11 @@
 #define ARMV8_CRYPTO_ASSERT(con)				\
 do {								\
 	if (!(con)) {						\
-		rte_panic("%s(): "				\
-		    con "condition failed, line %u", __func__);	\
+		rte_panic("condition failed, line %u",		\
+			__LINE__);				\
 	}							\
 } while (0)
 
-#else
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)
-#define ARMV8_CRYPTO_ASSERT(con)
-#endif
-
 #define NBBY		8		/* Number of bits in a byte */
 #define BYTE_LENGTH(x)	((x) / NBBY)	/* Number of bytes in x (round down) */
 
Signature · 1 line
2.17.1
Acked-by on v2 1/3
#5 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] crypto/armv8: remove log debug option

Quoted 10 lines

Typo in debug log switch macro caused debug log cannot be enabled. Since no log used in data path, remove the debug option entirely and have logs always enabled.

Resolved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’

  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^
Quoted 7 lines
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8

processors")
Cc: [email protected]

---

#6 lore raw

PATCH v2 2/3 crypto/armv8: use dedicated log type

In reply to Ruifeng Wang

armv8 crypto PMD used CRYPTODEV general log type.
Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.

Typo in crypto dev name macro caused unexpected device name in log. Fixed the typo to log with correct device name.

Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
---
 drivers/crypto/armv8/armv8_pmd_private.h | 23 ++++++++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c     |  2 ++
 2 files changed, 16 insertions(+), 9 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +14 -9
index 19940809b..709b3d536 100644
@@ -10,19 +10,24 @@
 #define CRYPTODEV_NAME_ARMV8_PMD	crypto_armv8
 /**< ARMv8 Crypto PMD device name */
 
-#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
-	RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+extern int crypto_armv8_log_type;
+
+#define ARMV8_CRYPTO_LOG_ERR(fmt, args...)			\
+	rte_log(RTE_LOG_ERR, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
-	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)			\
+	rte_log(RTE_LOG_INFO, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
-	RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)			\
+	rte_log(RTE_LOG_DEBUG, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_ASSERT(con)				\
drivers/crypto/armv8/rte_armv8_pmd.c +2 -0
index 8b212772f..a2b08d818 100644
@@ -861,6 +861,8 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
+RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
Signature · 1 line
2.17.1
Acked-by on v2 2/3
#7 lore raw

Re: [dpdk-dev] [PATCH v2 2/3] crypto/armv8: use dedicated log type

Quoted 6 lines

armv8 crypto PMD used CRYPTODEV general log type.
Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.

Typo in crypto dev name macro caused unexpected device name in log. Fixed the typo to log with correct device name.

Quoted 7 lines
Fixes 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8

processors")
Cc: [email protected]

---

#8 lore raw

PATCH v2 3/3 crypto/armv8: remove redundant assert definition

In reply to Ruifeng Wang

No need to define assert function in PMD since RTE provides the same. Remove private definition and use RTE_VERIFY instead.

---
 drivers/crypto/armv8/armv8_pmd_private.h | 8 --------
 drivers/crypto/armv8/rte_armv8_pmd.c     | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +0 -8
index 709b3d536..66b03fb92 100644
@@ -30,14 +30,6 @@ extern int crypto_armv8_log_type;
 			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_ASSERT(con)				\
-do {								\
-	if (!(con)) {						\
-		rte_panic("condition failed, line %u",		\
-			__LINE__);				\
-	}							\
-} while (0)
-
 #define NBBY		8		/* Number of bits in a byte */
 #define BYTE_LENGTH(x)	((x) / NBBY)	/* Number of bytes in x (round down) */
 
drivers/crypto/armv8/rte_armv8_pmd.c +1 -1
index a2b08d818..c95729db5 100644
@@ -630,7 +630,7 @@ process_armv8_chained_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
 	arg.cipher.key = sess->cipher.key.data;
 	/* Acquire combined mode function */
 	crypto_func = sess->crypto_func;
-	ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
+	RTE_VERIFY(crypto_func != NULL);
 	error = crypto_func(csrc, cdst, clen, asrc, adst, alen, &arg);
 	if (error != 0) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
Signature · 1 line
2.17.1
Acked-by on v2 3/3
#9 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] crypto/armv8: remove redundant assert definition

Quoted 10 lines

No need to define assert function in PMD since RTE provides the same. Remove private definition and use RTE_VERIFY instead.

---
 drivers/crypto/armv8/armv8_pmd_private.h | 8 --------
 drivers/crypto/armv8/rte_armv8_pmd.c     | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)
#10 lore raw

Re: [dpdk-dev] [PATCH v2 0/3] armv8 crypto PMD

In reply to Ruifeng Wang
Quoted 7 lines

This series updated log system used by armv8 crypto PMD. The config option used to enable and disable logs was removed, and logs are always enabled.
Created dedicated log type for the PMD and not to use crypto dev generic log type.

Series applied to dpdk-next-crypto

Thanks.