From 86062033feb8a1692f7a3d570c652f1b4a4b4b52 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Tue, 11 Feb 2014 17:07:31 -0800 Subject: net_sched: act: hide struct tcf_common from API Now we can totally hide it from modules. tcf_hash_*() API's will operate on struct tc_action, modules don't need to care about the details. Cc: Jamal Hadi Salim Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- include/net/tc_act/tc_csum.h | 4 ++-- include/net/tc_act/tc_defact.h | 4 ++-- include/net/tc_act/tc_gact.h | 4 ++-- include/net/tc_act/tc_ipt.h | 4 ++-- include/net/tc_act/tc_mirred.h | 4 ++-- include/net/tc_act/tc_nat.h | 4 ++-- include/net/tc_act/tc_pedit.h | 4 ++-- include/net/tc_act/tc_skbedit.h | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include/net/tc_act') diff --git a/include/net/tc_act/tc_csum.h b/include/net/tc_act/tc_csum.h index 9e8710b..fa8f5fa 100644 --- a/include/net/tc_act/tc_csum.h +++ b/include/net/tc_act/tc_csum.h @@ -9,7 +9,7 @@ struct tcf_csum { u32 update_flags; }; -#define to_tcf_csum(pc) \ - container_of(pc,struct tcf_csum,common) +#define to_tcf_csum(a) \ + container_of(a->priv,struct tcf_csum,common) #endif /* __NET_TC_CSUM_H */ diff --git a/include/net/tc_act/tc_defact.h b/include/net/tc_act/tc_defact.h index 65f024b..9763dcb 100644 --- a/include/net/tc_act/tc_defact.h +++ b/include/net/tc_act/tc_defact.h @@ -8,7 +8,7 @@ struct tcf_defact { u32 tcfd_datalen; void *tcfd_defdata; }; -#define to_defact(pc) \ - container_of(pc, struct tcf_defact, common) +#define to_defact(a) \ + container_of(a->priv, struct tcf_defact, common) #endif /* __NET_TC_DEF_H */ diff --git a/include/net/tc_act/tc_gact.h b/include/net/tc_act/tc_gact.h index 9e3f676..9fc9b57 100644 --- a/include/net/tc_act/tc_gact.h +++ b/include/net/tc_act/tc_gact.h @@ -11,7 +11,7 @@ struct tcf_gact { int tcfg_paction; #endif }; -#define to_gact(pc) \ - container_of(pc, struct tcf_gact, common) +#define to_gact(a) \ + container_of(a->priv, struct tcf_gact, common) #endif /* __NET_TC_GACT_H */ diff --git a/include/net/tc_act/tc_ipt.h b/include/net/tc_act/tc_ipt.h index f7d25df..c0f4193 100644 --- a/include/net/tc_act/tc_ipt.h +++ b/include/net/tc_act/tc_ipt.h @@ -11,7 +11,7 @@ struct tcf_ipt { char *tcfi_tname; struct xt_entry_target *tcfi_t; }; -#define to_ipt(pc) \ - container_of(pc, struct tcf_ipt, common) +#define to_ipt(a) \ + container_of(a->priv, struct tcf_ipt, common) #endif /* __NET_TC_IPT_H */ diff --git a/include/net/tc_act/tc_mirred.h b/include/net/tc_act/tc_mirred.h index cfe2943..4dd77a1 100644 --- a/include/net/tc_act/tc_mirred.h +++ b/include/net/tc_act/tc_mirred.h @@ -11,7 +11,7 @@ struct tcf_mirred { struct net_device *tcfm_dev; struct list_head tcfm_list; }; -#define to_mirred(pc) \ - container_of(pc, struct tcf_mirred, common) +#define to_mirred(a) \ + container_of(a->priv, struct tcf_mirred, common) #endif /* __NET_TC_MIR_H */ diff --git a/include/net/tc_act/tc_nat.h b/include/net/tc_act/tc_nat.h index 4a691f3..63d8e9c 100644 --- a/include/net/tc_act/tc_nat.h +++ b/include/net/tc_act/tc_nat.h @@ -13,9 +13,9 @@ struct tcf_nat { u32 flags; }; -static inline struct tcf_nat *to_tcf_nat(struct tcf_common *pc) +static inline struct tcf_nat *to_tcf_nat(struct tc_action *a) { - return container_of(pc, struct tcf_nat, common); + return container_of(a->priv, struct tcf_nat, common); } #endif /* __NET_TC_NAT_H */ diff --git a/include/net/tc_act/tc_pedit.h b/include/net/tc_act/tc_pedit.h index e6f6e15..5b80998 100644 --- a/include/net/tc_act/tc_pedit.h +++ b/include/net/tc_act/tc_pedit.h @@ -9,7 +9,7 @@ struct tcf_pedit { unsigned char tcfp_flags; struct tc_pedit_key *tcfp_keys; }; -#define to_pedit(pc) \ - container_of(pc, struct tcf_pedit, common) +#define to_pedit(a) \ + container_of(a->priv, struct tcf_pedit, common) #endif /* __NET_TC_PED_H */ diff --git a/include/net/tc_act/tc_skbedit.h b/include/net/tc_act/tc_skbedit.h index dd5d86f..0df9a0d 100644 --- a/include/net/tc_act/tc_skbedit.h +++ b/include/net/tc_act/tc_skbedit.h @@ -29,7 +29,7 @@ struct tcf_skbedit { u16 queue_mapping; /* XXX: 16-bit pad here? */ }; -#define to_skbedit(pc) \ - container_of(pc, struct tcf_skbedit, common) +#define to_skbedit(a) \ + container_of(a->priv, struct tcf_skbedit, common) #endif /* __NET_TC_SKBEDIT_H */ -- cgit v1.1