NTR selection method Signed-off-by: Simon Horman <simon.hor...@netronome.com>
--- This patch does not define any selection method names, however, a subsequent patch proposes a "hash" selection method. v4 * No change v3 * Use NTR instead of NMX as Netronome extension prefix v2 * Use array of TLVs rather than OF1.1 match for fields field of NTR selection method property --- include/openflow/automake.mk | 1 + include/openflow/netronome-ext.h | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 include/openflow/netronome-ext.h diff --git a/include/openflow/automake.mk b/include/openflow/automake.mk index 50933d5..d7dac91 100644 --- a/include/openflow/automake.mk +++ b/include/openflow/automake.mk @@ -1,5 +1,6 @@ openflowincludedir = $(includedir)/openflow openflowinclude_HEADERS = \ + include/openflow/netronome-ext.h \ include/openflow/nicira-ext.h \ include/openflow/openflow-1.0.h \ include/openflow/openflow-1.1.h \ diff --git a/include/openflow/netronome-ext.h b/include/openflow/netronome-ext.h new file mode 100644 index 0000000..8db7b79 --- /dev/null +++ b/include/openflow/netronome-ext.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2014 Netronome. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OPENFLOW_NETRONOME_EXT_H +#define OPENFLOW_NETRONOME_EXT_H 1 + +#include "openflow/openflow.h" +#include "openvswitch/types.h" + +/* The following vendor extension, proposed by Netronome, is not yet + * standardized, so they are not included in openflow.h. It may + * be suitable for standardization */ + + +/* Netronome enhanced select group */ + +enum ntr_group_mod_subtype { + NTRT_SELECTION_METHOD = 1, +}; + +#define NTR_MAX_SELECTION_METHOD_LEN 16 + +struct ntr_group_prop_selection_method { + ovs_be16 type; /* OFPGPT15_EXPERIMENTER. */ + ovs_be16 length; /* Length in bytes of this property + * excluding trailing padding. */ + ovs_be32 experimenter; /* NTR_VENDOR_ID. */ + ovs_be32 exp_type; /* NTRT_SELECTION_METHOD. */ + ovs_be32 pad; + char selection_method[NTR_MAX_SELECTION_METHOD_LEN]; + /* Null-terminated */ + ovs_be64 selection_method_param; /* Non-Field parameter for + * bucket selection. */ + + /* Followed by: + * - Exactly (length - 40) (possibly 0) bytes containing OXM TLVs, then + * - Exactly ((length + 7)/8*8 - length) (between 0 and 7) bytes of + * all-zero bytes + * In summary, ntr_group_prop_selection_method is padded as needed, + * to make its overall size a multiple of 8, to preserve alignment + * in structures using it. + */ + /* uint8_t field_array[0]; */ /* Zero or more fields encoded as + * OXM TLVs where the has_mask bit must + * be zero and the value it specifies is + * a mask to apply to packet fields and + * then input them to the selection + * method of a select group. */ + /* uint8_t pad2[0]; */ +}; +OFP_ASSERT(sizeof(struct ntr_group_prop_selection_method) == 40); + +#endif /* openflow/netronome-ext.h */ -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev