1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NET_TC_CSUM_H
3 #define __NET_TC_CSUM_H
5 #include <linux/types.h>
6 #include <net/act_api.h>
7 #include <linux/tc_act/tc_csum.h>
9 struct tcf_csum_params
{
15 struct tc_action common
;
17 struct tcf_csum_params __rcu
*params
;
19 #define to_tcf_csum(a) ((struct tcf_csum *)a)
21 static inline bool is_tcf_csum(const struct tc_action
*a
)
23 #ifdef CONFIG_NET_CLS_ACT
24 if (a
->ops
&& a
->ops
->type
== TCA_ACT_CSUM
)
30 static inline u32
tcf_csum_update_flags(const struct tc_action
*a
)
35 update_flags
= rcu_dereference(to_tcf_csum(a
)->params
)->update_flags
;
41 #endif /* __NET_TC_CSUM_H */