xref: /dpdk/app/graph/graph_priv.h (revision da7e701151ea8b742d4c38ace3e4fefd1b4507fc)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2023 Marvell.
3  */
4 
5 #ifndef APP_GRAPH_PRIV_H
6 #define APP_GRAPH_PRIV_H
7 
8 #define MAX_GRAPH_USECASES 32
9 
10 struct graph_help_cmd_tokens {
11 	cmdline_fixed_string_t help;
12 	cmdline_fixed_string_t graph;
13 };
14 
15 struct graph_start_cmd_tokens {
16 	cmdline_fixed_string_t graph;
17 	cmdline_fixed_string_t start;
18 };
19 
20 struct graph_stats_cmd_tokens {
21 	cmdline_fixed_string_t show;
22 	cmdline_fixed_string_t graph;
23 	cmdline_fixed_string_t stats;
24 };
25 
26 struct graph_config_cmd_tokens {
27 	cmdline_fixed_string_t graph;
28 	cmdline_fixed_string_t usecase;
29 	cmdline_fixed_string_t bsz;
30 	cmdline_fixed_string_t tmo;
31 	cmdline_fixed_string_t coremask;
32 	cmdline_fixed_string_t model;
33 	cmdline_fixed_string_t capt_ena;
34 	cmdline_fixed_string_t capt_pkts_count;
35 	cmdline_fixed_string_t capt_file;
36 	cmdline_fixed_string_t model_name;
37 	cmdline_fixed_string_t pcap_file;
38 	uint16_t size;
39 	uint64_t ns;
40 	uint64_t mask;
41 	uint64_t num_pcap_pkts;
42 	uint8_t pcap_ena;
43 };
44 
45 enum graph_model {
46 	GRAPH_MODEL_RTC = 0x01,
47 	GRAPH_MODEL_MCD = 0x02,
48 };
49 
50 struct usecases {
51 	char name[32];
52 	bool enabled;
53 };
54 
55 struct usecase_params {
56 	uint64_t coremask;
57 	uint32_t bsz;
58 	uint32_t tmo;
59 };
60 
61 struct graph_config {
62 	struct usecases usecases[MAX_GRAPH_USECASES];
63 	struct usecase_params params;
64 	enum graph_model model;
65 	uint64_t num_pcap_pkts;
66 	char *pcap_file;
67 	uint8_t pcap_ena;
68 };
69 
70 #endif
71