Loading...
1#ifndef __NET_TC_GACT_H
2#define __NET_TC_GACT_H
3
4#include <net/act_api.h>
5#include <linux/tc_act/tc_gact.h>
6
7struct tcf_gact {
8 struct tcf_common common;
9#ifdef CONFIG_GACT_PROB
10 u16 tcfg_ptype;
11 u16 tcfg_pval;
12 int tcfg_paction;
13 atomic_t packets;
14#endif
15};
16#define to_gact(a) \
17 container_of(a->priv, struct tcf_gact, common)
18
19static inline bool is_tcf_gact_shot(const struct tc_action *a)
20{
21#ifdef CONFIG_NET_CLS_ACT
22 struct tcf_gact *gact;
23
24 if (a->ops && a->ops->type != TCA_ACT_GACT)
25 return false;
26
27 gact = a->priv;
28 if (gact->tcf_action == TC_ACT_SHOT)
29 return true;
30
31#endif
32 return false;
33}
34#endif /* __NET_TC_GACT_H */
1#ifndef __NET_TC_GACT_H
2#define __NET_TC_GACT_H
3
4#include <net/act_api.h>
5
6struct tcf_gact {
7 struct tcf_common common;
8#ifdef CONFIG_GACT_PROB
9 u16 tcfg_ptype;
10 u16 tcfg_pval;
11 int tcfg_paction;
12#endif
13};
14#define to_gact(pc) \
15 container_of(pc, struct tcf_gact, common)
16
17#endif /* __NET_TC_GACT_H */