cryptodev: rename physical address type to IOVA
authorSantosh Shukla <santosh.shukla@caviumnetworks.com>
Fri, 20 Oct 2017 12:31:31 +0000 (18:01 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 6 Nov 2017 21:44:26 +0000 (22:44 +0100)
Renamed data type from phys_addr_t to rte_iova_t.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
app/test-crypto-perf/cperf_test_common.c
app/test-crypto-perf/cperf_test_vectors.h
doc/guides/prog_guide/cryptodev_lib.rst
drivers/crypto/dpaa_sec/dpaa_sec.c
drivers/crypto/qat/qat_adf/qat_algs.h
drivers/crypto/qat/qat_crypto.c
drivers/crypto/qat/qat_crypto.h
examples/l2fwd-crypto/main.c
lib/librte_cryptodev/rte_crypto.h
lib/librte_cryptodev/rte_crypto_sym.h
lib/librte_cryptodev/rte_cryptodev.h

index 84c5a3d..a95899a 100644 (file)
@@ -74,7 +74,7 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
        uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
        uint16_t remaining_segments = segments_nb;
        struct rte_mbuf *next_mbuf;
-       phys_addr_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
+       rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
                         mbuf_offset + mbuf_hdr_size;
 
        do {
index 8595570..cb5d828 100644 (file)
@@ -78,13 +78,13 @@ struct cperf_test_vector {
 
        struct {
                uint8_t *data;
-               phys_addr_t phys_addr;
+               rte_iova_t phys_addr;
                uint16_t length;
        } aad;
 
        struct {
                uint8_t *data;
-               phys_addr_t phys_addr;
+               rte_iova_t phys_addr;
                uint16_t length;
        } digest;
 
index 75ae085..2b338b9 100644 (file)
@@ -539,12 +539,12 @@ chain.
 
                 struct {
                     uint8_t *data;
-                    phys_addr_t phys_addr;
+                    rte_iova_t phys_addr;
                 } digest; /**< Digest parameters */
 
                 struct {
                     uint8_t *data;
-                    phys_addr_t phys_addr;
+                    rte_iova_t phys_addr;
                 } aad;
                 /**< Additional authentication parameters */
             } aead;
@@ -566,7 +566,7 @@ chain.
 
                     struct {
                         uint8_t *data;
-                        phys_addr_t phys_addr;
+                        rte_iova_t phys_addr;
                     } digest; /**< Digest parameters */
                 } auth;
             };
index 1d9d03a..d1ef241 100644 (file)
@@ -110,7 +110,7 @@ dpaa_sec_alloc_ctx(dpaa_sec_session *ses)
        return ctx;
 }
 
-static inline phys_addr_t
+static inline rte_iova_t
 dpaa_mem_vtop(void *vaddr)
 {
        const struct rte_memseg *memseg = rte_eal_get_physmem_layout();
@@ -124,14 +124,14 @@ dpaa_mem_vtop(void *vaddr)
                        paddr = memseg[i].phys_addr +
                                (vaddr_64 - memseg[i].addr_64);
 
-                       return (phys_addr_t)paddr;
+                       return (rte_iova_t)paddr;
                }
        }
-       return (phys_addr_t)(NULL);
+       return (rte_iova_t)(NULL);
 }
 
 static inline void *
