Lines Matching refs:ct_ft
280 struct tcf_ct_flow_table *ct_ft; in tcf_ct_flow_table_get() local
284 ct_ft = rhashtable_lookup_fast(&zones_ht, ¶ms->zone, zones_params); in tcf_ct_flow_table_get()
285 if (ct_ft && refcount_inc_not_zero(&ct_ft->ref)) in tcf_ct_flow_table_get()
288 ct_ft = kzalloc(sizeof(*ct_ft), GFP_KERNEL); in tcf_ct_flow_table_get()
289 if (!ct_ft) in tcf_ct_flow_table_get()
291 refcount_set(&ct_ft->ref, 1); in tcf_ct_flow_table_get()
293 ct_ft->zone = params->zone; in tcf_ct_flow_table_get()
294 err = rhashtable_insert_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
298 ct_ft->nf_ft.type = &flowtable_ct; in tcf_ct_flow_table_get()
299 ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD; in tcf_ct_flow_table_get()
300 err = nf_flow_table_init(&ct_ft->nf_ft); in tcf_ct_flow_table_get()
306 params->ct_ft = ct_ft; in tcf_ct_flow_table_get()
307 params->nf_ft = &ct_ft->nf_ft; in tcf_ct_flow_table_get()
313 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
315 kfree(ct_ft); in tcf_ct_flow_table_get()
323 struct tcf_ct_flow_table *ct_ft; in tcf_ct_flow_table_cleanup_work() local
325 ct_ft = container_of(to_rcu_work(work), struct tcf_ct_flow_table, in tcf_ct_flow_table_cleanup_work()
327 nf_flow_table_free(&ct_ft->nf_ft); in tcf_ct_flow_table_cleanup_work()
328 kfree(ct_ft); in tcf_ct_flow_table_cleanup_work()
335 struct tcf_ct_flow_table *ct_ft = params->ct_ft; in tcf_ct_flow_table_put() local
337 if (refcount_dec_and_test(¶ms->ct_ft->ref)) { in tcf_ct_flow_table_put()
338 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_put()
339 INIT_RCU_WORK(&ct_ft->rwork, tcf_ct_flow_table_cleanup_work); in tcf_ct_flow_table_put()
340 queue_rcu_work(act_ct_wq, &ct_ft->rwork); in tcf_ct_flow_table_put()
344 static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_add() argument
365 err = flow_offload_add(&ct_ft->nf_ft, entry); in tcf_ct_flow_table_add()
377 static void tcf_ct_flow_table_process_conn(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_process_conn() argument
402 tcf_ct_flow_table_add(ct_ft, ct, tcp); in tcf_ct_flow_table_process_conn()
497 struct nf_flowtable *nf_ft = &p->ct_ft->nf_ft; in tcf_ct_flow_table_lookup()
1023 tcf_ct_flow_table_process_conn(p->ct_ft, ct, ctinfo); in tcf_ct_act()