diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-01-17 14:37:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 17:43:16 -0500 |
commit | c779f7af99f73abb7270dcaa4c29178ab5ef7472 (patch) | |
tree | 166e92b6b61aa2259c91e96fac1683ffe2fb8c13 /net/sched/act_simple.c | |
parent | 75e4364f67d9cb996f9a6ff982ad9b3700648591 (diff) |
net_sched: act: fetch hinfo from a->ops->hinfo
Every action ops has a pointer to hash info, so we don't need to
hard-code it in each module.
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 'net/sched/act_simple.c')
-rw-r--r-- | net/sched/act_simple.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 92236daaac8d..8ef2f1fcbfba 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -114,10 +114,9 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, | |||
114 | parm = nla_data(tb[TCA_DEF_PARMS]); | 114 | parm = nla_data(tb[TCA_DEF_PARMS]); |
115 | defdata = nla_data(tb[TCA_DEF_DATA]); | 115 | defdata = nla_data(tb[TCA_DEF_DATA]); |
116 | 116 | ||
117 | pc = tcf_hash_check(parm->index, a, bind, &simp_hash_info); | 117 | pc = tcf_hash_check(parm->index, a, bind); |
118 | if (!pc) { | 118 | if (!pc) { |
119 | pc = tcf_hash_create(parm->index, est, a, sizeof(*d), bind, | 119 | pc = tcf_hash_create(parm->index, est, a, sizeof(*d), bind); |
120 | &simp_hash_info); | ||
121 | if (IS_ERR(pc)) | 120 | if (IS_ERR(pc)) |
122 | return PTR_ERR(pc); | 121 | return PTR_ERR(pc); |
123 | 122 | ||
@@ -145,7 +144,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, | |||
145 | } | 144 | } |
146 | 145 | ||
147 | if (ret == ACT_P_CREATED) | 146 | if (ret == ACT_P_CREATED) |
148 | tcf_hash_insert(pc, &simp_hash_info); | 147 | tcf_hash_insert(pc, a->ops->hinfo); |
149 | return ret; | 148 | return ret; |
150 | } | 149 | } |
151 | 150 | ||