[ovs-dev] [RFC PATCH 3/4] datapath: Minimize ovs_flow_cmd_new_or_set critical section.
Jesse Gross
jesse at nicira.com
Mon Feb 3 18:38:48 UTC 2014
On Fri, Jan 24, 2014 at 2:58 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
> diff --git a/datapath/datapath.c b/datapath/datapath.c
> index 92ae66a..5b12a5d 100644
> --- a/datapath/datapath.c
> +++ b/datapath/datapath.c
> @@ -817,11 +840,27 @@ static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
> OVS_NLERR("Flow actions may not be safe on all matching packets.\n");
> goto err_kfree;
> }
> - } else if (info->genlhdr->cmd == OVS_FLOW_CMD_NEW) {
> + } else if (cmd == OVS_FLOW_CMD_NEW) {
> error = -EINVAL;
> goto error;
> }
> + /* XXX: Is it OK to SET actions to NULL? */
Yes, we already do this so it's OK as long as the length is also set to 0.
More information about the dev
mailing list