[ovs-dev] [PATCH/RFC 2/9] Add types for NMX selection method

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


NMX selection method
Signed-off-by: Simon Horman <simon.horman at netronome.com>
---
 include/openflow/automake.mk     |  1 +
 include/openflow/netronome-ext.h | 51 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 include/openflow/netronome-ext.h

diff --git a/include/openflow/automake.mk b/include/openflow/automake.mk
index 512991e..2fe08a0 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..638f209
--- /dev/null
+++ b/include/openflow/netronome-ext.h
@@ -0,0 +1,51 @@
+/*
+ * 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 nmx_group_mod_subtype {
+        NMXT_SELECTION_METHOD = 1,
+};
+
+#define NMX_MAX_SELECTION_METHOD_LEN 16
+
+struct nmx_group_prop_selection_method {
+    ovs_be16 type;                  /* OFPGPT15_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 ofp11_match fields;    * Fields used for bucket selection.
+                                     * Variable size. */
+};
+OFP_ASSERT(sizeof(struct nmx_group_prop_selection_method) == 40);
+
+#endif /* openflow/netronome-ext.h */
-- 
2.1.1




More information about the dev mailing list