Lines Matching refs:new
60 struct tcf_police_params *new; in tcf_police_init() local
145 new = kzalloc(sizeof(*new), GFP_KERNEL); in tcf_police_init()
146 if (unlikely(!new)) { in tcf_police_init()
152 new->tcfp_result = tcfp_result; in tcf_police_init()
153 new->tcfp_mtu = parm->mtu; in tcf_police_init()
154 if (!new->tcfp_mtu) { in tcf_police_init()
155 new->tcfp_mtu = ~0; in tcf_police_init()
157 new->tcfp_mtu = 255 << R_tab->rate.cell_log; in tcf_police_init()
160 new->rate_present = true; in tcf_police_init()
163 psched_ratecfg_precompute(&new->rate, &R_tab->rate, rate64); in tcf_police_init()
166 new->rate_present = false; in tcf_police_init()
169 new->peak_present = true; in tcf_police_init()
172 psched_ratecfg_precompute(&new->peak, &P_tab->rate, prate64); in tcf_police_init()
175 new->peak_present = false; in tcf_police_init()
178 new->tcfp_burst = PSCHED_TICKS2NS(parm->burst); in tcf_police_init()
179 if (new->peak_present) in tcf_police_init()
180 new->tcfp_mtu_ptoks = (s64)psched_l2t_ns(&new->peak, in tcf_police_init()
181 new->tcfp_mtu); in tcf_police_init()
184 new->tcfp_ewma_rate = nla_get_u32(tb[TCA_POLICE_AVRATE]); in tcf_police_init()
189 police->tcfp_toks = new->tcfp_burst; in tcf_police_init()
190 if (new->peak_present) in tcf_police_init()
191 police->tcfp_ptoks = new->tcfp_mtu_ptoks; in tcf_police_init()
194 new = rcu_replace_pointer(police->params, in tcf_police_init()
195 new, in tcf_police_init()
201 if (new) in tcf_police_init()
202 kfree_rcu(new, rcu); in tcf_police_init()