crypto/dpaa2_sec: fix enum conversion for GCM
authorHemant Agrawal <hemant.agrawal@nxp.com>
Thu, 25 Jan 2018 09:53:29 +0000 (15:23 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 30 Jan 2018 15:54:50 +0000 (16:54 +0100)
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>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h

index 200a9f3..9a790dd 100644 (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",
index c76b082..e8ac95b 100644 (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 */