Lines Matching refs:ad
183 typedef int (test_case_function)(struct active_device *ad,
205 set_avail_op(struct active_device *ad, enum rte_bbdev_op_type op_type) in set_avail_op() argument
207 ad->supported_ops |= (1 << op_type); in set_avail_op()
211 is_avail_op(struct active_device *ad, enum rte_bbdev_op_type op_type) in is_avail_op() argument
213 return ad->supported_ops & (1 << op_type); in is_avail_op()
484 create_mempools(struct active_device *ad, int socket_id, in create_mempools() argument
506 RTE_MAX((unsigned int)(ad->nb_queues * num_ops + 1), in create_mempools()
519 ad->dev_id); in create_mempools()
525 ad->dev_id, in create_mempools()
527 ad->ops_mempool = mp; in create_mempools()
537 mp = create_mbuf_pool(in, ad->dev_id, socket_id, in create_mempools()
542 ad->dev_id, in create_mempools()
544 ad->in_mbuf_pool = mp; in create_mempools()
551 mp = create_mbuf_pool(hard_out, ad->dev_id, socket_id, in create_mempools()
557 ad->dev_id, in create_mempools()
559 ad->hard_out_mbuf_pool = mp; in create_mempools()
566 mp = create_mbuf_pool(soft_out, ad->dev_id, socket_id, in create_mempools()
572 ad->dev_id, in create_mempools()
574 ad->soft_out_mbuf_pool = mp; in create_mempools()
581 mp = create_mbuf_pool(harq_in, ad->dev_id, socket_id, in create_mempools()
587 ad->dev_id, in create_mempools()
589 ad->harq_in_mbuf_pool = mp; in create_mempools()
596 mp = create_mbuf_pool(harq_out, ad->dev_id, socket_id, in create_mempools()
602 ad->dev_id, in create_mempools()
604 ad->harq_out_mbuf_pool = mp; in create_mempools()
617 struct active_device *ad = &active_devs[nb_active_devs]; in add_bbdev_dev() local
806 ret = rte_bbdev_queue_configure(ad->dev_id, queue_id, in add_bbdev_dev()
814 ad->queue_ids[queue_id] = queue_id; in add_bbdev_dev()
819 ad->nb_queues = queue_id; in add_bbdev_dev()
821 set_avail_op(ad, op_type); in add_bbdev_dev()
1273 free_buffers(struct active_device *ad, struct test_op_params *op_params) in free_buffers() argument
1277 rte_mempool_free(ad->ops_mempool); in free_buffers()
1278 rte_mempool_free(ad->in_mbuf_pool); in free_buffers()
1279 rte_mempool_free(ad->hard_out_mbuf_pool); in free_buffers()
1280 rte_mempool_free(ad->soft_out_mbuf_pool); in free_buffers()
1281 rte_mempool_free(ad->harq_in_mbuf_pool); in free_buffers()
1282 rte_mempool_free(ad->harq_out_mbuf_pool); in free_buffers()
2396 struct active_device *ad; in run_test_case_on_device() local
2401 ad = &active_devs[dev_id]; in run_test_case_on_device()
2404 if (!is_avail_op(ad, test_vector.op_type)) in run_test_case_on_device()
2408 rte_bbdev_info_get(ad->dev_id, &info); in run_test_case_on_device()
2411 f_ret = create_mempools(ad, socket_id, op_type, in run_test_case_on_device()
2423 ad->ops_mempool, in run_test_case_on_device()
2454 for (i = 0; i < ad->nb_queues; ++i) { in run_test_case_on_device()
2456 ad->in_mbuf_pool, in run_test_case_on_device()
2457 ad->hard_out_mbuf_pool, in run_test_case_on_device()
2458 ad->soft_out_mbuf_pool, in run_test_case_on_device()
2459 ad->harq_in_mbuf_pool, in run_test_case_on_device()
2460 ad->harq_out_mbuf_pool, in run_test_case_on_device()
2461 ad->queue_ids[i], in run_test_case_on_device()
2472 t_ret = test_case_func(ad, op_params); in run_test_case_on_device()
2475 free_buffers(ad, op_params); in run_test_case_on_device()
2479 free_buffers(ad, op_params); in run_test_case_on_device()
3714 bler_test(struct active_device *ad, in bler_test() argument
3725 rte_bbdev_info_get(ad->dev_id, &info); in bler_test()
3733 info.dev_name, ad->nb_queues, op_params->burst_sz, in bler_test()
3740 num_lcores = (ad->nb_queues < (op_params->num_lcores)) in bler_test()
3741 ? ad->nb_queues in bler_test()
3763 t_params[0].dev_id = ad->dev_id; in bler_test()
3766 t_params[0].queue_id = ad->queue_ids[used_cores++]; in bler_test()
3773 t_params[used_cores].dev_id = ad->dev_id; in bler_test()
3776 t_params[used_cores].queue_id = ad->queue_ids[used_cores]; in bler_test()
3808 throughput_test(struct active_device *ad, in throughput_test() argument
3819 rte_bbdev_info_get(ad->dev_id, &info); in throughput_test()
3827 info.dev_name, ad->nb_queues, op_params->burst_sz, in throughput_test()
3834 num_lcores = (ad->nb_queues < (op_params->num_lcores)) in throughput_test()
3835 ? ad->nb_queues in throughput_test()
3858 ret = rte_bbdev_callback_register(ad->dev_id, in throughput_test()
3881 t_params[0].dev_id = ad->dev_id; in throughput_test()
3884 t_params[0].queue_id = ad->queue_ids[used_cores++]; in throughput_test()
3891 t_params[used_cores].dev_id = ad->dev_id; in throughput_test()
3894 t_params[used_cores].queue_id = ad->queue_ids[used_cores]; in throughput_test()
4265 validation_latency_test(struct active_device *ad, in validation_latency_test() argument
4272 const uint16_t queue_id = ad->queue_ids[0]; in validation_latency_test()
4284 rte_bbdev_info_get(ad->dev_id, &info); in validation_latency_test()
4301 ad->dev_id, queue_id, num_to_process, in validation_latency_test()
4305 op_params->ref_enc_op, ad->dev_id, queue_id, in validation_latency_test()
4311 ad->dev_id, queue_id, num_to_process, in validation_latency_test()
4317 ad->dev_id, queue_id, in validation_latency_test()
4339 latency_test(struct active_device *ad, struct test_op_params *op_params) in latency_test() argument
4341 return validation_latency_test(ad, op_params, true); in latency_test()
4345 validation_test(struct active_device *ad, struct test_op_params *op_params) in validation_test() argument
4347 return validation_latency_test(ad, op_params, false); in validation_test()
4717 offload_cost_test(struct active_device *ad, in offload_cost_test() argument
4721 RTE_SET_USED(ad); in offload_cost_test()
4731 const uint16_t queue_id = ad->queue_ids[0]; in offload_cost_test()
4745 rte_bbdev_info_get(ad->dev_id, &info); in offload_cost_test()
4757 op_params->ref_dec_op, ad->dev_id, queue_id, in offload_cost_test()
4761 op_params->ref_enc_op, ad->dev_id, queue_id, in offload_cost_test()
4765 op_params->ref_enc_op, ad->dev_id, queue_id, in offload_cost_test()
4769 op_params->ref_dec_op, ad->dev_id, queue_id, in offload_cost_test()
4773 op_params->ref_enc_op, ad->dev_id, queue_id, in offload_cost_test()
4818 get_bbdev_queue_stats(ad->dev_id, queue_id, &stats); in offload_cost_test()
4909 offload_latency_empty_q_test(struct active_device *ad, in offload_latency_empty_q_test() argument
4913 RTE_SET_USED(ad); in offload_latency_empty_q_test()
4924 const uint16_t queue_id = ad->queue_ids[0]; in offload_latency_empty_q_test()
4934 rte_bbdev_info_get(ad->dev_id, &info); in offload_latency_empty_q_test()
4945 iter = offload_latency_empty_q_test_dec(ad->dev_id, queue_id, in offload_latency_empty_q_test()
4949 iter = offload_latency_empty_q_test_enc(ad->dev_id, queue_id, in offload_latency_empty_q_test()