Lines Matching refs:ct_ft

297 	struct tcf_ct_flow_table *ct_ft;  in tcf_ct_flow_table_get()  local
301 ct_ft = rhashtable_lookup_fast(&zones_ht, &params->zone, zones_params); in tcf_ct_flow_table_get()
302 if (ct_ft && refcount_inc_not_zero(&ct_ft->ref)) in tcf_ct_flow_table_get()
305 ct_ft = kzalloc(sizeof(*ct_ft), GFP_KERNEL); in tcf_ct_flow_table_get()
306 if (!ct_ft) in tcf_ct_flow_table_get()
308 refcount_set(&ct_ft->ref, 1); in tcf_ct_flow_table_get()
310 ct_ft->zone = params->zone; in tcf_ct_flow_table_get()
311 err = rhashtable_insert_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
315 ct_ft->nf_ft.type = &flowtable_ct; in tcf_ct_flow_table_get()
316 ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD | in tcf_ct_flow_table_get()
318 err = nf_flow_table_init(&ct_ft->nf_ft); in tcf_ct_flow_table_get()
321 write_pnet(&ct_ft->nf_ft.net, net); in tcf_ct_flow_table_get()
325 params->ct_ft = ct_ft; in tcf_ct_flow_table_get()
326 params->nf_ft = &ct_ft->nf_ft; in tcf_ct_flow_table_get()
332 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_get()
334 kfree(ct_ft); in tcf_ct_flow_table_get()
343 struct tcf_ct_flow_table *ct_ft; in tcf_ct_flow_table_cleanup_work() local
346 ct_ft = container_of(to_rcu_work(work), struct tcf_ct_flow_table, in tcf_ct_flow_table_cleanup_work()
348 nf_flow_table_free(&ct_ft->nf_ft); in tcf_ct_flow_table_cleanup_work()
351 block = &ct_ft->nf_ft.flow_block; in tcf_ct_flow_table_cleanup_work()
352 down_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
357 up_write(&ct_ft->nf_ft.flow_block_lock); in tcf_ct_flow_table_cleanup_work()
358 kfree(ct_ft); in tcf_ct_flow_table_cleanup_work()
363 static void tcf_ct_flow_table_put(struct tcf_ct_flow_table *ct_ft) in tcf_ct_flow_table_put() argument
365 if (refcount_dec_and_test(&ct_ft->ref)) { in tcf_ct_flow_table_put()
366 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params); in tcf_ct_flow_table_put()
367 INIT_RCU_WORK(&ct_ft->rwork, tcf_ct_flow_table_cleanup_work); in tcf_ct_flow_table_put()
368 queue_rcu_work(act_ct_wq, &ct_ft->rwork); in tcf_ct_flow_table_put()
379 static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_add() argument
409 err = flow_offload_add(&ct_ft->nf_ft, entry); in tcf_ct_flow_table_add()
421 static void tcf_ct_flow_table_process_conn(struct tcf_ct_flow_table *ct_ft, in tcf_ct_flow_table_process_conn() argument
468 tcf_ct_flow_table_add(ct_ft, ct, tcp, bidirectional); in tcf_ct_flow_table_process_conn()
617 struct nf_flowtable *nf_ft = &p->ct_ft->nf_ft; in tcf_ct_flow_table_lookup()
839 if (params->ct_ft) in tcf_ct_params_free()
840 tcf_ct_flow_table_put(params->ct_ft); in tcf_ct_params_free()
1043 tcf_ct_flow_table_process_conn(p->ct_ft, ct, ctinfo); in tcf_ct_act()