@@ -319,7 +319,7 @@ struct flow_offload_tuple_rhash *
struct flow_offload_tuple_rhash *tuplehash;
struct rhashtable_iter hti;
struct flow_offload *flow;
- int err = 0;
+ int err = 0, cnt = 0;
rhashtable_walk_enter(&flow_table->rhashtable, &hti);
rhashtable_walk_start(&hti);
@@ -338,11 +338,12 @@ struct flow_offload_tuple_rhash *
flow = container_of(tuplehash, struct flow_offload, tuplehash[0]);
iter(flow_table, flow, data);
+ cnt++;
}
rhashtable_walk_stop(&hti);
rhashtable_walk_exit(&hti);
- return err;
+ return err < 0 ? err : cnt;
}
static void nf_flow_offload_gc_step(struct nf_flowtable *flow_table,