1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __NET_TC_CSUM_H 3 #define __NET_TC_CSUM_H 4 5 #include <linux/types.h> 6 #include <net/act_api.h> 7 #include <linux/tc_act/tc_csum.h> 8 9 struct tcf_csum_params { 10 u32 update_flags; 11 struct rcu_head rcu; 12 }; 13 14 struct tcf_csum { 15 struct tc_action common; 16 17 struct tcf_csum_params __rcu *params; 18 }; 19 #define to_tcf_csum(a) ((struct tcf_csum *)a) 20 21 static inline u32 tcf_csum_update_flags(const struct tc_action *a) 22 { 23 u32 update_flags; 24 25 rcu_read_lock(); 26 update_flags = rcu_dereference(to_tcf_csum(a)->params)->update_flags; 27 rcu_read_unlock(); 28 29 return update_flags; 30 } 31 32 #endif /* __NET_TC_CSUM_H */ 33