diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-02-11 17:07:31 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-12 19:23:32 -0500 |
commit | 86062033feb8a1692f7a3d570c652f1b4a4b4b52 (patch) | |
tree | 1f17c34b7d610f666ffd9e20adbe998d846c7b9b /include/net/tc_act | |
parent | 7282ec8cb4f82287c2aef20a24328b42c630f7cb (diff) | |
download | blackbird-op-linux-86062033feb8a1692f7a3d570c652f1b4a4b4b52.tar.gz blackbird-op-linux-86062033feb8a1692f7a3d570c652f1b4a4b4b52.zip |
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 <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tc_act')
-rw-r--r-- | include/net/tc_act/tc_csum.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_defact.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_gact.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_ipt.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_mirred.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_nat.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_pedit.h | 4 | ||||
-rw-r--r-- | include/net/tc_act/tc_skbedit.h | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/include/net/tc_act/tc_csum.h b/include/net/tc_act/tc_csum.h index 9e8710be7a04..fa8f5fac65e9 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 65f024b80958..9763dcbb9bc3 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 9e3f6767b80e..9fc9b578908a 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 f7d25dfcc4b7..c0f4193f432c 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 cfe2943690ff..4dd77a1c106b 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 4a691f34d703..63d8e9ca9d99 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 e6f6e15956f5..5b80998879c7 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 dd5d86fab030..0df9a0db4a8e 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 */ |