@@ -437,12 +437,17 @@ static void nf_flow_offload_gc_step(struct nf_flowtable *flow_table,
437
437
}
438
438
}
439
439
440
+ void nf_flow_table_gc_run (struct nf_flowtable * flow_table )
441
+ {
442
+ nf_flow_table_iterate (flow_table , nf_flow_offload_gc_step , NULL );
443
+ }
444
+
440
445
static void nf_flow_offload_work_gc (struct work_struct * work )
441
446
{
442
447
struct nf_flowtable * flow_table ;
443
448
444
449
flow_table = container_of (work , struct nf_flowtable , gc_work .work );
445
- nf_flow_table_iterate (flow_table , nf_flow_offload_gc_step , NULL );
450
+ nf_flow_table_gc_run (flow_table );
446
451
queue_delayed_work (system_power_efficient_wq , & flow_table -> gc_work , HZ );
447
452
}
448
453
@@ -601,10 +606,11 @@ void nf_flow_table_free(struct nf_flowtable *flow_table)
601
606
602
607
cancel_delayed_work_sync (& flow_table -> gc_work );
603
608
nf_flow_table_iterate (flow_table , nf_flow_table_do_cleanup , NULL );
604
- nf_flow_table_iterate (flow_table , nf_flow_offload_gc_step , NULL );
609
+ nf_flow_table_gc_run (flow_table );
605
610
nf_flow_table_offload_flush (flow_table );
606
611
if (nf_flowtable_hw_offload (flow_table ))
607
- nf_flow_table_iterate (flow_table , nf_flow_offload_gc_step , NULL );
612
+ nf_flow_table_gc_run (flow_table );
613
+
608
614
rhashtable_destroy (& flow_table -> rhashtable );
609
615
}
610
616
EXPORT_SYMBOL_GPL (nf_flow_table_free );
0 commit comments