summaryrefslogtreecommitdiff
path: root/include/net/tc_act/tc_ctinfo.h
blob: f071c1d70a25e14a7a68c6294563a08851fbc738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NET_TC_CTINFO_H
#define __NET_TC_CTINFO_H

#include <net/act_api.h>

struct tcf_ctinfo_params {
	struct rcu_head rcu;
	struct net *net;
	u32 dscpmask;
	u32 dscpstatemask;
	u32 cpmarkmask;
	u16 zone;
	u8 mode;
	u8 dscpmaskshift;
};

struct tcf_ctinfo {
	struct tc_action common;
	struct tcf_ctinfo_params __rcu *params;
	u64 stats_dscp_set;
	u64 stats_dscp_error;
	u64 stats_cpmark_set;
};

enum {
	CTINFO_MODE_DSCP	= BIT(0),
	CTINFO_MODE_CPMARK	= BIT(1)
};

#define to_ctinfo(a) ((struct tcf_ctinfo *)a)

#endif /* __NET_TC_CTINFO_H */