1424dd6c8STomasz Jozwiak /* SPDX-License-Identifier: BSD-3-Clause 2424dd6c8STomasz Jozwiak * Copyright(c) 2019 Intel Corporation 3424dd6c8STomasz Jozwiak */ 4424dd6c8STomasz Jozwiak 5424dd6c8STomasz Jozwiak #ifndef _COMP_PERF_ 6424dd6c8STomasz Jozwiak #define _COMP_PERF_ 7424dd6c8STomasz Jozwiak 8424dd6c8STomasz Jozwiak #include <rte_mempool.h> 9424dd6c8STomasz Jozwiak 10424dd6c8STomasz Jozwiak struct comp_test_data; 11424dd6c8STomasz Jozwiak 12424dd6c8STomasz Jozwiak typedef void *(*cperf_constructor_t)( 13424dd6c8STomasz Jozwiak uint8_t dev_id, 14424dd6c8STomasz Jozwiak uint16_t qp_id, 15424dd6c8STomasz Jozwiak struct comp_test_data *options); 16424dd6c8STomasz Jozwiak 17424dd6c8STomasz Jozwiak typedef int (*cperf_runner_t)(void *test_ctx); 18424dd6c8STomasz Jozwiak typedef void (*cperf_destructor_t)(void *test_ctx); 19424dd6c8STomasz Jozwiak 20424dd6c8STomasz Jozwiak struct cperf_test { 21424dd6c8STomasz Jozwiak cperf_constructor_t constructor; 22424dd6c8STomasz Jozwiak cperf_runner_t runner; 23424dd6c8STomasz Jozwiak cperf_destructor_t destructor; 24424dd6c8STomasz Jozwiak }; 25424dd6c8STomasz Jozwiak 26424dd6c8STomasz Jozwiak /* Needed for weak functions*/ 27424dd6c8STomasz Jozwiak 28424dd6c8STomasz Jozwiak void * 29*2695db95SArtur Trybula cperf_throughput_test_constructor(uint8_t dev_id __rte_unused, 30424dd6c8STomasz Jozwiak uint16_t qp_id __rte_unused, 31424dd6c8STomasz Jozwiak struct comp_test_data *options __rte_unused); 32424dd6c8STomasz Jozwiak 33424dd6c8STomasz Jozwiak void 34*2695db95SArtur Trybula cperf_throughput_test_destructor(void *arg __rte_unused); 35424dd6c8STomasz Jozwiak 36424dd6c8STomasz Jozwiak int 37*2695db95SArtur Trybula cperf_throughput_test_runner(void *test_ctx __rte_unused); 38424dd6c8STomasz Jozwiak 39424dd6c8STomasz Jozwiak void * 40424dd6c8STomasz Jozwiak cperf_verify_test_constructor(uint8_t dev_id __rte_unused, 41424dd6c8STomasz Jozwiak uint16_t qp_id __rte_unused, 42424dd6c8STomasz Jozwiak struct comp_test_data *options __rte_unused); 43424dd6c8STomasz Jozwiak 44424dd6c8STomasz Jozwiak void 45424dd6c8STomasz Jozwiak cperf_verify_test_destructor(void *arg __rte_unused); 46424dd6c8STomasz Jozwiak 47424dd6c8STomasz Jozwiak int 48424dd6c8STomasz Jozwiak cperf_verify_test_runner(void *test_ctx __rte_unused); 49424dd6c8STomasz Jozwiak 50424dd6c8STomasz Jozwiak #endif /* _COMP_PERF_ */ 51