Merge into master from pull request #148:
Add bsn_switch_pipeline extension. (https://github.com/floodlight/loxigen/pull/148)
diff --git a/c_gen/c_test_gen.py b/c_gen/c_test_gen.py
index 6068716..83fa4a3 100644
--- a/c_gen/c_test_gen.py
+++ b/c_gen/c_test_gen.py
@@ -129,7 +129,12 @@
m_name == "subtype")):
return True
- if (cls in ["of_bsn_lacp_stats_request", "of_bsn_lacp_stats_reply"] and (
+ classes = ["of_bsn_lacp_stats_request",
+ "of_bsn_lacp_stats_reply",
+ "of_bsn_switch_pipeline_stats_request",
+ "of_bsn_switch_pipeline_stats_reply"]
+
+ if (cls in classes and (
m_name == "experimenter" or
m_name == "subtype")):
return True
diff --git a/c_gen/c_type_maps.py b/c_gen/c_type_maps.py
index 024de52..43cd4a8 100644
--- a/c_gen/c_type_maps.py
+++ b/c_gen/c_type_maps.py
@@ -1071,6 +1071,11 @@
of_message_stats_experimenter_id_set(msg, OF_EXPERIMENTER_ID_BSN);
of_message_stats_experimenter_subtype_set(msg, 1);
break;
+ case OF_BSN_SWITCH_PIPELINE_STATS_REQUEST:
+ case OF_BSN_SWITCH_PIPELINE_STATS_REPLY:
+ of_message_stats_experimenter_id_set(msg, OF_EXPERIMENTER_ID_BSN);
+ of_message_stats_experimenter_subtype_set(msg, 6);
+ break;
default:
break;
}
diff --git a/c_gen/templates/loci_show.h b/c_gen/templates/loci_show.h
index c61866c..70f18d5 100644
--- a/c_gen/templates/loci_show.h
+++ b/c_gen/templates/loci_show.h
@@ -194,6 +194,7 @@
#define LOCI_SHOW_desc_str_sw_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
#define LOCI_SHOW_ser_num_serial_num(writer, cookie, val) LOCI_SHOW_ser_num(writer, cookie, val)
#define LOCI_SHOW_desc_str_dp_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
+#define LOCI_SHOW_desc_str_pipeline(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
#define LOCI_SHOW_octets_data(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
#define LOCI_SHOW_u16_err_type(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
#define LOCI_SHOW_u16_code(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
diff --git a/c_gen/templates/of_type_maps.c b/c_gen/templates/of_type_maps.c
index a48bdf8..fa3e05c 100644
--- a/c_gen/templates/of_type_maps.c
+++ b/c_gen/templates/of_type_maps.c
@@ -870,6 +870,7 @@
case OF_EXPERIMENTER_ID_BSN:
switch (subtype) {
case 1: return OF_BSN_LACP_STATS_REQUEST;
+ case 6: return OF_BSN_SWITCH_PIPELINE_STATS_REQUEST;
}
}
return OF_OBJECT_INVALID;
@@ -882,6 +883,7 @@
case OF_EXPERIMENTER_ID_BSN:
switch (subtype) {
case 1: return OF_BSN_LACP_STATS_REPLY;
+ case 6: return OF_BSN_SWITCH_PIPELINE_STATS_REPLY;
}
}
return OF_OBJECT_INVALID;
diff --git a/c_gen/type_maps.py b/c_gen/type_maps.py
index 480eb29..14e7048 100644
--- a/c_gen/type_maps.py
+++ b/c_gen/type_maps.py
@@ -268,7 +268,8 @@
table_features = 12,
port_desc = 13,
experimenter = 0xffff,
- bsn_lacp = 0xffff
+ bsn_lacp = 0xffff,
+ bsn_switch_pipeline = 0xffff
)
}
@@ -456,6 +457,7 @@
"of_table_features_stats_reply",
"of_bsn_stats_reply",
"of_bsn_lacp_stats_reply",
+ "of_bsn_switch_pipeline_stats_reply",
]
stats_request_list = [
@@ -476,6 +478,7 @@
"of_table_features_stats_request",
"of_bsn_stats_request",
"of_bsn_lacp_stats_request",
+ "of_bsn_switch_pipeline_stats_request",
]
flow_mod_list = [
diff --git a/openflow_input/bsn_switch_pipeline b/openflow_input/bsn_switch_pipeline
new file mode 100644
index 0000000..ff2213f
--- /dev/null
+++ b/openflow_input/bsn_switch_pipeline
@@ -0,0 +1,99 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License,
+// version 1.0 (EPL), with the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may
+// distribute libraries generated by LoxiGen (LoxiGen Libraries)
+// under the terms of your choice, provided that copyright and
+// licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i)
+// included in the LoxiGen Libraries, if distributed in source code
+// form and (ii) included in any documentation for the LoxiGen
+// Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or
+// LOXI Exception. You may obtain a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// 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 EPL for the specific language
+// governing permissions and limitations under the EPL.
+
+#version 4
+
+struct of_bsn_get_switch_pipeline_request : of_bsn_header {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 51;
+};
+
+struct of_bsn_get_switch_pipeline_reply : of_bsn_header {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 52;
+ of_desc_str_t pipeline;
+};
+
+struct of_bsn_set_switch_pipeline_request : of_bsn_header {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 53;
+ of_desc_str_t pipeline;
+};
+
+struct of_bsn_set_switch_pipeline_reply : of_bsn_header {
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 54;
+ uint32_t status;
+};
+
+struct of_bsn_switch_pipeline_stats_request : of_bsn_stats_request {
+ uint8_t version;
+ uint8_t type == 18;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_request_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 6;
+};
+
+struct of_bsn_switch_pipeline_stats_reply : of_bsn_stats_reply {
+ uint8_t version;
+ uint8_t type == 19;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_reply_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x5c16c7;
+ uint32_t subtype == 6;
+ list(of_bsn_switch_pipeline_stats_entry_t) entries;
+};
+
+struct of_bsn_switch_pipeline_stats_entry {
+ of_desc_str_t pipeline;
+};