-dpaa_mem_ptov(phys_addr_t paddr)
+dpaa_mem_ptov(rte_iova_t paddr)
 {
        const struct rte_memseg *memseg = rte_eal_get_physmem_layout();
        int i;
@@ -158,7 +158,7 @@ ern_sec_fq_handler(struct qman_portal *qm __rte_unused,
  * all the packets in this queue could be dispatched into caam
  */
 static int
-dpaa_sec_init_rx(struct qman_fq *fq_in, phys_addr_t hwdesc,
+dpaa_sec_init_rx(struct qman_fq *fq_in, rte_iova_t hwdesc,
                 uint32_t fqid_out)
 {
        struct qm_mcc_initfq fq_opts;
@@ -566,7 +566,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
        struct dpaa_sec_job *cf;
        struct dpaa_sec_op_ctx *ctx;
        struct qm_sg_entry *sg;
-       phys_addr_t start_addr;
+       rte_iova_t start_addr;
        uint8_t *old_digest;
 
        ctx = dpaa_sec_alloc_ctx(ses);
@@ -626,7 +626,7 @@ build_cipher_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
        struct dpaa_sec_job *cf;
        struct dpaa_sec_op_ctx *ctx;
        struct qm_sg_entry *sg;
-       phys_addr_t src_start_addr, dst_start_addr;
+       rte_iova_t src_start_addr, dst_start_addr;
        uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
                        ses->iv.offset);
 
@@ -682,7 +682,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
        struct dpaa_sec_op_ctx *ctx;
        struct qm_sg_entry *sg;
        uint32_t length = 0;
-       phys_addr_t src_start_addr, dst_start_addr;
+       rte_iova_t src_start_addr, dst_start_addr;
        uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
                        ses->iv.offset);
 
@@ -793,7 +793,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
        struct dpaa_sec_job *cf;
        struct dpaa_sec_op_ctx *ctx;
        struct qm_sg_entry *sg;
-       phys_addr_t src_start_addr, dst_start_addr;
+       rte_iova_t src_start_addr, dst_start_addr;
        uint32_t length = 0;
        uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
                        ses->iv.offset);
index 2c8e03c..802ba95 100644 (file)
@@ -104,8 +104,8 @@ struct qat_alg_buf_list {
 struct qat_crypto_op_cookie {
        struct qat_alg_buf_list qat_sgl_list_src;
        struct qat_alg_buf_list qat_sgl_list_dst;
-       phys_addr_t qat_sgl_src_phys_addr;
-       phys_addr_t qat_sgl_dst_phys_addr;
+       rte_iova_t qat_sgl_src_phys_addr;
+       rte_iova_t qat_sgl_dst_phys_addr;
 };
 
 /* Common content descriptor */
@@ -124,7 +124,7 @@ struct qat_session {
        void *bpi_ctx;
        struct qat_alg_cd cd;
        uint8_t *cd_cur_ptr;
-       phys_addr_t cd_paddr;
+       rte_iova_t cd_paddr;
        struct icp_qat_fw_la_bulk_req fw_req;
        uint8_t aad_len;
        struct qat_crypto_instance *inst;
index 6014841..a572967 100644 (file)
@@ -1376,7 +1376,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg,
                 * This address may used for setting AAD physical pointer
                 * into IV offset from op
                 */
-               phys_addr_t aad_phys_addr_aead = op->sym->aead.aad.phys_addr;
+               rte_iova_t aad_phys_addr_aead = op->sym->aead.aad.phys_addr;
                if (ctx->qat_hash_alg ==
                                ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
                                ctx->qat_hash_alg ==
index 0ebb083..c64d775 100644 (file)
@@ -70,7 +70,7 @@ enum qat_device_gen {
 struct qat_queue {
        char            memz_name[RTE_MEMZONE_NAMESIZE];
        void            *base_addr;             /* Base address */
-       phys_addr_t     base_phys_addr;         /* Queue physical address */
+       rte_iova_t      base_phys_addr;         /* Queue physical address */
        uint32_t        head;                   /* Shadow copy of the head */
        uint32_t        tail;                   /* Shadow copy of the tail */
        uint32_t        modulo;
index b973679..8c625ed 100644 (file)
@@ -140,7 +140,7 @@ enum l2fwd_crypto_xform_chain {
 struct l2fwd_key {
        uint8_t *data;
        uint32_t length;
-       phys_addr_t phys_addr;
+       rte_iova_t phys_addr;
 };
 
 struct l2fwd_iv {
index eeed9ee..3d672fe 100644 (file)
@@ -118,7 +118,7 @@ struct rte_crypto_op {
        struct rte_mempool *mempool;
        /**< crypto operation mempool which operation is allocated from */
 
-       phys_addr_t phys_addr;
+       rte_iova_t phys_addr;
        /**< physical address of crypto operation */
 
        RTE_STD_C11
index 5992063..c981f0b 100644 (file)
@@ -548,7 +548,7 @@ struct rte_crypto_sym_op {
                                 * For GCM (@ref RTE_CRYPTO_AEAD_AES_GCM), for
                                 * "digest result" read "authentication tag T".
                                 */
-                               phys_addr_t phys_addr;
+                               rte_iova_t phys_addr;
                                /**< Physical address of digest */
                        } digest; /**< Digest parameters */
                        struct {
@@ -583,7 +583,7 @@ struct rte_crypto_sym_op {
                                 * of the block size (16 bytes).
                                 *
                                 */
-                               phys_addr_t phys_addr;  /**< physical address */
+                               rte_iova_t phys_addr;   /**< physical address */
                        } aad;
                        /**< Additional authentication parameters */
                } aead;
@@ -680,7 +680,7 @@ struct rte_crypto_sym_op {
                                         * will overwrite any data at this location.
                                         *
                                         */
-                                       phys_addr_t phys_addr;
+                                       rte_iova_t phys_addr;
                                        /**< Physical address of digest */
                                } digest; /**< Digest parameters */
                        } auth;
index a0d3a12..a25bff9 100644 (file)
@@ -110,7 +110,7 @@ extern const char **rte_cyptodev_names;
  *   to calculate address from.
  */
 #define rte_crypto_op_ctophys_offset(c, o)     \
-       (phys_addr_t)((c)->phys_addr + (o))
+       (rte_iova_t)((c)->phys_addr + (o))
 
 /**
  * Crypto parameters range description