cryptodev: rename PMD symmetric session API
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 5 Jul 2018 02:08:04 +0000 (03:08 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 11 Jul 2018 01:57:24 +0000 (03:57 +0200)
The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
32 files changed:
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/armv8/rte_armv8_pmd_ops.c
drivers/crypto/ccp/ccp_crypto.c
drivers/crypto/ccp/ccp_pmd_ops.c
drivers/crypto/ccp/rte_ccp_pmd.c
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/dpaa_sec/dpaa_sec.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
drivers/crypto/mvsam/rte_mrvl_pmd.c
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/null/null_crypto_pmd_ops.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/openssl/rte_openssl_pmd_ops.c
drivers/crypto/qat/qat_sym.c
drivers/crypto/qat/qat_sym.h
drivers/crypto/qat/qat_sym_pmd.c
drivers/crypto/qat/qat_sym_session.c
drivers/crypto/scheduler/scheduler_pmd_ops.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
drivers/crypto/virtio/virtio_cryptodev.c
drivers/crypto/virtio/virtio_rxtx.c
drivers/crypto/zuc/rte_zuc_pmd.c
drivers/crypto/zuc/rte_zuc_pmd_ops.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev_pmd.h

index 456ab95..5a77a34 100644 (file)
@@ -127,7 +127,7 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(sym_op->session != NULL))
                        sess = (struct aesni_gcm_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        sym_op->session,
                                        cryptodev_driver_id);
        } else  {
@@ -149,8 +149,8 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
                        sess = NULL;
                }
                sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-               set_session_private_data(sym_op->session, cryptodev_driver_id,
-                       _sess_private_data);
+               set_sym_session_private_data(sym_op->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
index 489d2e0..b6b4dd0 100644 (file)
@@ -251,14 +251,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -287,7 +287,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                        sess_private_data);
 
        return 0;
@@ -295,17 +295,17 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct aesni_gcm_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -325,9 +325,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
                .queue_pair_release     = aesni_gcm_pmd_qp_release,
                .queue_pair_count       = aesni_gcm_pmd_qp_count,
 
