Lines Matching refs:ct_ft

282 	struct tcf_ct_flow_table *ct_ft;  in tcf_ct_flow_table_get()  local
286 ct_ft = rhashtable_lookup_fast(&zones_ht, &params->zone, zones_params); in tcf_ct_flow_table_get()
287 if (ct_ft && refcount_inc_not_zero(&ct_ft->ref)) in tcf_ct_flow_table_get()
290 ct_ft = kzalloc(sizeof(*ct_ft), GFP_KERNEL); in tcf_ct_flow_table_get()
291 if (!ct_ft) in tcf_ct_flow_table_get()
293 refcount_set(&ct_ft->ref, 1); in tcf_ct_flow_table_get()
295 ct_ft->zone = params->zone; in tcf_ct_flow_table_get()
296 err = rhashtable_insert_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
300 ct_ft->nf_ft.type = &flowtable_ct; in tcf_ct_flow_table_get()
301 ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD | in tcf_ct_flow_table_get()
303 err = nf_flow_table_init(&ct_ft->nf_ft); in tcf_ct_flow_table_get()
306 write_pnet(&ct_ft->nf_ft.net, net); in tcf_ct_flow_table_get()
310 params->ct_ft = ct_ft; in tcf_ct_flow_table_get()
311 params->nf_ft = &ct_ft->nf_ft; in tcf_ct_flow_table_get()
317 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
319 kfree(ct_ft); in tcf_ct_flow_table_get()
328 struct tcf_ct_flow_table *ct_ft; in tcf_ct_flow_table_cleanup_work() local
331 ct_ft = container_of(to_rcu_work(work), struct tcf_ct_flow_table, in tcf_ct_flow_table_cleanup_work()
333 nf_flow_table_free(&ct_ft->nf_ft); in tcf_ct_flow_table_cleanup_work()
336 block = &ct_ft->nf_ft.flow_block; in tcf_ct_flow_table_cleanup_work()
337 down_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
342 up_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
343 kfree(ct_ft); in tcf_ct_flow_table_cleanup_work()
350 struct tcf_ct_flow_table *ct_ft = params->ct_ft; in tcf_ct_flow_table_put() local
352 if (refcount_dec_and_test(&params->ct_ft->ref)) { in tcf_ct_flow_table_put()
353 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_put()
354 INIT_RCU_WORK(&ct_ft->rwork, tcf_ct_flow_table_cleanup_work); in tcf_ct_flow_table_put()
355 queue_rcu_work(act_ct_wq, &ct_ft->rwork); in tcf_ct_flow_table_put()
366 static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_add() argument
394 err = flow_offload_add(&ct_ft->nf_ft, entry); in tcf_ct_flow_table_add()
406 static void tcf_ct_flow_table_process_conn(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_process_conn() argument
445 tcf_ct_flow_table_add(ct_ft, ct, tcp); in tcf_ct_flow_table_process_conn()
594 struct nf_flowtable *nf_ft = &p->ct_ft->nf_ft; in tcf_ct_flow_table_lookup()
1134 tcf_ct_flow_table_process_conn(p->ct_ft, ct, ctinfo); in tcf_ct_act()