Merge branch 'parisc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[deliverable/linux.git] / include / net / tc_act / tc_gact.h
CommitLineData
1da177e4
LT
1#ifndef __NET_TC_GACT_H
2#define __NET_TC_GACT_H
3
4#include <net/act_api.h>
3b01cf56 5#include <linux/tc_act/tc_gact.h>
1da177e4 6
e9ce1cd3 7struct tcf_gact {
ec0595cc 8 struct tc_action common;
1da177e4 9#ifdef CONFIG_GACT_PROB
cc6510a9
ED
10 u16 tcfg_ptype;
11 u16 tcfg_pval;
12 int tcfg_paction;
13 atomic_t packets;
1da177e4 14#endif
1da177e4 15};
a85a970a 16#define to_gact(a) ((struct tcf_gact *)a)
e9ce1cd3 17
3b01cf56
JF
18static inline bool is_tcf_gact_shot(const struct tc_action *a)
19{
00175aec 20#ifdef CONFIG_NET_CLS_ACT
3b01cf56
JF
21 struct tcf_gact *gact;
22
23 if (a->ops && a->ops->type != TCA_ACT_GACT)
24 return false;
25
a85a970a 26 gact = to_gact(a);
3b01cf56
JF
27 if (gact->tcf_action == TC_ACT_SHOT)
28 return true;
29
00175aec 30#endif
3b01cf56
JF
31 return false;
32}
e9ce1cd3 33#endif /* __NET_TC_GACT_H */
This page took 1.251052 seconds and 5 git commands to generate.