Re: [ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-18 Thread Pravin Shelar
On Wed, Sep 17, 2014 at 9:11 PM, Pravin Shelar wrote: > On Wed, Sep 17, 2014 at 9:02 PM, Joe Stringer wrote: >> >> >> On 18 September 2014 13:02, Joe Stringer wrote: > @@ -229,17 +244,19 @@ static bool match_validate(const struct > sw_flow_match *match, >

Re: [ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-17 Thread Pravin Shelar
On Wed, Sep 17, 2014 at 9:02 PM, Joe Stringer wrote: > > > On 18 September 2014 13:02, Joe Stringer wrote: >>> >>> >>> > @@ -229,17 +244,19 @@ static bool match_validate(const struct >>> > sw_flow_match *match, >>> > } >>> > } >>> > >>> > - if ((key_attrs & key_expec

Re: [ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-17 Thread Joe Stringer
On 18 September 2014 13:02, Joe Stringer wrote: > >> > @@ -229,17 +244,19 @@ static bool match_validate(const struct >> sw_flow_match *match, >> > } >> > } >> > >> > - if ((key_attrs & key_expected) != key_expected) { >> > + attrs = attrs_to_bitmask(key_attrs,

Re: [ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-17 Thread Joe Stringer
Thanks for the review, comments inline On 17 September 2014 17:37, Pravin Shelar wrote: > On Wed, Sep 10, 2014 at 3:16 AM, Joe Stringer > wrote: > > Reduce duplicate code by using nla_policy and nla_parse_strict(). > > > Thanks for simplifying this code. I have couple of comments. > > > Signed-

Re: [ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-16 Thread Pravin Shelar
On Wed, Sep 10, 2014 at 3:16 AM, Joe Stringer wrote: > Reduce duplicate code by using nla_policy and nla_parse_strict(). > Thanks for simplifying this code. I have couple of comments. > Signed-off-by: Joe Stringer > --- > v2: Remove attrs bitmasks from most functions. > Remove key/mask wrapp

[ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-10 Thread Joe Stringer
Reduce duplicate code by using nla_policy and nla_parse_strict(). Signed-off-by: Joe Stringer --- v2: Remove attrs bitmasks from most functions. Remove key/mask wrappers for parse_nlattrs(). Rebase against flag-based nla_parse_strict(). --- datapath/flow_netlink.c | 420