1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2022 Marvell. 3 */ 4 5 #ifndef TEST_COMMON_H 6 #define TEST_COMMON_H 7 8 #include <rte_mldev.h> 9 10 #include "ml_common.h" 11 #include "ml_test.h" 12 13 struct test_common { 14 struct ml_options *opt; 15 enum ml_test_result result; 16 struct rte_ml_dev_info dev_info; 17 struct rte_ml_dev_xstats_map *xstats_map; 18 uint64_t *xstats_values; 19 int xstats_size; 20 }; 21 22 bool ml_test_cap_check(struct ml_options *opt); 23 int ml_test_opt_check(struct ml_options *opt); 24 void ml_test_opt_dump(struct ml_options *opt); 25 int ml_test_device_configure(struct ml_test *test, struct ml_options *opt); 26 int ml_test_device_close(struct ml_test *test, struct ml_options *opt); 27 int ml_test_device_start(struct ml_test *test, struct ml_options *opt); 28 int ml_test_device_stop(struct ml_test *test, struct ml_options *opt); 29 30 int ml_read_file(char *file, size_t *size, char **buffer); 31 32 #endif /* TEST_COMMON_H */ 33