xref: /dpdk/examples/pipeline/obj.h (revision def657a3478bbdabd989ac29304dc4ee408049ef)
1b77f6600SCristian Dumitrescu /* SPDX-License-Identifier: BSD-3-Clause
2b77f6600SCristian Dumitrescu  * Copyright(c) 2020 Intel Corporation
3b77f6600SCristian Dumitrescu  */
4b77f6600SCristian Dumitrescu 
5b77f6600SCristian Dumitrescu #ifndef _INCLUDE_OBJ_H_
6b77f6600SCristian Dumitrescu #define _INCLUDE_OBJ_H_
7b77f6600SCristian Dumitrescu 
8b77f6600SCristian Dumitrescu #include <stdint.h>
9b77f6600SCristian Dumitrescu 
10b77f6600SCristian Dumitrescu /*
1178dffe31SCristian Dumitrescu  * ethdev
12b77f6600SCristian Dumitrescu  */
1378dffe31SCristian Dumitrescu #ifndef ETHDEV_RXQ_RSS_MAX
1478dffe31SCristian Dumitrescu #define ETHDEV_RXQ_RSS_MAX 16
15b77f6600SCristian Dumitrescu #endif
16b77f6600SCristian Dumitrescu 
1778dffe31SCristian Dumitrescu struct ethdev_params_rss {
1878dffe31SCristian Dumitrescu 	uint32_t queue_id[ETHDEV_RXQ_RSS_MAX];
19b77f6600SCristian Dumitrescu 	uint32_t n_queues;
20b77f6600SCristian Dumitrescu };
21b77f6600SCristian Dumitrescu 
2278dffe31SCristian Dumitrescu struct ethdev_params {
23b77f6600SCristian Dumitrescu 	struct {
24b77f6600SCristian Dumitrescu 		uint32_t n_queues;
25b77f6600SCristian Dumitrescu 		uint32_t queue_size;
26b77f6600SCristian Dumitrescu 		const char *mempool_name;
2778dffe31SCristian Dumitrescu 		struct ethdev_params_rss *rss;
28b77f6600SCristian Dumitrescu 	} rx;
29b77f6600SCristian Dumitrescu 
30b77f6600SCristian Dumitrescu 	struct {
31b77f6600SCristian Dumitrescu 		uint32_t n_queues;
32b77f6600SCristian Dumitrescu 		uint32_t queue_size;
33b77f6600SCristian Dumitrescu 	} tx;
34b77f6600SCristian Dumitrescu 
35b77f6600SCristian Dumitrescu 	int promiscuous;
36b77f6600SCristian Dumitrescu };
37b77f6600SCristian Dumitrescu 
38b77f6600SCristian Dumitrescu int
3978dffe31SCristian Dumitrescu ethdev_config(const char *name, struct ethdev_params *params);
40b77f6600SCristian Dumitrescu 
41*def657a3SCristian Dumitrescu /*
42*def657a3SCristian Dumitrescu  * cryptodev
43*def657a3SCristian Dumitrescu  */
44*def657a3SCristian Dumitrescu struct cryptodev_params {
45*def657a3SCristian Dumitrescu 	uint32_t n_queue_pairs;
46*def657a3SCristian Dumitrescu 	uint32_t queue_size;
47*def657a3SCristian Dumitrescu };
48*def657a3SCristian Dumitrescu 
49*def657a3SCristian Dumitrescu int
50*def657a3SCristian Dumitrescu cryptodev_config(const char *name, struct cryptodev_params *params);
51*def657a3SCristian Dumitrescu 
52b77f6600SCristian Dumitrescu #endif /* _INCLUDE_OBJ_H_ */
53