[CORD-544] Adds VPWS extensions in Loxi
Changes:
- Adds VPWS actions in Loxi;
- Adds VPWS OXMs in Loxi;
- Improves .gitignore;
Change-Id: I266702148bbed99cc8c91e2cb00b0b556018814e
diff --git a/.gitignore b/.gitignore
index f4243d4..1a13c65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
/bin
*,cover
/.coverage
+*.iml
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index af3abd5..eede14e 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -667,7 +667,7 @@
'of_oxm_bsn_in_ports_128' : { 'value': port_bitmap_128 },
'of_oxm_bsn_in_ports_128_masked' : { 'value': port_bitmap_128, 'value_mask': port_bitmap_128 },
-
+
'of_oxm_bsn_in_ports_256' : { 'value': port_bitmap_256 },
'of_oxm_bsn_in_ports_256_masked' : { 'value': port_bitmap_256, 'value_mask': port_bitmap_256 },
@@ -836,7 +836,7 @@
'of_oxm_nsh_c4' : { 'value' : u32obj },
'of_oxm_nsh_c4_masked' : { 'value' : u32obj, 'value_mask' : u32obj },
-
+
'of_oxm_nsh_mdtype' : { 'value' : u8obj },
'of_oxm_nsh_mdtype_masked' : { 'value' : u8obj, 'value_mask' : u8obj },
@@ -868,6 +868,13 @@
'of_oxm_tun_gpe_flags_masked' : { 'value' : u8obj, 'value_mask' : u8obj },
'of_oxm_ofdpa_mpls_type': { 'value': u16obj },
+
+ 'of_oxm_ofdpa_qos_index': { 'value': u8obj },
+
+ 'of_oxm_ofdpa_mpls_l2_port': { 'value': u32obj },
+ 'of_oxm_ofdpa_mpls_l2_port_masked': { 'value': u32obj, 'value_mask': u32obj },
+
+ 'of_oxm_ofdpa_ovid': { 'value': u16obj },
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
index de3af17..9a8b4ef 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
@@ -387,6 +387,16 @@
public final static MatchField<U16> OFDPA_MPLS_TYPE =
new MatchField<U16>("ofdpa_mpls_type", MatchFields.OFDPA_MPLS_TYPE);
+ public final static MatchField<U8> OFDPA_QOS_INDEX =
+ new MatchField<U8>("ofdpa_qos_index", MatchFields.OFDPA_QOS_INDEX);
+
+ public final static MatchField<U32> OFDPA_MPLS_L2_PORT =
+ new MatchField<U32>("ofdpa_mpls_l2_port", MatchFields.OFDPA_MPLS_L2_PORT);
+
+ public final static MatchField<U16> OFDPA_OVID =
+ new MatchField<U16>("ofdpa_ovid", MatchFields.OFDPA_OVID,
+ new Prerequisite<OFVlanVidMatch>(MatchField.VLAN_VID));
+
public String getName() {
return name;
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
index bdf44ea..1f1556c 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
@@ -103,5 +103,8 @@
TUN_GBP_FLAGS,
TUN_GPE_NP,
TUN_GPE_FLAGS,
+ OFDPA_QOS_INDEX,
OFDPA_MPLS_TYPE,
+ OFDPA_MPLS_L2_PORT,
+ OFDPA_OVID,
}
diff --git a/openflow_input/ofdpa b/openflow_input/ofdpa
index 47aa11e..c11aa89 100644
--- a/openflow_input/ofdpa
+++ b/openflow_input/ofdpa
@@ -1,7 +1,14 @@
#version 4
-struct of_oxm_ofdpa_mpls_type : of_oxm {
- uint32_t type_len == 0xFFFF2E06;
- uint32_t experimenter_id == 0x1018;
- uint16_t value;
+// Here we define the general structures for the OFDPA extensions
+
+// This structure represents an ofdpa experimental action
+// See ofdpa_actions for further specifications
+struct of_action_ofdpa : of_action_experimenter {
+ uint16_t type == 65535;
+ uint16_t len;
+ uint32_t experimenter == 0x1018;
+ uint16_t exp_type == ?;
+ pad(6);
};
+
diff --git a/openflow_input/ofdpa_actions b/openflow_input/ofdpa_actions
new file mode 100644
index 0000000..c24cc92
--- /dev/null
+++ b/openflow_input/ofdpa_actions
@@ -0,0 +1,42 @@
+#version 4
+
+// Here we define the experimental actions supported by OFDPA pipeline
+
+// Push l2 header action. This action push an other ethernet
+// header on top of the previous one.
+struct of_action_ofdpa_push_l2_header : of_action_ofdpa {
+ uint16_t type == 65535;
+ uint16_t len;
+ uint32_t experimenter == 0x1018;
+ uint16_t exp_type == 1;
+ pad(6);
+};
+
+// Pop l2 header action. This action pop the outer ethernet
+// header.
+struct of_action_ofdpa_pop_l2_header : of_action_ofdpa {
+ uint16_t type == 65535;
+ uint16_t len;
+ uint32_t experimenter == 0x1018;
+ uint16_t exp_type == 2;
+ pad(6);
+};
+
+// Push MPLS-TP PW Control Word. The Control Word is initialized to zero.
+struct of_action_ofdpa_push_cw : of_action_ofdpa {
+ uint16_t type == 65535;
+ uint16_t len;
+ uint32_t experimenter == 0x1018;
+ uint16_t exp_type == 3;
+ pad(6);
+};
+
+// Pop MPLS-TP PW Control Word or Associated Channel Header.
+// Used in MPLS bottom of stack label match actions.
+struct of_action_ofdpa_pop_cw : of_action_ofdpa {
+ uint16_t type == 65535;
+ uint16_t len;
+ uint32_t experimenter == 0x1018;
+ uint16_t exp_type == 4;
+ pad(6);
+};
\ No newline at end of file
diff --git a/openflow_input/ofdpa_match_fields b/openflow_input/ofdpa_match_fields
new file mode 100644
index 0000000..5ebd19b
--- /dev/null
+++ b/openflow_input/ofdpa_match_fields
@@ -0,0 +1,40 @@
+#version 4
+
+// Here we define the experimental match fields supported by OFDPA pipeline
+
+// This struct defines QoS
+struct of_oxm_ofdpa_qos_index : of_oxm {
+ uint32_t type_len == 0xFFFF0A05;
+ uint32_t experimenter_id == 0x1018;
+ uint8_t value;
+};
+
+// This struct defines MPLS_TYPE
+struct of_oxm_ofdpa_mpls_type : of_oxm {
+ uint32_t type_len == 0xFFFF2E06;
+ uint32_t experimenter_id == 0x1018;
+ uint16_t value;
+};
+
+// This struct defines MPLS_L2_PORT
+struct of_oxm_ofdpa_mpls_l2_port : of_oxm {
+ uint32_t type_len == 0xFFFF1008;
+ uint32_t experimenter_id == 0x1018;
+ uint32_t value;
+};
+
+// This struct defines the masked version of MPLS_L2_PORT
+struct of_oxm_ofdpa_mpls_l2_port_masked : of_oxm {
+ uint32_t type_len == 0xFFFF110C;
+ uint32_t experimenter_id == 0x1018;
+ uint32_t value;
+ uint32_t value_mask;
+};
+
+// This struct defines the OVID
+struct of_oxm_ofdpa_ovid : of_oxm {
+ uint32_t type_len == 0xFFFF1406;
+ uint32_t experimenter_id == 0x1018;
+ uint16_t value;
+};
+