Re: [ovs-dev] [PATCH/RFC repost 4/8] datapath: execution of select group action

2014-09-24 Thread Simon Horman
On Fri, Sep 19, 2014 at 03:05:27PM +0100, Thomas Graf wrote: On 09/18/14 at 10:55am, Simon Horman wrote: +const struct nlattr *bucket_actions(const struct nlattr *attr) +{ + const struct nlattr *a; + int rem; + + for (a = nla_data(attr), rem = nla_len(attr); rem 0; +a

Re: [ovs-dev] [PATCH/RFC repost 4/8] datapath: execution of select group action

2014-09-24 Thread Thomas Graf
On 09/24/14 at 03:01pm, Simon Horman wrote: + /* Only possible type of attributes is OVS_SELECT_GROUP_ATTR_BUCKET */ + for (bucket = nla_data(attr), rem = nla_len(attr); rem 0; + bucket = nla_next(bucket, rem)) { + uint16_t weight = bucket_weight(bucket); I think we

Re: [ovs-dev] [PATCH/RFC repost 4/8] datapath: execution of select group action

2014-09-24 Thread Simon Horman
On Wed, Sep 24, 2014 at 09:19:42AM +0100, Thomas Graf wrote: On 09/24/14 at 03:01pm, Simon Horman wrote: + /* Only possible type of attributes is OVS_SELECT_GROUP_ATTR_BUCKET */ + for (bucket = nla_data(attr), rem = nla_len(attr); rem 0; +bucket =

Re: [ovs-dev] [PATCH/RFC repost 4/8] datapath: execution of select group action

2014-09-19 Thread Thomas Graf
On 09/18/14 at 10:55am, Simon Horman wrote: +const struct nlattr *bucket_actions(const struct nlattr *attr) +{ + const struct nlattr *a; + int rem; + + for (a = nla_data(attr), rem = nla_len(attr); rem 0; + a = nla_next(a, rem)) { + if (nla_type(a) ==

[ovs-dev] [PATCH/RFC repost 4/8] datapath: execution of select group action

2014-09-17 Thread Simon Horman
Allow execution of select group action in the datapath. A subsequent patch will add validation and copying of the select group action in the datapath. The selection algorithm used is based on the RSS hash. This was chosen because it resembles the algorithm currently used by the implementation of