[ovs-dev] [PATCH/RFC 0/9] Group Select: Selection Method Extension

Simon Horman simon.horman at netronome.com
Wed Nov 19 00:44:54 UTC 2014


Hi,

this patch set implements the group select selection method extension that
I circulated some months ago on the dev at openvswtich.org mailing list.  For
reference a copy of that proposal (updated for the existence of an Open
Flow 1.5 draft and several errors found during implementation) is at the
end of this email.

The implementation makes use of a group experimenter property and
thus depends on my recent work to implement (draft) Open Flow 1.5
groups (ONF EXT-250). That work is already present in the master branch.

The last patch of the series adds an implementation of a hash selection
method to illustrate what a selection method might look like.  It may be
thought of as a less intelligent but more flexible than the default
selection method which I characterise as making hash of L2 and/or L3 fields
depending on which fields are present in the flow.

Simon Horman (9):
  Add Netronome vendor Id
  Add types for NMX selection method
  Support translation of NMX selection method
  Check pre-requisites of selection method fields
  Support decoding of NMX selection method
  Support encoding of NMX selection method
  Support printing of NMX selection method property
  Support NMX selection method in ovs-ofctl group commands
  Implement hash fields select group

 include/openflow/automake.mk       |   1 +
 include/openflow/netronome-ext.h   |  51 +++++++
 include/openflow/openflow-common.h |   1 +
 lib/flow.c                         |  49 ++++++-
 lib/flow.h                         |  16 +++
 lib/nx-match.c                     | 266 ++++++++++++++++++++++++++++++----
 lib/nx-match.h                     |   3 +
 lib/ofp-parse.c                    | 103 +++++++++++++
 lib/ofp-print.c                    |  38 +++--
 lib/ofp-util.c                     | 287 +++++++++++++++++++++++++++++++++++--
 lib/ofp-util.h                     |  16 +++
 ofproto/ofproto-dpif-xlate.c       |  60 +++++++-
 ofproto/ofproto-dpif.c             |  18 +++
 ofproto/ofproto-dpif.h             |   3 +
 ofproto/ofproto-provider.h         |   9 ++
 ofproto/ofproto.c                  |  77 +++++++---
 tests/ofp-print.at                 |  16 ++-
 tests/ofproto-dpif.at              |  20 +++
 tests/ofproto.at                   |   4 +-
 utilities/ovs-ofctl.8.in           |  23 ++-
 20 files changed, 983 insertions(+), 78 deletions(-)
 create mode 100644 include/openflow/netronome-ext.h

-- 
2.1.1

Proposal: Proposal for Group Selection Method Property
Version: 0.0.3


Contents
========

1. Introduction
2. How it Works
3. Experimenter Id
4. Experimenter Messages
5. History


1. Introduction
===============

This text describes a Netronome Extension to (draft) OpenFlow 1.5 that allows a
controller to provide more information on the selection method for select
groups.  This proposal is in the form of an enhanced select group type.

This may subsequently be proposed as an extension or update to
the OpenFlow specification.


2. How it works
===============

A new Netronome group experimenter property is defined which provides
compatibility with the group mod message defined in draft Open Flow 1.5
(also known as ONF EXT-350) .5 and allows parameters for the selection
method of select groups to be passed by the controller. In particular it
allows controllers to:

* Specify the fields used for bucket selection by the select group.

* Designate the selection method used.

* Provide a non-field parameter to the selection method.


3. Experimenter ID
==================

The Experimenter ID of this extension is:

NMX_VENDOR_ID = 0x00001540


4. Group Experimenter Property
==============================

The following group property experimenter type defined by this extension.

enum nmx_group_mod_subtype {
	NMXT_SELECTION_METHOD = 1,
};


Modifications to the group table from the controller may be done with a
OFPT_GROUP_MOD message described (draft) Open Flow 1.5.  Group Entry
Message. Of relevance here is that (draft) Open Flow 1.5 group messages
have properties.

This proposal is defined in terms of an implementation of struct
ofp_group_prop_experimenter which is described in (draft) Open Flow 1.5.
The implementation is:

struct nmx_group_prop_selection_method {
    ovs_be16 type;                  /* OFPGPT_EXPERIMENTER. */
    ovs_be16 length;                /* Length in bytes of this property. */
    ovs_be32 experimenter;          /* NMX_VENDOR_ID. */
    ovs_be32 exp_type;              /* NMXT_SELECTION_METHOD. */
    ovs_be32 pad;
    char selection_method[NMX_MAX_SELECTION_METHOD_LEN];
                                    /* Null-terminated */
    ovs_be64 selection_method_param;  /* Non-Field parameter for
                                       * bucket selection. */
    struct ofp_match fields;        /* Fields used for bucket selection.
                                     * Variable size. */
};
OFP_ASSERT(sizeof(struct nmx_group_mod) == 56);


This property may only be used with group mod messages whose:
* command is OFPGC_ADD or OFPGC_MODIFY; and
* type is OFPGT_SELECT


The type field is the OFPGPT_EXPERIMENTER which is
defined in EXT-350 as 0xffff.


The experimenter field is the Experimenter ID (see 3).


The exp_type field is NMXT_SELECTION_METHOD.


The group selection_method is a null-terminated string which if non-zero
length specifies a selection method known to an underlying layer of the
switch. The value of NMX_MAX_SELECTION_METHOD_LEN is 16.

The group selection_method may be zero-length to request compatibility with
Open Flow 1.4.


The selection_method_param provides a non-field parameter for
the group selection_method. It must be all-zeros unless the
group selection_method is non-zero length.

The selection_method_param may for example be used as an initial value for
the hash of a hash group selection method.


The fields field is an ofp_match structure which includes the fields which
should be used as inputs to bucket selection. ofp_match is described in
Open Flow 1.4 section 7.2.2 Flow Match Structures.

Fields must not be specified unless the group selection_method is non-zero
length.

The pre-requisites for fields specified must be satisfied in the match for
any flow that uses the group.

Masking is allowed but not required for fields whose TLVs allow masking.

The fields may for example be used as the fields that are hashed
by a hash group selection method.


5. History
==========

This proposal has been developed independently of any similar work in this
area. No such work is known.



More information about the dev mailing list