Lines Matching refs:ct_ft
289 static void tcf_ct_flow_table_get_ref(struct tcf_ct_flow_table *ct_ft);
293 struct tcf_ct_flow_table *ct_ft =
296 tcf_ct_flow_table_get_ref(ct_ft);
299 static void tcf_ct_flow_table_put(struct tcf_ct_flow_table *ct_ft);
303 struct tcf_ct_flow_table *ct_ft =
306 tcf_ct_flow_table_put(ct_ft);
319 struct tcf_ct_flow_table *ct_ft;
323 ct_ft = rhashtable_lookup_fast(&zones_ht, ¶ms->zone, zones_params);
324 if (ct_ft && refcount_inc_not_zero(&ct_ft->ref))
327 ct_ft = kzalloc(sizeof(*ct_ft), GFP_KERNEL);
328 if (!ct_ft)
330 refcount_set(&ct_ft->ref, 1);
332 ct_ft->zone = params->zone;
333 err = rhashtable_insert_fast(&zones_ht, &ct_ft->node, zones_params);
337 ct_ft->nf_ft.type = &flowtable_ct;
338 ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD |
340 err = nf_flow_table_init(&ct_ft->nf_ft);
343 write_pnet(&ct_ft->nf_ft.net, net);
347 params->ct_ft = ct_ft;
348 params->nf_ft = &ct_ft->nf_ft;
354 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params);
356 kfree(ct_ft);
362 static void tcf_ct_flow_table_get_ref(struct tcf_ct_flow_table *ct_ft)
364 refcount_inc(&ct_ft->ref);
369 struct tcf_ct_flow_table *ct_ft;
372 ct_ft = container_of(to_rcu_work(work), struct tcf_ct_flow_table,
374 nf_flow_table_free(&ct_ft->nf_ft);
376 block = &ct_ft->nf_ft.flow_block;
377 down_write(&ct_ft->nf_ft.flow_block_lock);
379 up_write(&ct_ft->nf_ft.flow_block_lock);
380 kfree(ct_ft);
385 static void tcf_ct_flow_table_put(struct tcf_ct_flow_table *ct_ft)
387 if (refcount_dec_and_test(&ct_ft->ref)) {
388 rhashtable_remove_fast(&zones_ht, &ct_ft->node, zones_params);
389 INIT_RCU_WORK(&ct_ft->rwork, tcf_ct_flow_table_cleanup_work);
390 queue_rcu_work(act_ct_wq, &ct_ft->rwork);
412 static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft,
442 err = flow_offload_add(&ct_ft->nf_ft, entry);
454 static void tcf_ct_flow_table_process_conn(struct tcf_ct_flow_table *ct_ft,
501 tcf_ct_flow_table_add(ct_ft, ct, tcp, bidirectional);
650 struct nf_flowtable *nf_ft = &p->ct_ft->nf_ft;
873 if (params->ct_ft)
874 tcf_ct_flow_table_put(params->ct_ft);
1073 tcf_ct_flow_table_process_conn(p->ct_ft, ct, ctinfo);