Lines Matching refs:ct_ft

288 	struct tcf_ct_flow_table *ct_ft;  in tcf_ct_flow_table_get()  local
292 ct_ft = rhashtable_lookup_fast(&zones_ht, &params->zone, zones_params); in tcf_ct_flow_table_get()
293 if (ct_ft && refcount_inc_not_zero(&ct_ft->ref)) in tcf_ct_flow_table_get()
296 ct_ft = kzalloc(sizeof(*ct_ft), GFP_KERNEL); in tcf_ct_flow_table_get()
297 if (!ct_ft) in tcf_ct_flow_table_get()
299 refcount_set(&ct_ft->ref, 1); in tcf_ct_flow_table_get()
301 ct_ft->zone = params->zone; in tcf_ct_flow_table_get()
302 err = rhashtable_insert_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
306 ct_ft->nf_ft.type = &flowtable_ct; in tcf_ct_flow_table_get()
307 ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD | in tcf_ct_flow_table_get()
309 err = nf_flow_table_init(&ct_ft->nf_ft); in tcf_ct_flow_table_get()
312 write_pnet(&ct_ft->nf_ft.net, net); in tcf_ct_flow_table_get()
316 params->ct_ft = ct_ft; in tcf_ct_flow_table_get()
317 params->nf_ft = &ct_ft->nf_ft; in tcf_ct_flow_table_get()
323 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
325 kfree(ct_ft); in tcf_ct_flow_table_get()
334 struct tcf_ct_flow_table *ct_ft; in tcf_ct_flow_table_cleanup_work() local
337 ct_ft = container_of(to_rcu_work(work), struct tcf_ct_flow_table, in tcf_ct_flow_table_cleanup_work()
339 nf_flow_table_free(&ct_ft->nf_ft); in tcf_ct_flow_table_cleanup_work()
342 block = &ct_ft->nf_ft.flow_block; in tcf_ct_flow_table_cleanup_work()
343 down_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
348 up_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
349 kfree(ct_ft); in tcf_ct_flow_table_cleanup_work()
354 static void tcf_ct_flow_table_put(struct tcf_ct_flow_table *ct_ft) in tcf_ct_flow_table_put() argument
356 if (refcount_dec_and_test(&ct_ft->ref)) { in tcf_ct_flow_table_put()
357 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_put()
358 INIT_RCU_WORK(&ct_ft->rwork, tcf_ct_flow_table_cleanup_work); in tcf_ct_flow_table_put()
359 queue_rcu_work(act_ct_wq, &ct_ft->rwork); in tcf_ct_flow_table_put()
370 static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_add() argument
400 err = flow_offload_add(&ct_ft->nf_ft, entry); in tcf_ct_flow_table_add()
412 static void tcf_ct_flow_table_process_conn(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_process_conn() argument
459 tcf_ct_flow_table_add(ct_ft, ct, tcp, bidirectional); in tcf_ct_flow_table_process_conn()
608 struct nf_flowtable *nf_ft = &p->ct_ft->nf_ft; in tcf_ct_flow_table_lookup()
823 if (params->ct_ft) in tcf_ct_params_free()
824 tcf_ct_flow_table_put(params->ct_ft); in tcf_ct_params_free()
1027 tcf_ct_flow_table_process_conn(p->ct_ft, ct, ctinfo); in tcf_ct_act()