Skip to contentSkip to conversation

crypto/aesni_mb: fix missed wrapping

PATCH In review Fan Zhang 2 participants 2 messages Dec 18, 2018 Crypto API

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 crypto/aesni_mb: fix missed wrapping

This patch fixes the missed macro check of intel-ipsec-mb version. Since plain SHA is supported only in 0.52, without a marco to wrap the newly introduced definitions will cause the failed compile if intel-ipsec-mb older than 0.52 is installed.

Fixes 9d8dd0c5af95 ("crypto/aesni_mb: support plain sha")
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +2 -0
index 6f4f5eeea..781d3ea31 100644
@@ -109,11 +109,13 @@ 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 */
 
 };
Signature · 1 line
2.13.6
#1 lore raw
Quoted 10 lines · Fan Zhang

This patch fixes the missed macro check of intel-ipsec-mb version. Since plain SHA is supported only in 0.52, without a marco to wrap the newly introduced definitions will cause the failed compile if intel-ipsec-mb older than 0.52 is installed.

Fixes 9d8dd0c5af95 ("crypto/aesni_mb: support plain sha")

---

merged with original commit on dpdk-next-crypto