[PATCH v3 3/3] drivers/crypto: use RTE_BIT64 in initializations of hash_algos
    Andre Muezerie 
    andremue at linux.microsoft.com
       
    Mon Jan 27 20:33:09 CET 2025
    
    
  
This was found during code review of similar issues.
Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
---
 drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c | 4 ++--
 drivers/crypto/openssl/rte_openssl_pmd_ops.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
index 4394513002..e78bc37c37 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
@@ -1207,8 +1207,8 @@ static const struct rte_cryptodev_capabilities caps_eddsa[] = {
 		{.asym = {
 			.xform_capa = {
 				.xform_type = RTE_CRYPTO_ASYM_XFORM_EDDSA,
-				.hash_algos = (1 << RTE_CRYPTO_AUTH_SHA512 |
-					       1 << RTE_CRYPTO_AUTH_SHAKE_256),
+				.hash_algos = (RTE_BIT64(RTE_CRYPTO_AUTH_SHA512) |
+					       RTE_BIT64(RTE_CRYPTO_AUTH_SHAKE_256)),
 				.op_types = ((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
 					     (1 << RTE_CRYPTO_ASYM_OP_VERIFY))
 			}
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 18f096abfd..04e018f3df 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -630,8 +630,8 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
 		{.asym = {
 			.xform_capa = {
 				.xform_type = RTE_CRYPTO_ASYM_XFORM_EDDSA,
-				.hash_algos = (1 << RTE_CRYPTO_AUTH_SHA512 |
-					       1 << RTE_CRYPTO_AUTH_SHAKE_256),
+				.hash_algos = (RTE_BIT64(RTE_CRYPTO_AUTH_SHA512) |
+					       RTE_BIT64(RTE_CRYPTO_AUTH_SHAKE_256)),
 				.op_types =
 				((1<<RTE_CRYPTO_ASYM_OP_SIGN) |
 				 (1 << RTE_CRYPTO_ASYM_OP_VERIFY)),
-- 
2.47.2.vfs.0.1
    
    
More information about the dev
mailing list