xref: /openbmc/linux/include/net/tc_act/tc_ctinfo.h (revision 0898782247ae533d1f4e47a06bc5d4870931b284)
124ec483cSKevin 'ldir' Darbyshire-Bryant /* SPDX-License-Identifier: GPL-2.0 */
224ec483cSKevin 'ldir' Darbyshire-Bryant #ifndef __NET_TC_CTINFO_H
324ec483cSKevin 'ldir' Darbyshire-Bryant #define __NET_TC_CTINFO_H
424ec483cSKevin 'ldir' Darbyshire-Bryant 
524ec483cSKevin 'ldir' Darbyshire-Bryant #include <net/act_api.h>
624ec483cSKevin 'ldir' Darbyshire-Bryant 
724ec483cSKevin 'ldir' Darbyshire-Bryant struct tcf_ctinfo_params {
824ec483cSKevin 'ldir' Darbyshire-Bryant 	struct rcu_head rcu;
924ec483cSKevin 'ldir' Darbyshire-Bryant 	struct net *net;
1024ec483cSKevin 'ldir' Darbyshire-Bryant 	u32 dscpmask;
1124ec483cSKevin 'ldir' Darbyshire-Bryant 	u32 dscpstatemask;
1224ec483cSKevin 'ldir' Darbyshire-Bryant 	u32 cpmarkmask;
1324ec483cSKevin 'ldir' Darbyshire-Bryant 	u16 zone;
1424ec483cSKevin 'ldir' Darbyshire-Bryant 	u8 mode;
1524ec483cSKevin 'ldir' Darbyshire-Bryant 	u8 dscpmaskshift;
1624ec483cSKevin 'ldir' Darbyshire-Bryant };
1724ec483cSKevin 'ldir' Darbyshire-Bryant 
1824ec483cSKevin 'ldir' Darbyshire-Bryant struct tcf_ctinfo {
1924ec483cSKevin 'ldir' Darbyshire-Bryant 	struct tc_action common;
2024ec483cSKevin 'ldir' Darbyshire-Bryant 	struct tcf_ctinfo_params __rcu *params;
2124ec483cSKevin 'ldir' Darbyshire-Bryant 	u64 stats_dscp_set;
2224ec483cSKevin 'ldir' Darbyshire-Bryant 	u64 stats_dscp_error;
2324ec483cSKevin 'ldir' Darbyshire-Bryant 	u64 stats_cpmark_set;
2424ec483cSKevin 'ldir' Darbyshire-Bryant };
2524ec483cSKevin 'ldir' Darbyshire-Bryant 
26*16e5a266SKevin Darbyshire-Bryant enum {
27*16e5a266SKevin Darbyshire-Bryant 	CTINFO_MODE_DSCP	= BIT(0),
28*16e5a266SKevin Darbyshire-Bryant 	CTINFO_MODE_CPMARK	= BIT(1)
29*16e5a266SKevin Darbyshire-Bryant };
30*16e5a266SKevin Darbyshire-Bryant 
3124ec483cSKevin 'ldir' Darbyshire-Bryant #define to_ctinfo(a) ((struct tcf_ctinfo *)a)
3224ec483cSKevin 'ldir' Darbyshire-Bryant 
3324ec483cSKevin 'ldir' Darbyshire-Bryant #endif /* __NET_TC_CTINFO_H */
34