slub: make ->reserved unsigned int
[linux/fpc-iii.git] / include / net / tc_act / tc_csum.h
blob9470fd7e4350ea9546b43a504ebe12f6362dda18
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 {
10 int action;
11 u32 update_flags;
12 struct rcu_head rcu;
15 struct tcf_csum {
16 struct tc_action common;
18 struct tcf_csum_params __rcu *params;
20 #define to_tcf_csum(a) ((struct tcf_csum *)a)
22 static inline bool is_tcf_csum(const struct tc_action *a)
24 #ifdef CONFIG_NET_CLS_ACT
25 if (a->ops && a->ops->type == TCA_ACT_CSUM)
26 return true;
27 #endif
28 return false;
31 static inline u32 tcf_csum_update_flags(const struct tc_action *a)
33 u32 update_flags;
35 rcu_read_lock();
36 update_flags = rcu_dereference(to_tcf_csum(a)->params)->update_flags;
37 rcu_read_unlock();
39 return update_flags;
42 #endif /* __NET_TC_CSUM_H */