[ovs-dev] [PATCH 3/3] datapath: Implement flow table re-hashing.
Jesse Gross
jesse at nicira.com
Fri Dec 16 02:25:26 UTC 2011
On Wed, Dec 14, 2011 at 2:09 PM, Pravin B Shelar <pshelar at nicira.com> wrote:
> diff --git a/datapath/datapath.c b/datapath/datapath.c
> index 72cf9f6..2eedbf5 100644
> --- a/datapath/datapath.c
> +++ b/datapath/datapath.c
> +static int __rehash_flow_table(void *dummy)
> +{
> + struct datapath *dp;
> +
> + list_for_each_entry(dp, &dps, list_node) {
> + struct flow_table *old_table = genl_dereference(dp->table);
> + struct flow_table *new_table;
> +
> + new_table = ovs_flow_tbl_rehash(old_table);
> + if (!IS_ERR(new_table)) {
> + rcu_assign_pointer(dp->table, new_table);
> + ovs_flow_tbl_deferred_destroy(old_table);
> + }
> + }
> + return 0;
> +}
Now that this no longer needs the genl stuff directly, can you move it
down to be closer to rehash_flow_table()?
Otherwise looks good.
Acked-by: Jesse Gross <jesse at nicira.com>
More information about the dev
mailing list