crypto/dpaa2_sec: fix enum conversion for GCM

dpaa2_sec/dpaa2_sec_dpseci.c:1287:25: error: implicit conversion from
enumeration type 'enum rte_crypto_aead_algorithm' to different enumeration
type 'enum rte_crypto_cipher_algorithm' [-Werror,-Wenum-conversion]
                session->cipher_alg = RTE_CRYPTO_AEAD_AES_GCM;

Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Hemant Agrawal 2018-01-25 15:23:29 +05:30 committed by Thomas Monjalon
parent c25a37d759
commit 681271e858
2 changed files with 2 additions and 1 deletions

View File

@ -1795,7 +1795,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
case RTE_CRYPTO_AEAD_AES_GCM:
aeaddata.algtype = OP_ALG_ALGSEL_AES;
aeaddata.algmode = OP_ALG_AAI_GCM;
session->cipher_alg = RTE_CRYPTO_AEAD_AES_GCM;
session->aead_alg = RTE_CRYPTO_AEAD_AES_GCM;
break;
case RTE_CRYPTO_AEAD_AES_CCM:
RTE_LOG(ERR, PMD, "Crypto: Unsupported AEAD alg %u\n",

View File

@ -143,6 +143,7 @@ typedef struct dpaa2_sec_session_entry {
uint8_t dir; /*!< Operation Direction */
enum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/
enum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/
enum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/
union {
struct {
uint8_t *data; /**< pointer to key data */