mem: rename address mapping function to IOVA
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.c
index 21da40e..e5f2876 100644 (file)
@@ -488,6 +488,16 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
        return count;
 }
 
+void *
+rte_cryptodev_get_sec_ctx(uint8_t dev_id)
+{
+       if (rte_crypto_devices[dev_id].feature_flags &
+                       RTE_CRYPTODEV_FF_SECURITY)
+               return rte_crypto_devices[dev_id].security_ctx;
+
+       return NULL;
+}
+
 int
 rte_cryptodev_socket_id(uint8_t dev_id)
 {
@@ -1274,7 +1284,7 @@ rte_crypto_op_init(struct rte_mempool *mempool,
 
        __rte_crypto_op_reset(op, type);
 
-       op->phys_addr = rte_mem_virt2phy(_op_data);
+       op->phys_addr = rte_mem_virt2iova(_op_data);
        op->mempool = mempool;
 }