diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-08-22 02:54:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:55:10 -0400 |
commit | e9ce1cd3cf6cf35b21d0ce990f2e738f35907386 (patch) | |
tree | 22a3ee7b78ae7cbf00520c66dcc389d87740069c /include/net/tc_act/tc_pedit.h | |
parent | 2e4ca75b31b6851dcc036c2cdebf3ecfe279a653 (diff) |
[PKT_SCHED]: Kill pkt_act.h inlining.
This was simply making templates of functions and mostly causing a lot
of code duplication in the classifier action modules.
We solve this more cleanly by having a common "struct tcf_common" that
hash worker functions contained once in act_api.c can work with.
Callers work with real action objects that have the common struct
plus their module specific struct members. You go from a common
object to the higher level one using a "to_foo()" macro which makes
use of container_of() to do the dirty work.
This also kills off act_generic.h which was only used by act_simple.c
and keeping it around was more work than the it's value.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tc_act/tc_pedit.h')
-rw-r--r-- | include/net/tc_act/tc_pedit.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/net/tc_act/tc_pedit.h b/include/net/tc_act/tc_pedit.h index eb21689d759d..e6f6e15956f5 100644 --- a/include/net/tc_act/tc_pedit.h +++ b/include/net/tc_act/tc_pedit.h | |||
@@ -3,12 +3,13 @@ | |||
3 | 3 | ||
4 | #include <net/act_api.h> | 4 | #include <net/act_api.h> |
5 | 5 | ||
6 | struct tcf_pedit | 6 | struct tcf_pedit { |
7 | { | 7 | struct tcf_common common; |
8 | tca_gen(pedit); | 8 | unsigned char tcfp_nkeys; |
9 | unsigned char nkeys; | 9 | unsigned char tcfp_flags; |
10 | unsigned char flags; | 10 | struct tc_pedit_key *tcfp_keys; |
11 | struct tc_pedit_key *keys; | ||
12 | }; | 11 | }; |
12 | #define to_pedit(pc) \ | ||
13 | container_of(pc, struct tcf_pedit, common) | ||
13 | 14 | ||
14 | #endif | 15 | #endif /* __NET_TC_PED_H */ |