xref: /linux/include/net/tc_act/tc_ctinfo.h (revision 8be4d31cb8aaeea27bde4b7ddb26e28a89062ebf)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NET_TC_CTINFO_H
3 #define __NET_TC_CTINFO_H
4 
5 #include <net/act_api.h>
6 
7 struct tcf_ctinfo_params {
8 	struct rcu_head rcu;
9 	struct net *net;
10 	int action;
11 	u32 dscpmask;
12 	u32 dscpstatemask;
13 	u32 cpmarkmask;
14 	u16 zone;
15 	u8 mode;
16 	u8 dscpmaskshift;
17 };
18 
19 struct tcf_ctinfo {
20 	struct tc_action common;
21 	struct tcf_ctinfo_params __rcu *params;
22 	atomic64_t stats_dscp_set;
23 	atomic64_t stats_dscp_error;
24 	atomic64_t stats_cpmark_set;
25 };
26 
27 enum {
28 	CTINFO_MODE_DSCP	= BIT(0),
29 	CTINFO_MODE_CPMARK	= BIT(1)
30 };
31 
32 #define to_ctinfo(a) ((struct tcf_ctinfo *)a)
33 
34 #endif /* __NET_TC_CTINFO_H */
35