Lines Matching refs:fnew

2152 				struct cls_fl_filter *fnew,
2165 fnew->mask = rhashtable_lookup_get_insert_fast(&head->ht,
2168 if (!fnew->mask) {
2182 fnew->mask = newmask;
2184 } else if (IS_ERR(fnew->mask)) {
2185 ret = PTR_ERR(fnew->mask);
2186 } else if (fold && fold->mask != fnew->mask) {
2188 } else if (!refcount_inc_not_zero(&fnew->mask->refcnt)) {
2206 static int fl_ht_insert_unique(struct cls_fl_filter *fnew,
2210 struct fl_flow_mask *mask = fnew->mask;
2214 &fnew->ht_node,
2238 struct cls_fl_filter *fnew;
2271 fnew = kzalloc(sizeof(*fnew), GFP_KERNEL);
2272 if (!fnew) {
2276 INIT_LIST_HEAD(&fnew->hw_list);
2277 refcount_set(&fnew->refcnt, 1);
2280 fnew->flags = nla_get_u32(tb[TCA_FLOWER_FLAGS]);
2282 if (!tc_flags_valid(fnew->flags)) {
2283 kfree(fnew);
2311 kfree(fnew);
2315 fnew->handle = handle;
2317 err = tcf_exts_init_ex(&fnew->exts, net, TCA_FLOWER_ACT, 0, tp, handle,
2318 !tc_skip_hw(fnew->flags));
2323 &fnew->exts, flags, fnew->flags,
2329 fnew->res.classid = nla_get_u32(tb[TCA_FLOWER_CLASSID]);
2332 tcf_bind_filter(tp, &fnew->res, base);
2338 err = fl_set_key(net, tb, &fnew->key, &mask->key, extack);
2343 fl_set_masked_key(&fnew->mkey, &fnew->key, mask);
2355 fnew->needs_tc_skb_ext = 1;
2359 err = fl_check_assign_mask(head, fnew, fold, mask);
2363 err = fl_ht_insert_unique(fnew, fold, &in_ht);
2367 if (!tc_skip_hw(fnew->flags)) {
2368 err = fl_hw_replace_filter(tp, fnew, rtnl_held, extack);
2373 if (!tc_in_hw(fnew->flags))
2374 fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;
2393 fnew->handle = handle;
2397 fnew->mask->filter_ht_params;
2399 err = rhashtable_insert_fast(&fnew->mask->ht,
2400 &fnew->ht_node,
2407 refcount_inc(&fnew->refcnt);
2411 idr_replace(&head->handle_idr, fnew, fnew->handle);
2412 list_replace_rcu(&fold->list, &fnew->list);
2427 idr_replace(&head->handle_idr, fnew, fnew->handle);
2429 refcount_inc(&fnew->refcnt);
2430 list_add_tail_rcu(&fnew->list, &fnew->mask->filters);
2434 *arg = fnew;
2443 fnew->deleted = true;
2445 if (!tc_skip_hw(fnew->flags))
2446 fl_hw_destroy_filter(tp, fnew, rtnl_held, NULL);
2448 rhashtable_remove_fast(&fnew->mask->ht, &fnew->ht_node,
2449 fnew->mask->filter_ht_params);
2451 fl_mask_put(head, fnew->mask);
2457 tcf_unbind_filter(tp, &fnew->res);
2465 idr_remove(&head->handle_idr, fnew->handle);
2468 __fl_put(fnew);