Hi, With these patches in place it is possible to use all group types defined in OpenFlow1.3.
I previously indicated that I was not planning to implement select groups. However, I thought better of it and this series includes an implementation. In order to aid review the series is available in git: https://github.com/horms/openvswitch.git devel/groups-v8 Key Changes since v8: * As suggested by Ben Pfaff + group_get_stats(): Use ogs->bucket_stats in place of bogus calculation of to use the memory immediately after ogs. + group_get_stats(): Remove unnecessary call to push_all_stats__() + Treat actions as a set regardless of the context in which they are called. There is some room for interpretation of the spec in this area but this simpler approach is being taken for now. This reverts the behaviour of this patch in this regard to that of v3. + Reduce alignment of action_list_stub in xlate_group_bucket() from 64 to 8. * Delete relevant flows on group del * Fail flow mod if it references a non-existent group * Calculate the reference cound and number of buckets of group stats replies at the ofproto layer * Verify compatibility of liveness of groups with their type * Advertise all supported OpenFlow actions in group features * Add enum ofp_group_capabilities * Break out resubmit resource checking * Do not set xlate->exit in xlate_ff_group() if no bucket is alive. The packet will be dropped anyway if there are no further actions and if there are further actions they should be processed. * Add rate-limited warning to bucket_is_alive() * Translation of select groups * At tests for - group deletion (and thus addition) - group features - group desc - group stats - flow mod with group action Key Changes since v6: * Rebase for re-work of "Add support for write-actions" by Ben Pfaff Key Changes since v5: * Add support for translation of fast-failover groups. * Constify some parameters Key Changes since v5: * Add support for translation of fast-failover groups. * Constify some parameters Key Changes since v4: * Rebase * Add OFPACT_DEC_MPLS_TTL to ofpacts_list_to_action_set() This was left out of the OFPACT_DEC_MPLS_TTL update made in v4. Key Changes since v3: * Rebase * As suggested by Jarno Rajahalme - Group instructions in ofpact_is_allowed_in_actions_set() and add comment about why they are exclude from the actions set. - Allow OFPACT_DEC_MPLS_TTL in action set. - Add note about why some non-OpenFlow actions are excluded from the action set - Stop translation of actions if looking up the group of a group actions fails. Previously an attempt was made to send a packet_in message instead. - Process action buckets of groups for write list as a list of actions rather than a set. The action bucket should only be treated as a set if the group action is part of the action set * group parameter of group_dpif_get_buckets() should not be const as the address of one of its fields is assigned to another parameter. * Correct cloning logic in xlate_all_group(). It is the flow that should be reset not the base_flow. Key Changes since v2: * "ovs-ofctl: Handle any number of buckets in group statistics" + As suggested by Ben Pfaff - Vastly simplify the change by using an explicit pointer for the 'bucket_stats' member of struct ofputil_group_stats rather than implicit variable length array appended to the end of the structure. * "ofproto-dpif: Implement group callbacks" and "Translation of indirect and all groups" + Rebase for "ofproto-dpif: Hide struct rule_dpif internally" + Hide group_dpif in a similar manner to rule_dpif Patch list and overall diffstat Simon Horman (16): ofproto: Delete relevant flows on group del ofproto: Fail flow mod if it references a non-existent group ofproto: Add group features test ofproto: Calculate some group stats at ofproto layer ofproto-dpif: Implement group callbacks ofproto: Reject liveness for group types for which is is not supported ofproto: Advertise all supported OpenFlow actions in groups ofproto: Add enum ofp_group_capabilities ofproto: Break out resubmit resource checking ofproto-dpif: Translation of indirect and all groups ofproto: Add group desc and stats tests ofproto: Add del groups test ofproto: At test for flow mod with groups ofproto-dpif: Translation of fast failover groups ofproto-dpif: Translation of select groups ofproto-dpif: Support weight for select groups include/openflow/openflow-common.h | 8 ++ lib/ofp-util.c | 29 ++++- lib/ofp-util.h | 7 ++ ofproto/ofproto-dpif-xlate.c | 242 ++++++++++++++++++++++++++++++++++++- ofproto/ofproto-dpif-xlate.h | 3 +- ofproto/ofproto-dpif.c | 169 ++++++++++++++++++++++++-- ofproto/ofproto-dpif.h | 10 ++ ofproto/ofproto.c | 111 ++++++++++++++--- tests/ofproto-dpif.at | 96 +++++++++++++++ tests/ofproto.at | 161 ++++++++++++++++++++++++ 10 files changed, 802 insertions(+), 34 deletions(-) -- 1.8.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev