Signed-off-by: Ravi Kumar <ravi1.ku...@amd.com>
---
 drivers/crypto/ccp/ccp_crypto.c  | 28 ++++++++++++++--------------
 drivers/crypto/ccp/ccp_crypto.h  |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c | 10 +++++-----
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 1fc6569..254fed8 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1593,7 +1593,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                        ccp_cryptodev_driver_id);
        addr = session->auth.pre_compute;
 
        src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
@@ -1766,7 +1766,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
                                              op->sym->auth.data.offset);
@@ -1855,7 +1855,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
                                              op->sym->auth.data.offset);
@@ -1995,7 +1995,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
                                              op->sym->auth.data.offset);
@@ -2063,7 +2063,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
        key_addr = rte_mem_virt2phy(session->auth.key_ccp);
 
        src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
@@ -2215,7 +2215,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
        function.raw = 0;
 
        iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2303,7 +2303,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
        switch (session->cipher.um.des_mode) {
@@ -2406,7 +2406,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct 
ccp_queue *cmd_q)
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                        ccp_cryptodev_driver_id);
        iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
        key_addr = rte_mem_virt2phy(session->cipher.key_ccp);
 
@@ -2578,7 +2578,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        switch (session->cipher.algo) {
        case CCP_CIPHER_ALGO_AES_CBC:
@@ -2615,7 +2615,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        switch (session->auth.algo) {
        case CCP_AUTH_ALGO_SHA1:
@@ -2676,7 +2676,7 @@ ccp_crypto_combined(struct rte_crypto_op *op,
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        switch (session->auth.algo) {
        case CCP_AUTH_ALGO_AES_GCM:
@@ -2734,7 +2734,7 @@ process_ops_to_enqueue(const struct ccp_qp *qp,
        for (i = 0; i < nb_ops; i++) {
                session = (struct ccp_session *)get_session_private_data(
                                                 op[i]->sym->session,
-                                                cryptodev_driver_id);
+                                                ccp_cryptodev_driver_id);
                switch (session->cmd_id) {
                case CCP_CMD_CIPHER:
                        result = ccp_crypto_cipher(op[i], cmd_q, b_info);
@@ -2812,7 +2812,7 @@ static inline void ccp_auth_dq_prepare(struct 
rte_crypto_op *op)
 
        session = (struct ccp_session *)get_session_private_data(
                                         op->sym->session,
-                                        cryptodev_driver_id);
+                                       ccp_cryptodev_driver_id);
 
        if (session->cmd_id == CCP_CMD_COMBINED) {
                digest_data = op->sym->aead.digest.data;
@@ -2889,7 +2889,7 @@ ccp_prepare_ops(struct rte_crypto_op **op_d,
                op_d[i] = b_info->op[b_info->op_idx++];
                session = (struct ccp_session *)get_session_private_data(
                                                 op_d[i]->sym->session,
-                                                cryptodev_driver_id);
+                                               ccp_cryptodev_driver_id);
                switch (session->cmd_id) {
                case CCP_CMD_CIPHER:
                        op_d[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
diff --git a/drivers/crypto/ccp/ccp_crypto.h b/drivers/crypto/ccp/ccp_crypto.h
index 9d8d42e..ad3251b 100644
--- a/drivers/crypto/ccp/ccp_crypto.h
+++ b/drivers/crypto/ccp/ccp_crypto.h
@@ -340,7 +340,7 @@ struct ccp_session {
        uint32_t reserved;
 } __rte_cache_aligned;
 
-extern uint8_t cryptodev_driver_id;
+extern uint8_t ccp_cryptodev_driver_id;
 
 struct ccp_qp;
 
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 9410470..d46c07c 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -44,7 +44,7 @@
  * Global static parameter used to find if CCP device is already initialized.
  */
 static unsigned int ccp_pmd_init_done;
-uint8_t cryptodev_driver_id;
+uint8_t ccp_cryptodev_driver_id;
 
 static struct ccp_session *
 get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
@@ -58,7 +58,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
                sess = (struct ccp_session *)
                        get_session_private_data(
                                op->sym->session,
-                               cryptodev_driver_id);
+                               ccp_cryptodev_driver_id);
        } else {
                void *_sess;
                void *_sess_private_data = NULL;
@@ -77,7 +77,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
                        sess = NULL;
                }
                op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-               set_session_private_data(op->sym->session, cryptodev_driver_id,
+               set_session_private_data(op->sym->session, 
ccp_cryptodev_driver_id,
                                         _sess_private_data);
        }
 
@@ -203,7 +203,7 @@ cryptodev_ccp_create(const char *name,
        }
 
        printf("CCP : Crypto device count = %d\n", cryptodev_cnt);
-       dev->driver_id = cryptodev_driver_id;
+       dev->driver_id = ccp_cryptodev_driver_id;
 
        /* register rx/tx burst functions for data path */
        dev->dev_ops = ccp_pmd_ops;
@@ -278,4 +278,4 @@ static struct rte_vdev_driver cryptodev_ccp_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
        "max_nb_queue_pairs=<int> max_nb_sessions=<int> socket_id=<int>");
-RTE_PMD_REGISTER_CRYPTO_DRIVER(cryptodev_ccp_pmd_drv, cryptodev_driver_id);
+RTE_PMD_REGISTER_CRYPTO_DRIVER(cryptodev_ccp_pmd_drv, ccp_cryptodev_driver_id);
-- 
2.7.4

Reply via email to