[PATCH 5/6] crypto/ipsec_mb: remove security lib presence checks

Maxime Coquelin maxime.coquelin at redhat.com
Fri Jun 9 15:54:49 CEST 2023


Since security library is a required dependency for
building ipsec_mb crypto PMD, remove useless check before
security lib headers inclusion.

The patch also takes the opportunity to remove unused
related defines.

Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_private.h  | 3 ---
 drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index ab27214f2c..52722f94a0 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -13,11 +13,8 @@
 #include <cryptodev_pmd.h>
 #include <bus_vdev_driver.h>
 
-#if defined(RTE_LIB_SECURITY)
-#define IPSEC_MB_DOCSIS_SEC_ENABLED 1
 #include <rte_security.h>
 #include <rte_security_driver.h>
-#endif
 
 /* Maximum length for digest */
 #define DIGEST_LENGTH_MAX 64
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
index 8a7c74f621..fee02306c1 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
@@ -5,12 +5,10 @@
 #ifndef _PMD_AESNI_MB_PRIV_H_
 #define _PMD_AESNI_MB_PRIV_H_
 
-#if defined(RTE_LIB_SECURITY)
 #define AESNI_MB_DOCSIS_SEC_ENABLED 1
 #include <rte_security.h>
 #include <rte_security_driver.h>
 #include <rte_ether.h>
-#endif
 
 #include "ipsec_mb_private.h"
 
@@ -960,7 +958,6 @@ typedef void (*hash_one_block_t)(const void *data, void *digest);
 typedef void (*aes_keyexp_t)(const void *key, void *enc_exp_keys,
 			void *dec_exp_keys);
 
-#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
 static const struct rte_cryptodev_capabilities
 					aesni_mb_pmd_security_crypto_cap[] = {
 	{	/* AES DOCSIS BPI */
@@ -1008,6 +1005,5 @@ static const struct rte_security_capability aesni_mb_pmd_security_cap[] = {
 		.action = RTE_SECURITY_ACTION_TYPE_NONE
 	}
 };
-#endif
 
 #endif /* _PMD_AESNI_MB_PRIV_H_ */
-- 
2.40.1



More information about the dev mailing list