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