Skip to content

Commit

Permalink
crypto/armv8: remove debug option
Browse files Browse the repository at this point in the history
[ upstream commit cc9035f ]

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: 169ca3d ("crypto/armv8: add PMD optimized for ARMv8 processors")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  • Loading branch information
Ruifeng Wang authored and kevintraynor committed Aug 27, 2020
1 parent 08eecae commit 249035b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion config/common_base
Expand Up @@ -502,7 +502,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
Expand Down
11 changes: 2 additions & 9 deletions drivers/crypto/armv8/rte_armv8_pmd_private.h
Expand Up @@ -13,7 +13,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), \
Expand All @@ -27,17 +26,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) */

Expand Down

0 comments on commit 249035b

Please sign in to comment.