diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-02-11 20:07:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-12 19:23:32 -0500 |
commit | 86062033feb8a1692f7a3d570c652f1b4a4b4b52 (patch) | |
tree | 1f17c34b7d610f666ffd9e20adbe998d846c7b9b /include | |
parent | 7282ec8cb4f82287c2aef20a24328b42c630f7cb (diff) |
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')
-rw-r--r-- | include/net/act_api.h | 16 | ||||
-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 |
9 files changed, 23 insertions, 25 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index 788d8378e587..24ae910609ce 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -98,16 +98,14 @@ struct tc_action_ops { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | int tcf_hash_search(struct tc_action *a, u32 index); | 100 | int tcf_hash_search(struct tc_action *a, u32 index); |
101 | void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo); | 101 | void tcf_hash_destroy(struct tc_action *a); |
102 | int tcf_hash_release(struct tcf_common *p, int bind, | 102 | int tcf_hash_release(struct tc_action *a, int bind); |
103 | struct tcf_hashinfo *hinfo); | ||
104 | u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo); | 103 | u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo); |
105 | struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, | 104 | int tcf_hash_check(u32 index, struct tc_action *a, int bind); |
106 | int bind); | 105 | int tcf_hash_create(u32 index, struct nlattr *est, struct tc_action *a, |
107 | struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, | 106 | int size, int bind); |
108 | struct tc_action *a, int size, | 107 | void tcf_hash_cleanup(struct tc_action *a, struct nlattr *est); |
109 | int bind); | 108 | void tcf_hash_insert(struct tc_action *a); |
110 | void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); | ||
111 | 109 | ||
112 | int tcf_register_action(struct tc_action_ops *a); | 110 | int tcf_register_action(struct tc_action_ops *a); |
113 | int tcf_unregister_action(struct tc_action_ops *a); | 111 | int tcf_unregister_action(struct tc_action_ops *a); |
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 { | |||
9 | 9 | ||
10 | u32 update_flags; | 10 | u32 update_flags; |
11 | }; | 11 | }; |
12 | #define to_tcf_csum(pc) \ | 12 | #define to_tcf_csum(a) \ |
13 | container_of(pc,struct tcf_csum,common) | 13 | container_of(a->priv,struct tcf_csum,common) |
14 | 14 | ||
15 | #endif /* __NET_TC_CSUM_H */ | 15 | #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 { | |||
8 | u32 tcfd_datalen; | 8 | u32 tcfd_datalen; |
9 | void *tcfd_defdata; | 9 | void *tcfd_defdata; |
10 | }; | 10 | }; |
11 | #define to_defact(pc) \ | 11 | #define to_defact(a) \ |
12 | container_of(pc, struct tcf_defact, common) | 12 | container_of(a->priv, struct tcf_defact, common) |
13 | 13 | ||
14 | #endif /* __NET_TC_DEF_H */ | 14 | #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 { | |||
11 | int tcfg_paction; | 11 | int tcfg_paction; |
12 | #endif | 12 | #endif |
13 | }; | 13 | }; |
14 | #define to_gact(pc) \ | 14 | #define to_gact(a) \ |
15 | container_of(pc, struct tcf_gact, common) | 15 | container_of(a->priv, struct tcf_gact, common) |
16 | 16 | ||
17 | #endif /* __NET_TC_GACT_H */ | 17 | #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 { | |||
11 | char *tcfi_tname; | 11 | char *tcfi_tname; |
12 | struct xt_entry_target *tcfi_t; | 12 | struct xt_entry_target *tcfi_t; |
13 | }; | 13 | }; |
14 | #define to_ipt(pc) \ | 14 | #define to_ipt(a) \ |
15 | container_of(pc, struct tcf_ipt, common) | 15 | container_of(a->priv, struct tcf_ipt, common) |
16 | 16 | ||
17 | #endif /* __NET_TC_IPT_H */ | 17 | #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 { | |||
11 | struct net_device *tcfm_dev; | 11 | struct net_device *tcfm_dev; |
12 | struct list_head tcfm_list; | 12 | struct list_head tcfm_list; |
13 | }; | 13 | }; |
14 | #define to_mirred(pc) \ | 14 | #define to_mirred(a) \ |
15 | container_of(pc, struct tcf_mirred, common) | 15 | container_of(a->priv, struct tcf_mirred, common) |
16 | 16 | ||
17 | #endif /* __NET_TC_MIR_H */ | 17 | #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 { | |||
13 | u32 flags; | 13 | u32 flags; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | static inline struct tcf_nat *to_tcf_nat(struct tcf_common *pc) | 16 | static inline struct tcf_nat *to_tcf_nat(struct tc_action *a) |
17 | { | 17 | { |
18 | return container_of(pc, struct tcf_nat, common); | 18 | return container_of(a->priv, struct tcf_nat, common); |
19 | } | 19 | } |
20 | 20 | ||
21 | #endif /* __NET_TC_NAT_H */ | 21 | #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 { | |||
9 | unsigned char tcfp_flags; | 9 | unsigned char tcfp_flags; |
10 | struct tc_pedit_key *tcfp_keys; | 10 | struct tc_pedit_key *tcfp_keys; |
11 | }; | 11 | }; |
12 | #define to_pedit(pc) \ | 12 | #define to_pedit(a) \ |
13 | container_of(pc, struct tcf_pedit, common) | 13 | container_of(a->priv, struct tcf_pedit, common) |
14 | 14 | ||
15 | #endif /* __NET_TC_PED_H */ | 15 | #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 { | |||
29 | u16 queue_mapping; | 29 | u16 queue_mapping; |
30 | /* XXX: 16-bit pad here? */ | 30 | /* XXX: 16-bit pad here? */ |
31 | }; | 31 | }; |
32 | #define to_skbedit(pc) \ | 32 | #define to_skbedit(a) \ |
33 | container_of(pc, struct tcf_skbedit, common) | 33 | container_of(a->priv, struct tcf_skbedit, common) |
34 | 34 | ||
35 | #endif /* __NET_TC_SKBEDIT_H */ | 35 | #endif /* __NET_TC_SKBEDIT_H */ |