xref: /dpdk/examples/l2fwd-cat/cat.h (revision 3998e2a07220844d3f3c17f76a781ced3efe0de0)
1*3998e2a0SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
2*3998e2a0SBruce Richardson  * Copyright(c) 2016 Intel Corporation
3f6baccbcSWojciech Andralojc  */
4f6baccbcSWojciech Andralojc 
5f6baccbcSWojciech Andralojc #ifndef _CAT_H
6f6baccbcSWojciech Andralojc #define _CAT_H
7f6baccbcSWojciech Andralojc 
8f6baccbcSWojciech Andralojc /**
9f6baccbcSWojciech Andralojc  * @file
10f6baccbcSWojciech Andralojc  * PQoS CAT
11f6baccbcSWojciech Andralojc  */
12f6baccbcSWojciech Andralojc 
13f6baccbcSWojciech Andralojc #include <stdint.h>
14f6baccbcSWojciech Andralojc #include <string.h>
15f6baccbcSWojciech Andralojc 
16f6baccbcSWojciech Andralojc #include <rte_lcore.h>
17f6baccbcSWojciech Andralojc 
18f6baccbcSWojciech Andralojc #ifdef __cplusplus
19f6baccbcSWojciech Andralojc extern "C" {
20f6baccbcSWojciech Andralojc #endif
21f6baccbcSWojciech Andralojc 
22f6baccbcSWojciech Andralojc /* L3 cache allocation class of service data structure */
23f6baccbcSWojciech Andralojc struct cat_config {
24f6baccbcSWojciech Andralojc 	rte_cpuset_t cpumask;		/* CPUs bitmask */
25f6baccbcSWojciech Andralojc 	int cdp;			/* data & code masks used if true */
26f6baccbcSWojciech Andralojc 	union {
27f6baccbcSWojciech Andralojc 		uint64_t mask;		/* capacity bitmask (CBM) */
28f6baccbcSWojciech Andralojc 		struct {
29f6baccbcSWojciech Andralojc 			uint64_t data_mask; /* data capacity bitmask (CBM) */
30f6baccbcSWojciech Andralojc 			uint64_t code_mask; /* code capacity bitmask (CBM) */
31f6baccbcSWojciech Andralojc 		};
32f6baccbcSWojciech Andralojc 	};
33f6baccbcSWojciech Andralojc };
34f6baccbcSWojciech Andralojc 
35f6baccbcSWojciech Andralojc int cat_init(int argc, char **argv);
36f6baccbcSWojciech Andralojc 
37f6baccbcSWojciech Andralojc void cat_exit(void);
38f6baccbcSWojciech Andralojc 
39f6baccbcSWojciech Andralojc #ifdef __cplusplus
40f6baccbcSWojciech Andralojc }
41f6baccbcSWojciech Andralojc #endif
42f6baccbcSWojciech Andralojc 
43f6baccbcSWojciech Andralojc #endif /* _CAT_H */
44