summaryrefslogtreecommitdiffstats
path: root/include/net/tc_act/tc_nat.h
diff options
context:
space:
mode:
authorWANG Cong2016-07-26 01:09:41 +0200
committerDavid S. Miller2016-07-26 06:49:19 +0200
commita85a970af265f156740977168b542234511b28a8 (patch)
tree19866c37883917b1ec6964fcbae76335f9de0139 /include/net/tc_act/tc_nat.h
parentipvlan: Scrub skb before crossing the namespace boundry (diff)
downloadkernel-qcow2-linux-a85a970af265f156740977168b542234511b28a8.tar.gz
kernel-qcow2-linux-a85a970af265f156740977168b542234511b28a8.tar.xz
kernel-qcow2-linux-a85a970af265f156740977168b542234511b28a8.zip
net_sched: move tc_action into tcf_common
struct tc_action is confusing, currently we use it for two purposes: 1) Pass in arguments and carry out results from helper functions 2) A generic representation for tc actions The first one is error-prone, since we need to make sure we don't miss anything. This patch aims to get rid of this use, by moving tc_action into tcf_common, so that they are allocated together in hashtable and can be cast'ed easily. And together with the following patch, we could really make tc_action a generic representation for all tc actions and each type of action can inherit from it. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tc_act/tc_nat.h')
-rw-r--r--include/net/tc_act/tc_nat.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/tc_act/tc_nat.h b/include/net/tc_act/tc_nat.h
index 63d8e9ca9d99..a91ad3ad565e 100644
--- a/include/net/tc_act/tc_nat.h
+++ b/include/net/tc_act/tc_nat.h
@@ -13,9 +13,6 @@ struct tcf_nat {
u32 flags;
};
-static inline struct tcf_nat *to_tcf_nat(struct tc_action *a)
-{
- return container_of(a->priv, struct tcf_nat, common);
-}
+#define to_tcf_nat(a) ((struct tcf_nat *)a)
#endif /* __NET_TC_NAT_H */