-               .session_get_size       = aesni_gcm_pmd_session_get_size,
-               .session_configure      = aesni_gcm_pmd_session_configure,
-               .session_clear          = aesni_gcm_pmd_session_clear
+               .sym_session_get_size   = aesni_gcm_pmd_sym_session_get_size,
+               .sym_session_configure  = aesni_gcm_pmd_sym_session_configure,
+               .sym_session_clear      = aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
index 17ac43f..85b37cd 100644 (file)
@@ -458,7 +458,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(op->sym->session != NULL))
                        sess = (struct aesni_mb_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
        } else {
@@ -480,8 +480,8 @@ get_session(struct aesni_mb_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
@@ -658,7 +658,7 @@ static inline struct rte_crypto_op *
 post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 {
        struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
-       struct aesni_mb_session *sess = get_session_private_data(
+       struct aesni_mb_session *sess = get_sym_session_private_data(
                                                        op->sym->session,
                                                        cryptodev_driver_id);
 
index b806c4d..fa3e963 100644 (file)
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -555,7 +555,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                        sess_private_data);
 
        return 0;
@@ -563,17 +563,17 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct aesni_mb_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
                .queue_pair_release     = aesni_mb_pmd_qp_release,
                .queue_pair_count       = aesni_mb_pmd_qp_count,
 
-               .session_get_size       = aesni_mb_pmd_session_get_size,
-               .session_configure      = aesni_mb_pmd_session_configure,
-               .session_clear          = aesni_mb_pmd_session_clear
+               .sym_session_get_size   = aesni_mb_pmd_sym_session_get_size,
+               .sym_session_configure  = aesni_mb_pmd_sym_session_configure,
+               .sym_session_clear      = aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
index db0d8a2..9d15fee 100644 (file)
@@ -502,7 +502,7 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
                /* get existing session */
                if (likely(op->sym->session != NULL)) {
                        sess = (struct armv8_crypto_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
                }
@@ -526,8 +526,8 @@ get_session(struct armv8_crypto_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
index 5e8a5a2..ae03117 100644 (file)
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -302,7 +302,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                        sess_private_data);
 
        return 0;
@@ -310,17 +310,17 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
                .queue_pair_release     = armv8_crypto_pmd_qp_release,
                .queue_pair_count       = armv8_crypto_pmd_qp_count,
 
-               .session_get_size       = armv8_crypto_pmd_session_get_size,
-               .session_configure      = armv8_crypto_pmd_session_configure,
-               .session_clear          = armv8_crypto_pmd_session_clear
+               .sym_session_get_size   = armv8_crypto_pmd_sym_session_get_size,
+               .sym_session_configure  = armv8_crypto_pmd_sym_session_configure,
+               .sym_session_clear      = armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
index 3ce0f39..19ae915 100644 (file)
@@ -1566,7 +1566,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
        void *append_ptr;
        uint8_t *addr;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                         ccp_cryptodev_driver_id);
        addr = session->auth.pre_compute;
@@ -1739,7 +1739,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
        void *append_ptr;
        uint64_t auth_msg_bits;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -1828,7 +1828,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
        uint32_t tail;
        phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -1968,7 +1968,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
        uint32_t tail;
        phys_addr_t src_addr, dest_addr, ctx_paddr;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -2036,7 +2036,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
        phys_addr_t src_addr, dest_addr, key_addr;
        int length, non_align_len;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
        key_addr = rte_mem_virt2phy(session->auth.key_ccp);
@@ -2188,7 +2188,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
        phys_addr_t src_addr, dest_addr, key_addr;
        uint8_t *iv;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
        function.raw = 0;
@@ -2276,7 +2276,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
        uint8_t *iv;
        phys_addr_t src_addr, dest_addr, key_addr;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -2379,7 +2379,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
        phys_addr_t digest_dest_addr;
        int length, non_align_len;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                         ccp_cryptodev_driver_id);
        iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2546,7 +2546,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
        int result = 0;
        struct ccp_session *session;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                         ccp_cryptodev_driver_id);
 
@@ -2584,7 +2584,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
        int result = 0;
        struct ccp_session *session;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -2654,7 +2654,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
        int result = 0;
        struct ccp_session *session;
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                        op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -2711,7 +2711,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
        b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
                                         Q_DESC_SIZE);
        for (i = 0; i < nb_ops; i++) {
-               session = (struct ccp_session *)get_session_private_data(
+               session = (struct ccp_session *)get_sym_session_private_data(
                                                 op[i]->sym->session,
                                                 ccp_cryptodev_driver_id);
                switch (session->cmd_id) {
@@ -2787,7 +2787,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
        int offset, digest_offset;
        uint8_t digest_le[64];
 
-       session = (struct ccp_session *)get_session_private_data(
+       session = (struct ccp_session *)get_sym_session_private_data(
                                         op->sym->session,
                                        ccp_cryptodev_driver_id);
 
@@ -2863,7 +2863,7 @@ ccp_prepare_ops(struct ccp_qp *qp,
 
        for (i = 0; i < min_ops; i++) {
                op_d[i] = b_info->op[b_info->op_idx++];
-               session = (struct ccp_session *)get_session_private_data(
+               session = (struct ccp_session *)get_sym_session_private_data(
                                                 op_d[i]->sym->session,
                                                ccp_cryptodev_driver_id);
                switch (session->cmd_id) {
index 1cb9444..6984913 100644 (file)
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
                          struct rte_crypto_sym_xform *xform,
                          struct rte_cryptodev_sym_session *sess,
                          struct rte_mempool *mempool)
@@ -788,25 +788,25 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
                rte_mempool_put(mempool, sess_private_data);
                return ret;
        }
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                                 sess_private_data);
 
        return 0;
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
                      struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        if (sess_priv) {
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
                rte_mempool_put(sess_mp, sess_priv);
                memset(sess_priv, 0, sizeof(struct ccp_session));
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
        }
 }
 
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
                .queue_pair_release     = ccp_pmd_qp_release,
                .queue_pair_count       = ccp_pmd_qp_count,
 
-               .session_get_size       = ccp_pmd_session_get_size,
-               .session_configure      = ccp_pmd_session_configure,
-               .session_clear          = ccp_pmd_session_clear,
+               .sym_session_get_size   = ccp_pmd_sym_session_get_size,
+               .sym_session_configure  = ccp_pmd_sym_session_configure,
+               .sym_session_clear      = ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
index d70640f..92d8a95 100644 (file)
@@ -160,7 +160,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
                        return NULL;
 
                sess = (struct ccp_session *)
-                       get_session_private_data(
+                       get_sym_session_private_data(
                                op->sym->session,
                                ccp_cryptodev_driver_id);
        } else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
@@ -183,7 +183,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,
+               set_sym_session_private_data(op->sym->session,
                                         ccp_cryptodev_driver_id,
                                         _sess_private_data);
        }
index 51c7861..d769a9c 100644 (file)
@@ -1080,7 +1080,7 @@ build_sec_fd(struct rte_crypto_op *op,
        PMD_INIT_FUNC_TRACE();
 
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
-               sess = (dpaa2_sec_session *)get_session_private_data(
+               sess = (dpaa2_sec_session *)get_sym_session_private_data(
                                op->sym->session, cryptodev_driver_id);
        else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
                sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -2457,7 +2457,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
@@ -2465,12 +2465,12 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        PMD_INIT_FUNC_TRACE();
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
        dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
 
        if (sess_priv) {
@@ -2479,7 +2479,7 @@ dpaa2_sec_session_clear(struct rte_cryptodev *dev,
                rte_free(s->auth_key.data);
                memset(sess, 0, sizeof(dpaa2_sec_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
        .queue_pair_setup     = dpaa2_sec_queue_pair_setup,
        .queue_pair_release   = dpaa2_sec_queue_pair_release,
        .queue_pair_count     = dpaa2_sec_queue_pair_count,
-       .session_get_size     = dpaa2_sec_session_get_size,
-       .session_configure    = dpaa2_sec_session_configure,
-       .session_clear        = dpaa2_sec_session_clear,
+       .sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+       .sym_session_configure    = dpaa2_sec_sym_session_configure,
+       .sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
index a83dd18..c00197e 100644 (file)
@@ -1416,7 +1416,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
                        switch (op->sess_type) {
                        case RTE_CRYPTO_OP_WITH_SESSION:
                                ses = (dpaa_sec_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                                        op->sym->session,
                                                        cryptodev_driver_id);
                                break;
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ err1:
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -1835,7 +1835,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                        sess_private_data);
 
 
@@ -1844,12 +1844,12 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        struct dpaa_sec_dev_private *qi = dev->data->dev_private;
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        PMD_INIT_FUNC_TRACE();
 
@@ -1863,7 +1863,7 @@ dpaa_sec_session_clear(struct rte_cryptodev *dev,
                rte_free(s->cipher_key.data);
                rte_free(s->auth_key.data);
                memset(s, 0, sizeof(dpaa_sec_session));
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
        .queue_pair_setup     = dpaa_sec_queue_pair_setup,
        .queue_pair_release   = dpaa_sec_queue_pair_release,
        .queue_pair_count     = dpaa_sec_queue_pair_count,
-       .session_get_size     = dpaa_sec_session_get_size,
-       .session_configure    = dpaa_sec_session_configure,
-       .session_clear        = dpaa_sec_session_clear
+       .sym_session_get_size     = dpaa_sec_sym_session_get_size,
+       .sym_session_configure    = dpaa_sec_sym_session_configure,
+       .sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
index 9eb43b2..5c9d54b 100644 (file)
@@ -135,7 +135,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(op->sym->session != NULL))
                        sess = (struct kasumi_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
        } else {
@@ -157,8 +157,8 @@ kasumi_get_session(struct kasumi_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
index c7556d4..9e4bf1b 100644 (file)
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -273,7 +273,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
@@ -281,17 +281,17 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct kasumi_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
                .queue_pair_release = kasumi_pmd_qp_release,
                .queue_pair_count   = kasumi_pmd_qp_count,
 
-               .session_get_size   = kasumi_pmd_session_get_size,
-               .session_configure  = kasumi_pmd_session_configure,
-               .session_clear      = kasumi_pmd_session_clear
+               .sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+               .sym_session_configure  = kasumi_pmd_sym_session_configure,
+               .sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
index a7f5389..73eff75 100644 (file)
@@ -447,7 +447,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,
                return -EINVAL;
        }
 
-       sess = (struct mrvl_crypto_session *)get_session_private_data(
+       sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
                        op->sym->session, cryptodev_driver_id);
        if (unlikely(sess == NULL)) {
                MRVL_CRYPTO_LOG_ERR("Session was not created for this device");
index f83a611..c045562 100644 (file)
@@ -612,7 +612,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
        return sizeof(struct mrvl_crypto_session);
 }
@@ -625,7 +625,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mp)
@@ -653,7 +653,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id, sess_private_data);
+       set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
        mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
        if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -672,12 +672,12 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
 
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
@@ -691,7 +691,7 @@ mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
 
                memset(sess, 0, sizeof(struct mrvl_crypto_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -714,9 +714,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
                .queue_pair_release     = mrvl_crypto_pmd_qp_release,
                .queue_pair_count       = mrvl_crypto_pmd_qp_count,
 
-               .session_get_size       = mrvl_crypto_pmd_session_get_size,
-               .session_configure      = mrvl_crypto_pmd_session_configure,
-               .session_clear          = mrvl_crypto_pmd_session_clear
+               .sym_session_get_size   = mrvl_crypto_pmd_sym_session_get_size,
+               .sym_session_configure  = mrvl_crypto_pmd_sym_session_configure,
+               .sym_session_clear      = mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
index 3d7caf1..fca8e35 100644 (file)
@@ -78,7 +78,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(sym_op->session != NULL))
                        sess = (struct null_crypto_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        sym_op->session, cryptodev_driver_id);
        } else {
                void *_sess = NULL;
@@ -99,8 +99,8 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
                        sess = NULL;
                }
                sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-               set_session_private_data(sym_op->session, cryptodev_driver_id,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        return sess;
index 66bd62b..bb2b6e1 100644 (file)
@@ -250,14 +250,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mp)
@@ -285,7 +285,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
@@ -293,17 +293,17 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct null_crypto_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -323,9 +323,9 @@ struct rte_cryptodev_ops pmd_ops = {
                .queue_pair_release     = null_crypto_pmd_qp_release,
                .queue_pair_count       = null_crypto_pmd_qp_count,
 
-               .session_get_size       = null_crypto_pmd_session_get_size,
-               .session_configure      = null_crypto_pmd_session_configure,
-               .session_clear          = null_crypto_pmd_session_clear
+               .sym_session_get_size   = null_crypto_pmd_sym_session_get_size,
+               .sym_session_configure  = null_crypto_pmd_sym_session_configure,
+               .sym_session_clear      = null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
index 2cbe940..5228b92 100644 (file)
@@ -736,7 +736,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
                /* get existing session */
                if (likely(op->sym->session != NULL))
                        sess = (struct openssl_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
        } else {
@@ -759,8 +759,8 @@ get_session(struct openssl_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (sess == NULL)
index 20d4e26..5335685 100644 (file)
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -692,7 +692,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                        sess_private_data);
 
        return 0;
@@ -701,18 +701,18 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                openssl_reset_session(sess_priv);
                memset(sess_priv, 0, sizeof(struct openssl_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
                .queue_pair_release     = openssl_pmd_qp_release,
                .queue_pair_count       = openssl_pmd_qp_count,
 
-               .session_get_size       = openssl_pmd_session_get_size,
-               .session_configure      = openssl_pmd_session_configure,
-               .session_clear          = openssl_pmd_session_clear
+               .sym_session_get_size   = openssl_pmd_sym_session_get_size,
+               .sym_session_configure  = openssl_pmd_sym_session_configure,
+               .sym_session_clear      = openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
index 17d63eb..aa6eeb0 100644 (file)
@@ -174,7 +174,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
                return -EINVAL;
        }
 
-       ctx = (struct qat_sym_session *)get_session_private_data(
+       ctx = (struct qat_sym_session *)get_sym_session_private_data(
                        op->sym->session, cryptodev_qat_driver_id);
 
        if (unlikely(ctx == NULL)) {
index d425892..e4e1ae8 100644 (file)
@@ -143,7 +143,7 @@ qat_sym_process_response(void **op, uint8_t *resp)
                rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
        } else {
                struct qat_sym_session *sess = (struct qat_sym_session *)
-                                               get_session_private_data(
+                                               get_sym_session_private_data(
                                                rx_op->sym->session,
                                                cryptodev_qat_driver_id);
 
index c9fc1a8..96f442e 100644 (file)
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
                .queue_pair_count       = NULL,
 
                /* Crypto related operations */
-               .session_get_size       = qat_sym_session_get_private_size,
-               .session_configure      = qat_sym_session_configure,
-               .session_clear          = qat_sym_session_clear
+               .sym_session_get_size   = qat_sym_session_get_private_size,
+               .sym_session_configure  = qat_sym_session_configure,
+               .sym_session_clear      = qat_sym_session_clear
 };
 
 static uint16_t
index dc1c200..4d975ae 100644 (file)
@@ -112,7 +112,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
        struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
 
        if (sess_priv) {
@@ -121,7 +121,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
                memset(s, 0, qat_sym_session_get_private_size(dev));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -396,7 +396,7 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
index 9b2f99e..a74216a 100644 (file)
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        struct scheduler_ctx *sched_ctx = dev->data->dev_private;
        uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
        for (i = 0; i < sched_ctx->nb_slaves; i++) {
                uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
                struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-               uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+               uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
                if (max_priv_sess_size < priv_sess_size)
                        max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
        struct rte_crypto_sym_xform *xform,
        struct rte_cryptodev_sym_session *sess,
        struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
                .queue_pair_release     = scheduler_pmd_qp_release,
                .queue_pair_count       = scheduler_pmd_qp_count,
 
-               .session_get_size       = scheduler_pmd_session_get_size,
-               .session_configure      = scheduler_pmd_session_configure,
-               .session_clear          = scheduler_pmd_session_clear,
+               .sym_session_get_size   = scheduler_pmd_sym_session_get_size,
+               .sym_session_configure  = scheduler_pmd_sym_session_configure,
+               .sym_session_clear      = scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
index 7db5d40..c8170cd 100644 (file)
@@ -137,7 +137,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(op->sym->session != NULL))
                        sess = (struct snow3g_session *)
-                                       get_session_private_data(
+                                       get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
        } else {
@@ -159,8 +159,8 @@ snow3g_get_session(struct snow3g_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
index 26c84b6..cfbc952 100644 (file)
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
@@ -283,17 +283,17 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct snow3g_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
                .queue_pair_release = snow3g_pmd_qp_release,
                .queue_pair_count   = snow3g_pmd_qp_count,
 
-               .session_get_size   = snow3g_pmd_session_get_size,
-               .session_configure  = snow3g_pmd_session_configure,
-               .session_clear      = snow3g_pmd_session_clear
+               .sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+               .sym_session_configure  = snow3g_pmd_sym_session_configure,
+               .sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
index be6d5d7..5cadfcb 100644 (file)
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
        .queue_pair_count                = NULL,
 
        /* Crypto related operations */
-       .session_get_size       = virtio_crypto_sym_get_session_private_size,
-       .session_configure      = virtio_crypto_sym_configure_session,
-       .session_clear          = virtio_crypto_sym_clear_session
+       .sym_session_get_size           = virtio_crypto_sym_get_session_private_size,
+       .sym_session_configure          = virtio_crypto_sym_configure_session,
+       .sym_session_clear              = virtio_crypto_sym_clear_session
 };
 
 static void
@@ -958,7 +958,7 @@ virtio_crypto_sym_clear_session(
 
        hw = dev->data->dev_private;
        vq = hw->cvq;
-       session = (struct virtio_crypto_session *)get_session_private_data(
+       session = (struct virtio_crypto_session *)get_sym_session_private_data(
                sess, cryptodev_virtio_driver_id);
        if (session == NULL) {
                VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
@@ -1392,7 +1392,7 @@ virtio_crypto_sym_configure_session(
                goto error_out;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                session_private);
 
        return 0;
index 4f695f3..e32a1ec 100644 (file)
@@ -207,7 +207,7 @@ virtqueue_crypto_sym_enqueue_xmit(
                        sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP;
        struct rte_crypto_sym_op *sym_op = cop->sym;
        struct virtio_crypto_session *session =
-               (struct virtio_crypto_session *)get_session_private_data(
+               (struct virtio_crypto_session *)get_sym_session_private_data(
                cop->sym->session, cryptodev_virtio_driver_id);
        struct virtio_crypto_op_data_req *op_data_req;
        uint32_t hash_result_len = 0;
index 8de5c27..74cf498 100644 (file)
@@ -134,7 +134,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
        if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (likely(op->sym->session != NULL))
-                       sess = (struct zuc_session *)get_session_private_data(
+                       sess = (struct zuc_session *)get_sym_session_private_data(
                                        op->sym->session,
                                        cryptodev_driver_id);
        } else {
@@ -156,8 +156,8 @@ zuc_get_session(struct zuc_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,
-                       _sess_private_data);
+               set_sym_session_private_data(op->sym->session,
+                               cryptodev_driver_id, _sess_private_data);
        }
 
        if (unlikely(sess == NULL))
index 1d72a07..6da3965 100644 (file)
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
        return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
                struct rte_crypto_sym_xform *xform,
                struct rte_cryptodev_sym_session *sess,
                struct rte_mempool *mempool)
@@ -276,7 +276,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
                return ret;
        }
 
-       set_session_private_data(sess, dev->driver_id,
+       set_sym_session_private_data(sess, dev->driver_id,
                sess_private_data);
 
        return 0;
@@ -284,17 +284,17 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
                struct rte_cryptodev_sym_session *sess)
 {
        uint8_t index = dev->driver_id;
-       void *sess_priv = get_session_private_data(sess, index);
+       void *sess_priv = get_sym_session_private_data(sess, index);
 
        /* Zero out the whole structure */
        if (sess_priv) {
                memset(sess_priv, 0, sizeof(struct zuc_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_session_private_data(sess, index, NULL);
+               set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);
        }
 }
@@ -314,9 +314,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
                .queue_pair_release = zuc_pmd_qp_release,
                .queue_pair_count   = zuc_pmd_qp_count,
 
-               .session_get_size   = zuc_pmd_session_get_size,
-               .session_configure  = zuc_pmd_session_configure,
-               .session_clear      = zuc_pmd_session_clear
+               .sym_session_get_size   = zuc_pmd_sym_session_get_size,
+               .sym_session_configure  = zuc_pmd_sym_session_configure,
+               .sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
index 745ea1c..9292f93 100644 (file)
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
        index = dev->driver_id;
 
        if (sess->sess_private_data[index] == NULL) {
-               ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+               ret = dev->dev_ops->sym_session_configure(dev, xforms,
+                                                       sess, mp);
                if (ret < 0) {
                        CDEV_LOG_ERR(
                                "dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
        if (dev == NULL || sess == NULL)
                return -EINVAL;
 
-       dev->dev_ops->session_clear(dev, sess);
+       dev->dev_ops->sym_session_clear(dev, sess);
 
        return 0;
 }
@@ -1123,7 +1124,7 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 
        /* Check that all device private data has been freed */
        for (i = 0; i < nb_drivers; i++) {
-               sess_priv = get_session_private_data(sess, i);
+               sess_priv = get_sym_session_private_data(sess, i);
                if (sess_priv != NULL)
                        return -EBUSY;
        }
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
        dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-       if (*dev->dev_ops->session_get_size == NULL)
+       if (*dev->dev_ops->sym_session_get_size == NULL)
                return 0;
 
-       priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+       priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
        /*
         * If size is less than session header size,
index ec4f1ec..ac6a1c4 100644 (file)
@@ -299,11 +299,11 @@ struct rte_cryptodev_ops {
        cryptodev_queue_pair_count_t queue_pair_count;
        /**< Get count of the queue pairs. */
 
-       cryptodev_sym_get_session_private_size_t session_get_size;
+       cryptodev_sym_get_session_private_size_t sym_session_get_size;
        /**< Return private session. */
-       cryptodev_sym_configure_session_t session_configure;
+       cryptodev_sym_configure_session_t sym_session_configure;
        /**< Configure a Crypto session. */
-       cryptodev_sym_free_session_t session_clear;
+       cryptodev_sym_free_session_t sym_session_clear;
        /**< Clear a Crypto sessions private data. */
 };
 
@@ -436,13 +436,13 @@ static void init_ ##driver_id(void)\
 }
 
 static inline void *
-get_session_private_data(const struct rte_cryptodev_sym_session *sess,
+get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
                uint8_t driver_id) {
        return sess->sess_private_data[driver_id];
 }
 
 static inline void
-set_session_private_data(struct rte_cryptodev_sym_session *sess,
+set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
                uint8_t driver_id, void *private_data)
 {
        sess->sess_private_data[driver_id] = private_data;