]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
eb4d4065 GB |
2 | #ifndef __NET_TC_CSUM_H |
3 | #define __NET_TC_CSUM_H | |
4 | ||
5 | #include <linux/types.h> | |
6 | #include <net/act_api.h> | |
3aa42664 | 7 | #include <linux/tc_act/tc_csum.h> |
eb4d4065 GB |
8 | |
9 | struct tcf_csum { | |
ec0595cc | 10 | struct tc_action common; |
eb4d4065 GB |
11 | |
12 | u32 update_flags; | |
13 | }; | |
a85a970a | 14 | #define to_tcf_csum(a) ((struct tcf_csum *)a) |
eb4d4065 | 15 | |
3aa42664 OG |
16 | static inline bool is_tcf_csum(const struct tc_action *a) |
17 | { | |
18 | #ifdef CONFIG_NET_CLS_ACT | |
19 | if (a->ops && a->ops->type == TCA_ACT_CSUM) | |
20 | return true; | |
21 | #endif | |
22 | return false; | |
23 | } | |
24 | ||
25 | static inline u32 tcf_csum_update_flags(const struct tc_action *a) | |
26 | { | |
27 | return to_tcf_csum(a)->update_flags; | |
28 | } | |
29 | ||
eb4d4065 | 30 | #endif /* __NET_TC_CSUM_H */ |