Lines Matching refs:dev_id

284 rte_cryptodev_sym_capability_get(uint8_t dev_id,  in rte_cryptodev_sym_capability_get()  argument
291 rte_cryptodev_info_get(dev_id, &dev_info); in rte_cryptodev_sym_capability_get()
343 rte_cryptodev_asym_capability_get(uint8_t dev_id, in rte_cryptodev_asym_capability_get() argument
351 rte_cryptodev_info_get(dev_id, &dev_info); in rte_cryptodev_asym_capability_get()
510 rte_cryptodev_pmd_get_dev(uint8_t dev_id) in rte_cryptodev_pmd_get_dev() argument
512 return &cryptodev_globals.devs[dev_id]; in rte_cryptodev_pmd_get_dev()
536 rte_cryptodev_is_valid_device_data(uint8_t dev_id) in rte_cryptodev_is_valid_device_data() argument
538 if (dev_id >= RTE_CRYPTO_MAX_DEVS || in rte_cryptodev_is_valid_device_data()
539 rte_crypto_devices[dev_id].data == NULL) in rte_cryptodev_is_valid_device_data()
546 rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id) in rte_cryptodev_pmd_is_valid_dev() argument
550 if (!rte_cryptodev_is_valid_device_data(dev_id)) in rte_cryptodev_pmd_is_valid_dev()
553 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_pmd_is_valid_dev()
621 devices[count++] = devs[i].data->dev_id; in rte_cryptodev_devices_get()
629 rte_cryptodev_get_sec_ctx(uint8_t dev_id) in rte_cryptodev_get_sec_ctx() argument
631 if (dev_id < RTE_CRYPTO_MAX_DEVS && in rte_cryptodev_get_sec_ctx()
632 (rte_crypto_devices[dev_id].feature_flags & in rte_cryptodev_get_sec_ctx()
634 return rte_crypto_devices[dev_id].security_ctx; in rte_cryptodev_get_sec_ctx()
640 rte_cryptodev_socket_id(uint8_t dev_id) in rte_cryptodev_socket_id() argument
644 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) in rte_cryptodev_socket_id()
647 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_socket_id()
653 rte_cryptodev_data_alloc(uint8_t dev_id, struct rte_cryptodev_data **data, in rte_cryptodev_data_alloc() argument
661 n = snprintf(mz_name, sizeof(mz_name), "rte_cryptodev_data_%u", dev_id); in rte_cryptodev_data_alloc()
688 rte_cryptodev_data_free(uint8_t dev_id, struct rte_cryptodev_data **data) in rte_cryptodev_data_free() argument
695 n = snprintf(mz_name, sizeof(mz_name), "rte_cryptodev_data_%u", dev_id); in rte_cryptodev_data_free()
721 uint8_t dev_id; in rte_cryptodev_find_free_device_index() local
723 for (dev_id = 0; dev_id < RTE_CRYPTO_MAX_DEVS; dev_id++) { in rte_cryptodev_find_free_device_index()
724 if (rte_crypto_devices[dev_id].attached == in rte_cryptodev_find_free_device_index()
726 return dev_id; in rte_cryptodev_find_free_device_index()
735 uint8_t dev_id; in rte_cryptodev_pmd_allocate() local
743 dev_id = rte_cryptodev_find_free_device_index(); in rte_cryptodev_pmd_allocate()
744 if (dev_id == RTE_CRYPTO_MAX_DEVS) { in rte_cryptodev_pmd_allocate()
749 cryptodev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_pmd_allocate()
753 &cryptodev_globals.data[dev_id]; in rte_cryptodev_pmd_allocate()
755 int retval = rte_cryptodev_data_alloc(dev_id, cryptodev_data, in rte_cryptodev_pmd_allocate()
767 cryptodev->data->dev_id = dev_id; in rte_cryptodev_pmd_allocate()
775 cryptodev->data->dev_id, in rte_cryptodev_pmd_allocate()
794 uint8_t dev_id; in rte_cryptodev_pmd_release_device() local
799 dev_id = cryptodev->data->dev_id; in rte_cryptodev_pmd_release_device()
803 ret = rte_cryptodev_close(dev_id); in rte_cryptodev_pmd_release_device()
808 ret = rte_cryptodev_data_free(dev_id, &cryptodev_globals.data[dev_id]); in rte_cryptodev_pmd_release_device()
818 rte_cryptodev_queue_pair_count(uint8_t dev_id) in rte_cryptodev_queue_pair_count() argument
822 if (!rte_cryptodev_is_valid_device_data(dev_id)) { in rte_cryptodev_queue_pair_count()
823 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_queue_pair_count()
827 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_queue_pair_count()
846 nb_qpairs, dev->data->dev_id); in rte_cryptodev_queue_pairs_config()
855 nb_qpairs, dev->data->dev_id); in rte_cryptodev_queue_pairs_config()
910 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config) in rte_cryptodev_configure() argument
915 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_configure()
916 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_configure()
920 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_configure()
924 "device %d must be stopped to allow configuration", dev_id); in rte_cryptodev_configure()
935 dev_id, diag); in rte_cryptodev_configure()
939 rte_cryptodev_trace_configure(dev_id, config); in rte_cryptodev_configure()
945 rte_cryptodev_start(uint8_t dev_id) in rte_cryptodev_start() argument
950 CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id); in rte_cryptodev_start()
952 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_start()
953 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_start()
957 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_start()
963 dev_id); in rte_cryptodev_start()
968 rte_cryptodev_trace_start(dev_id, diag); in rte_cryptodev_start()
978 rte_cryptodev_stop(uint8_t dev_id) in rte_cryptodev_stop() argument
982 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_stop()
983 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_stop()
987 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stop()
993 dev_id); in rte_cryptodev_stop()
998 rte_cryptodev_trace_stop(dev_id); in rte_cryptodev_stop()
1003 rte_cryptodev_close(uint8_t dev_id) in rte_cryptodev_close() argument
1008 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_close()
1009 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_close()
1013 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_close()
1018 dev_id); in rte_cryptodev_close()
1028 (unsigned)dev_id); in rte_cryptodev_close()
1035 rte_cryptodev_trace_close(dev_id, retval); in rte_cryptodev_close()
1044 rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id) in rte_cryptodev_get_qp_status() argument
1048 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_get_qp_status()
1049 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_get_qp_status()
1053 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_get_qp_status()
1062 queue_pair_id, dev_id); in rte_cryptodev_get_qp_status()
1067 queue_pair_id, dev_id); in rte_cryptodev_get_qp_status()
1073 rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, in rte_cryptodev_queue_pair_setup() argument
1079 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_queue_pair_setup()
1080 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_queue_pair_setup()
1084 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_queue_pair_setup()
1119 rte_cryptodev_sym_get_private_session_size(dev_id) > in rte_cryptodev_queue_pair_setup()
1128 "device %d must be stopped to allow configuration", dev_id); in rte_cryptodev_queue_pair_setup()
1134 rte_cryptodev_trace_queue_pair_setup(dev_id, queue_pair_id, qp_conf); in rte_cryptodev_queue_pair_setup()
1141 rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats) in rte_cryptodev_stats_get() argument
1145 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_stats_get()
1146 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_stats_get()
1155 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stats_get()
1164 rte_cryptodev_stats_reset(uint8_t dev_id) in rte_cryptodev_stats_reset() argument
1168 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_stats_reset()
1169 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_stats_reset()
1173 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_stats_reset()
1180 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) in rte_cryptodev_info_get() argument
1184 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_info_get()
1185 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id); in rte_cryptodev_info_get()
1189 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_info_get()
1201 rte_cryptodev_callback_register(uint8_t dev_id, in rte_cryptodev_callback_register() argument
1211 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_callback_register()
1212 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_callback_register()
1216 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_callback_register()
1244 rte_cryptodev_callback_unregister(uint8_t dev_id, in rte_cryptodev_callback_unregister() argument
1255 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_callback_unregister()
1256 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_callback_unregister()
1260 dev = &rte_crypto_devices[dev_id]; in rte_cryptodev_callback_unregister()
1303 dev_cb.cb_fn(dev->data->dev_id, dev_cb.event, in rte_cryptodev_pmd_callback_process()
1312 rte_cryptodev_sym_session_init(uint8_t dev_id, in rte_cryptodev_sym_session_init() argument
1319 dev_id); in rte_cryptodev_sym_session_init()
1323 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_sym_session_init()
1324 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_sym_session_init()
1328 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_session_init()
1348 dev_id); in rte_cryptodev_sym_session_init()
1353 rte_cryptodev_trace_sym_session_init(dev_id, sess, xforms, mp); in rte_cryptodev_sym_session_init()
1359 rte_cryptodev_asym_session_init(uint8_t dev_id, in rte_cryptodev_asym_session_init() argument
1368 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_asym_session_init()
1369 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_asym_session_init()
1373 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_session_init()
1390 dev_id); in rte_cryptodev_asym_session_init()
1395 rte_cryptodev_trace_asym_session_init(dev_id, sess, xforms, mp); in rte_cryptodev_asym_session_init()
1536 rte_cryptodev_sym_session_clear(uint8_t dev_id, in rte_cryptodev_sym_session_clear() argument
1542 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_sym_session_clear()
1543 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_sym_session_clear()
1547 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_session_clear()
1562 rte_cryptodev_trace_sym_session_clear(dev_id, sess); in rte_cryptodev_sym_session_clear()
1567 rte_cryptodev_asym_session_clear(uint8_t dev_id, in rte_cryptodev_asym_session_clear() argument
1572 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_asym_session_clear()
1573 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_asym_session_clear()
1577 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_session_clear()
1586 rte_cryptodev_trace_sym_session_clear(dev_id, sess); in rte_cryptodev_asym_session_clear()
1677 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) in rte_cryptodev_sym_get_private_session_size() argument
1682 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) in rte_cryptodev_sym_get_private_session_size()
1685 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_get_private_session_size()
1696 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id) in rte_cryptodev_asym_get_private_session_size() argument
1702 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) in rte_cryptodev_asym_get_private_session_size()
1705 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_asym_get_private_session_size()
1753 rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id, in rte_cryptodev_sym_cpu_crypto_process() argument
1759 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { in rte_cryptodev_sym_cpu_crypto_process()
1764 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_sym_cpu_crypto_process()
1776 rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id) in rte_cryptodev_get_raw_dp_ctx_size() argument
1782 if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) in rte_cryptodev_get_raw_dp_ctx_size()
1785 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_get_raw_dp_ctx_size()
1800 rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id, in rte_cryptodev_configure_raw_dp_ctx() argument
1808 if (!rte_cryptodev_get_qp_status(dev_id, qp_id)) in rte_cryptodev_configure_raw_dp_ctx()
1811 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_configure_raw_dp_ctx()
1991 rte_cryptodev_name_get(uint8_t dev_id) in rte_cryptodev_name_get() argument
1995 if (!rte_cryptodev_is_valid_device_data(dev_id)) { in rte_cryptodev_name_get()
1996 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id); in rte_cryptodev_name_get()
2000 dev = rte_cryptodev_pmd_get_dev(dev_id); in rte_cryptodev_name_get()