[ovs-dev] [PATCH v4 1/3] datapath: Restructure datapath.c and flow.c

Jesse Gross jesse at nicira.com
Thu Oct 3 20:05:10 UTC 2013


On Tue, Oct 1, 2013 at 2:39 PM, Pravin B Shelar <pshelar at nicira.com> wrote:
> diff --git a/datapath/flow_table.c b/datapath/flow_table.c
> new file mode 100644
> index 0000000..e077376
> --- /dev/null
> +++ b/datapath/flow_table.c
> +void ovs_match_init(struct sw_flow_match *match,
> +                   struct sw_flow_key *key,
> +                   struct sw_flow_mask *mask)
> +{
> +       memset(match, 0, sizeof(*match));
> +       match->key = key;
> +       match->mask = mask;
> +
> +       memset(key, 0, sizeof(*key));
> +
> +       if (mask) {
> +               memset(&mask->key, 0, sizeof(mask->key));
> +               mask->range.start = mask->range.end = 0;
> +       }
> +}

I think this might make more sense in flow_netlink.c since it is
called from there and seems related.

Otherwise, looks good to me:
Acked-by: Jesse Gross <jesse at nicira.com>



More information about the dev mailing list