Lines Matching refs:dev_id

286 rte_cryptodev_sym_capability_get(uint8_t dev_id,  in rte_cryptodev_sym_capability_get()  argument
293 rte_cryptodev_info_get(dev_id, &dev_info); in rte_cryptodev_sym_capability_get()
345 rte_cryptodev_asym_capability_get(uint8_t dev_id, in rte_cryptodev_asym_capability_get() argument
353 rte_cryptodev_info_get(dev_id, &dev_info); in rte_cryptodev_asym_capability_get()
632 rte_cryptodev_pmd_get_dev(uint8_t dev_id) in rte_cryptodev_pmd_get_dev() argument
634 return &cryptodev_globals.devs[dev_id]; in rte_cryptodev_pmd_get_dev()
658 rte_cryptodev_is_valid_device_data(uint8_t dev_id) in rte_cryptodev_is_valid_device_data() argument
660 if (dev_id >= RTE_CRYPTO_MAX_DEVS || in rte_cryptodev_is_valid_device_data()
661 rte_crypto_devices[dev_id].data == NULL) in rte_cryptodev_is_valid_device_data()
668 rte_cryptodev_is_valid_dev(uint8_t dev_id) in rte_cryptodev_is_valid_dev() argument
672 if (!rte_cryptodev_is_valid_device_data(dev_id)) in rte_cryptodev_is_valid_dev()
675 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_is_valid_dev()
743 devices[count++] = devs[i].data->dev_id; in rte_cryptodev_devices_get()
751 rte_cryptodev_get_sec_ctx(uint8_t dev_id) in rte_cryptodev_get_sec_ctx() argument
753 if (dev_id < RTE_CRYPTO_MAX_DEVS && in rte_cryptodev_get_sec_ctx()
754 (rte_crypto_devices[dev_id].feature_flags & in rte_cryptodev_get_sec_ctx()
756 return rte_crypto_devices[dev_id].security_ctx; in rte_cryptodev_get_sec_ctx()
762 rte_cryptodev_socket_id(uint8_t dev_id) in rte_cryptodev_socket_id() argument
766 if (!rte_cryptodev_is_valid_dev(dev_id)) in rte_cryptodev_socket_id()
769 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_socket_id()
775 rte_cryptodev_data_alloc(uint8_t dev_id, struct rte_cryptodev_data **data, in rte_cryptodev_data_alloc() argument
783 n = snprintf(mz_name, sizeof(mz_name), "rte_cryptodev_data_%u", dev_id); in rte_cryptodev_data_alloc()
810 rte_cryptodev_data_free(uint8_t dev_id, struct rte_cryptodev_data **data) in rte_cryptodev_data_free() argument
817 n = snprintf(mz_name, sizeof(mz_name), "rte_cryptodev_data_%u", dev_id); in rte_cryptodev_data_free()
843 uint8_t dev_id; in rte_cryptodev_find_free_device_index() local
845 for (dev_id = 0; dev_id < RTE_CRYPTO_MAX_DEVS; dev_id++) { in rte_cryptodev_find_free_device_index()
846 if (rte_crypto_devices[dev_id].attached == in rte_cryptodev_find_free_device_index()
848 return dev_id; in rte_cryptodev_find_free_device_index()
857 uint8_t dev_id; in rte_cryptodev_pmd_allocate() local
865 dev_id = rte_cryptodev_find_free_device_index(); in rte_cryptodev_pmd_allocate()
866 if (dev_id == RTE_CRYPTO_MAX_DEVS) { in rte_cryptodev_pmd_allocate()
871 cryptodev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_pmd_allocate()
875 &cryptodev_globals.data[dev_id]; in rte_cryptodev_pmd_allocate()
877 int retval = rte_cryptodev_data_alloc(dev_id, cryptodev_data, in rte_cryptodev_pmd_allocate()
889 cryptodev->data->dev_id = dev_id; in rte_cryptodev_pmd_allocate()
897 cryptodev->data->dev_id, in rte_cryptodev_pmd_allocate()
916 uint8_t dev_id; in rte_cryptodev_pmd_release_device() local
921 dev_id = cryptodev->data->dev_id; in rte_cryptodev_pmd_release_device()
923 cryptodev_fp_ops_reset(rte_crypto_fp_ops + dev_id); in rte_cryptodev_pmd_release_device()
927 ret = rte_cryptodev_close(dev_id); in rte_cryptodev_pmd_release_device()
932 ret = rte_cryptodev_data_free(dev_id, &cryptodev_globals.data[dev_id]); in rte_cryptodev_pmd_release_device()
942 rte_cryptodev_queue_pair_count(uint8_t dev_id) in rte_cryptodev_queue_pair_count() argument
946 if (!rte_cryptodev_is_valid_device_data(dev_id)) { in rte_cryptodev_queue_pair_count()
947 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_queue_pair_count()
951 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_queue_pair_count()
970 nb_qpairs, dev->data->dev_id); in rte_cryptodev_queue_pairs_config()
979 nb_qpairs, dev->data->dev_id); in rte_cryptodev_queue_pairs_config()
1019 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config) in rte_cryptodev_configure() argument
1024 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_configure()
1025 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_configure()
1029 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_configure()
1033 "device %d must be stopped to allow configuration", dev_id); in rte_cryptodev_configure()
1048 dev_id, diag); in rte_cryptodev_configure()
1056 CDEV_LOG_ERR("Callback init failed for dev_id=%d", dev_id); in rte_cryptodev_configure()
1060 rte_cryptodev_trace_configure(dev_id, config); in rte_cryptodev_configure()
1065 rte_cryptodev_start(uint8_t dev_id) in rte_cryptodev_start() argument
1070 CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id); in rte_cryptodev_start()
1072 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_start()
1073 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_start()
1077 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_start()
1083 dev_id); in rte_cryptodev_start()
1089 cryptodev_fp_ops_set(rte_crypto_fp_ops + dev_id, dev); in rte_cryptodev_start()
1091 rte_cryptodev_trace_start(dev_id, diag); in rte_cryptodev_start()
1101 rte_cryptodev_stop(uint8_t dev_id) in rte_cryptodev_stop() argument
1105 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_stop()
1106 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_stop()
1110 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stop()
1116 dev_id); in rte_cryptodev_stop()
1121 cryptodev_fp_ops_reset(rte_crypto_fp_ops + dev_id); in rte_cryptodev_stop()
1124 rte_cryptodev_trace_stop(dev_id); in rte_cryptodev_stop()
1129 rte_cryptodev_close(uint8_t dev_id) in rte_cryptodev_close() argument
1134 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_close()
1135 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_close()
1139 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_close()
1144 dev_id); in rte_cryptodev_close()
1154 (unsigned)dev_id); in rte_cryptodev_close()
1161 rte_cryptodev_trace_close(dev_id, retval); in rte_cryptodev_close()
1170 rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id) in rte_cryptodev_get_qp_status() argument
1174 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_get_qp_status()
1175 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_get_qp_status()
1179 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_get_qp_status()
1188 queue_pair_id, dev_id); in rte_cryptodev_get_qp_status()
1193 queue_pair_id, dev_id); in rte_cryptodev_get_qp_status()
1199 rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, in rte_cryptodev_queue_pair_setup() argument
1205 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_queue_pair_setup()
1206 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_queue_pair_setup()
1210 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_queue_pair_setup()
1245 rte_cryptodev_sym_get_private_session_size(dev_id) > in rte_cryptodev_queue_pair_setup()
1254 "device %d must be stopped to allow configuration", dev_id); in rte_cryptodev_queue_pair_setup()
1260 rte_cryptodev_trace_queue_pair_setup(dev_id, queue_pair_id, qp_conf); in rte_cryptodev_queue_pair_setup()
1266 rte_cryptodev_add_enq_callback(uint8_t dev_id, in rte_cryptodev_add_enq_callback() argument
1276 CDEV_LOG_ERR("Callback is NULL on dev_id=%d", dev_id); in rte_cryptodev_add_enq_callback()
1281 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_add_enq_callback()
1282 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_add_enq_callback()
1287 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_add_enq_callback()
1297 "dev=%d, queue_pair_id=%d", dev_id, qp_id); in rte_cryptodev_add_enq_callback()
1331 rte_cryptodev_remove_enq_callback(uint8_t dev_id, in rte_cryptodev_remove_enq_callback() argument
1347 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_remove_enq_callback()
1348 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_remove_enq_callback()
1352 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_remove_enq_callback()
1401 rte_cryptodev_add_deq_callback(uint8_t dev_id, in rte_cryptodev_add_deq_callback() argument
1411 CDEV_LOG_ERR("Callback is NULL on dev_id=%d", dev_id); in rte_cryptodev_add_deq_callback()
1416 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_add_deq_callback()
1417 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_add_deq_callback()
1422 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_add_deq_callback()
1432 "dev=%d, queue_pair_id=%d", dev_id, qp_id); in rte_cryptodev_add_deq_callback()
1466 rte_cryptodev_remove_deq_callback(uint8_t dev_id, in rte_cryptodev_remove_deq_callback() argument
1482 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_remove_deq_callback()
1483 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_remove_deq_callback()
1487 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_remove_deq_callback()
1536 rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats) in rte_cryptodev_stats_get() argument
1540 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_stats_get()
1541 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_stats_get()
1550 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stats_get()
1559 rte_cryptodev_stats_reset(uint8_t dev_id) in rte_cryptodev_stats_reset() argument
1563 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_stats_reset()
1564 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_stats_reset()
1568 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stats_reset()
1575 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) in rte_cryptodev_info_get() argument
1579 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_info_get()
1580 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_info_get()
1584 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_info_get()
1596 rte_cryptodev_callback_register(uint8_t dev_id, in rte_cryptodev_callback_register() argument
1606 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_callback_register()
1607 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_callback_register()
1611 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_callback_register()
1639 rte_cryptodev_callback_unregister(uint8_t dev_id, in rte_cryptodev_callback_unregister() argument
1650 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_callback_unregister()
1651 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_callback_unregister()
1655 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_callback_unregister()
1698 dev_cb.cb_fn(dev->data->dev_id, dev_cb.event, in rte_cryptodev_pmd_callback_process()
1707 rte_cryptodev_sym_session_init(uint8_t dev_id, in rte_cryptodev_sym_session_init() argument
1714 dev_id); in rte_cryptodev_sym_session_init()
1718 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_sym_session_init()
1719 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_sym_session_init()
1723 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_session_init()
1743 dev_id); in rte_cryptodev_sym_session_init()
1748 rte_cryptodev_trace_sym_session_init(dev_id, sess, xforms, mp); in rte_cryptodev_sym_session_init()
1802 uint8_t dev_id; in rte_cryptodev_asym_session_pool_create() local
1805 for (dev_id = 0; dev_id < RTE_CRYPTO_MAX_DEVS; dev_id++) in rte_cryptodev_asym_session_pool_create()
1806 if (rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_asym_session_pool_create()
1807 priv_sz = rte_cryptodev_asym_get_private_session_size(dev_id); in rte_cryptodev_asym_session_pool_create()
1906 rte_cryptodev_asym_session_create(uint8_t dev_id, in rte_cryptodev_asym_session_create() argument
1918 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_asym_session_create()
1919 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_asym_session_create()
1923 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_session_create()
1934 dev_id); in rte_cryptodev_asym_session_create()
1971 dev_id); in rte_cryptodev_asym_session_create()
1976 rte_cryptodev_trace_asym_session_create(dev_id, xforms, mp, sess); in rte_cryptodev_asym_session_create()
1981 rte_cryptodev_sym_session_clear(uint8_t dev_id, in rte_cryptodev_sym_session_clear() argument
1987 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_sym_session_clear()
1988 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_sym_session_clear()
1992 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_session_clear()
2007 rte_cryptodev_trace_sym_session_clear(dev_id, sess); in rte_cryptodev_sym_session_clear()
2035 rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess) in rte_cryptodev_asym_session_free() argument
2040 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_asym_session_free()
2041 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_asym_session_free()
2045 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_session_free()
2058 rte_cryptodev_trace_asym_session_free(dev_id, sess); in rte_cryptodev_asym_session_free()
2096 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) in rte_cryptodev_sym_get_private_session_size() argument
2101 if (!rte_cryptodev_is_valid_dev(dev_id)) in rte_cryptodev_sym_get_private_session_size()
2104 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_get_private_session_size()
2115 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id) in rte_cryptodev_asym_get_private_session_size() argument
2120 if (!rte_cryptodev_is_valid_dev(dev_id)) in rte_cryptodev_asym_get_private_session_size()
2123 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_get_private_session_size()
2195 rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id, in rte_cryptodev_sym_cpu_crypto_process() argument
2201 if (!rte_cryptodev_is_valid_dev(dev_id)) { in rte_cryptodev_sym_cpu_crypto_process()
2206 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_cpu_crypto_process()
2218 rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id) in rte_cryptodev_get_raw_dp_ctx_size() argument
2224 if (!rte_cryptodev_is_valid_dev(dev_id)) in rte_cryptodev_get_raw_dp_ctx_size()
2227 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_get_raw_dp_ctx_size()
2242 rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id, in rte_cryptodev_configure_raw_dp_ctx() argument
2250 if (!rte_cryptodev_get_qp_status(dev_id, qp_id)) in rte_cryptodev_configure_raw_dp_ctx()
2253 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_configure_raw_dp_ctx()
2434 rte_cryptodev_name_get(uint8_t dev_id) in rte_cryptodev_name_get() argument
2438 if (!rte_cryptodev_is_valid_device_data(dev_id)) { in rte_cryptodev_name_get()
2439 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_name_get()
2443 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_name_get()
2486 int dev_id; in cryptodev_handle_dev_list() local
2492 for (dev_id = 0; dev_id < RTE_CRYPTO_MAX_DEVS; dev_id++) in cryptodev_handle_dev_list()
2493 if (rte_cryptodev_is_valid_dev(dev_id)) in cryptodev_handle_dev_list()
2494 rte_tel_data_add_array_int(d, dev_id); in cryptodev_handle_dev_list()
2504 int dev_id; in cryptodev_handle_dev_info() local
2510 dev_id = strtoul(params, &end_param, 0); in cryptodev_handle_dev_info()
2513 if (!rte_cryptodev_is_valid_dev(dev_id)) in cryptodev_handle_dev_info()
2516 rte_cryptodev_info_get(dev_id, &cryptodev_info); in cryptodev_handle_dev_info()
2535 int dev_id, ret; in cryptodev_handle_dev_stats() local
2541 dev_id = strtoul(params, &end_param, 0); in cryptodev_handle_dev_stats()
2544 if (!rte_cryptodev_is_valid_dev(dev_id)) in cryptodev_handle_dev_stats()
2547 ret = rte_cryptodev_stats_get(dev_id, &cryptodev_stats); in cryptodev_handle_dev_stats()
2594 int dev_id; in cryptodev_handle_dev_caps() local
2599 dev_id = strtoul(params, &end_param, 0); in cryptodev_handle_dev_caps()
2602 if (!rte_cryptodev_is_valid_dev(dev_id)) in cryptodev_handle_dev_caps()
2610 rte_cryptodev_info_get(dev_id, &dev_info); in cryptodev_handle_dev_caps()