Lines Matching refs:nparms
164 struct tcf_pedit_parms *oparms, *nparms; in tcf_pedit_init() local
226 nparms = kzalloc(sizeof(*nparms), GFP_KERNEL); in tcf_pedit_init()
227 if (!nparms) { in tcf_pedit_init()
232 nparms->tcfp_keys_ex = in tcf_pedit_init()
234 if (IS_ERR(nparms->tcfp_keys_ex)) { in tcf_pedit_init()
235 ret = PTR_ERR(nparms->tcfp_keys_ex); in tcf_pedit_init()
245 nparms->tcfp_off_max_hint = 0; in tcf_pedit_init()
246 nparms->tcfp_flags = parm->flags; in tcf_pedit_init()
247 nparms->tcfp_nkeys = parm->nkeys; in tcf_pedit_init()
249 nparms->tcfp_keys = kmemdup(parm->keys, ksize, GFP_KERNEL); in tcf_pedit_init()
250 if (!nparms->tcfp_keys) { in tcf_pedit_init()
255 for (i = 0; i < nparms->tcfp_nkeys; ++i) { in tcf_pedit_init()
256 u32 offmask = nparms->tcfp_keys[i].offmask; in tcf_pedit_init()
257 u32 cur = nparms->tcfp_keys[i].off; in tcf_pedit_init()
267 nparms->tcfp_keys[i].shift = min_t(size_t, in tcf_pedit_init()
269 nparms->tcfp_keys[i].shift); in tcf_pedit_init()
274 cur += (0xff & offmask) >> nparms->tcfp_keys[i].shift; in tcf_pedit_init()
277 nparms->tcfp_off_max_hint = in tcf_pedit_init()
278 max(nparms->tcfp_off_max_hint, cur + 4); in tcf_pedit_init()
282 nparms->action = parm->action; in tcf_pedit_init()
285 oparms = rcu_replace_pointer(p->parms, nparms, 1); in tcf_pedit_init()
297 kfree(nparms->tcfp_keys); in tcf_pedit_init()
302 kfree(nparms->tcfp_keys_ex); in tcf_pedit_init()
304 kfree(nparms); in tcf_pedit_init()