Skip to content

Commit

Permalink
Initial test of optical OXC experimenter messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Praseed Balakrishnan committed Sep 6, 2014
1 parent e9f250b commit f78068b
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 1 deletion.
2 changes: 2 additions & 0 deletions c_gen/c_test_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def var_name_map(m_type):
of_bsn_vport_q_in_q_t="vport",
of_bitmap_128_t="bitmap_128",
of_checksum_128_t="checksum_128",
#Circuit extensions
oxm_of_och_sig_id_t="sig_id",
)

if m_type.find("of_list_") == 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ private MatchField(final String name, final MatchFields id, Prerequisite<?>... p
public final static MatchField<ClassId> BSN_VLAN_XLATE_PORT_GROUP_ID =
new MatchField<ClassId>("bsn_vlan_xlate_port_group_id", MatchFields.BSN_VLAN_XLATE_PORT_GROUP_ID);


public final static MatchField<U64> OCH_SIGID =
new MatchField<U64>("och_sigid",
MatchFields.OCH_SIGID);

public final static MatchField<U64> OCH_SIGTYPE =
new MatchField<U64>("och_sigid",
MatchFields.OCH_SIGTYPE);

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ public enum MatchFields {
BSN_UDF7,
BSN_TCP_FLAGS,
BSN_VLAN_XLATE_PORT_GROUP_ID,
OCH_SIGID,
OCH_SIGTYPE;
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ public void testGetCanonicalNormalMask() {
OFOxm<IPv4Address> canonical = ipv4SrcMasked.getCanonical();
assertEquals(ipv4SrcMasked, canonical);
}


}
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
package org.projectfloodlight.protocol.match;

import org.junit.Test;
import org.projectfloodlight.openflow.protocol.OFFactories;
import org.projectfloodlight.openflow.protocol.OFVersion;
import org.projectfloodlight.openflow.protocol.match.Match;
import org.projectfloodlight.openflow.protocol.match.MatchField;
import org.projectfloodlight.openflow.types.U64;

public class MatchFieldIteration13Test extends MatchFieldIterationBase {
public MatchFieldIteration13Test() {
super(OFFactories.getFactory(OFVersion.OF_13));
}

@Test
public void matchCircuitFields()
{
Match.Builder builder = factory.buildMatchV3().setExact(MatchField
.OCH_SIGTYPE, U64.ZERO);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class MatchFieldIterationBase {

private OFFactory factory;
protected OFFactory factory;

protected MatchFieldIterationBase(OFFactory factory) {
this.factory = factory;
Expand Down
104 changes: 104 additions & 0 deletions openflow_input/circuit
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#version 4

/* WDM grid types */
enum ofp_grid_type {
OFPGRIDT_RES = 0,
OFPGRIDT_DWDM = 1,
OFPGRIDT_CWDM = 2,
OFPGRIDT_FLEX = 3,
};

/* WDM grid channel spacing */
enum ofp_channel_spacing {
OFPCS_RES = 0,
OFPCS_GHZ_100 = 1,
OFPCS_GHZ_50 = 2,
OFPCS_GHZ_24 = 3,
OFPCS_GHZ_12P5 = 4, /* 12.5 GHZ */
OFPCS_GHZ_6P25 = 5, /* 6.25 GHZ */
};

/* Layer classes (families) supported for optical transport port. */
enum ofp_port_optical_transport_layer_class {
OFPPOTL_PORT = 1, /* Class of base port layer signal types */
OFPPOTL_OCH = 2, /* Class of OCH layer signal types*/
OFPPOTL_ODU = 3, /* Class of ODU layer signal types*/
OFPPOTL_ODUCLT = 4, /* Class of ODU client layer signal types*/
};

/* Base port layer signal types */
enum ofp_otport_signal_type {
OFPOTPT_OTSn = 1,
OFPOTPT_OMSn = 2,
OFPOTPT_OPSn = 3,
OFPOTPT_OPSM = 4,
OFPOTPT_OCH = 5,
OFPOTPT_OTU1 = 11,
OFPOTPT_OTU2 = 12,
OFPOTPT_OTU3 = 13,
OFPOTPT_OTU4 = 14,
};

/* OCH layer signal types */
enum ofp_och_signal_type {
OFPOCHT_FIX_GRID = 1,
OFPOCHT_FLEX_GRID = 2,
};


struct oxm_of_och_sig_id {

uint8_t grid; //Type of WDM grid - OFPGRIDT_*
uint8_t cs; //Channel Spacing - OFPCS_*
uint16_t n; // Used to calculate frequency as in [ITU G.694.1]
// Frequency(THz)= 193.1 THz + n * chan_spacing
uint16_t m; // Used to calculate spectral width [ITU G.694.1]
// Spectral Width (GHz) = m * 12.5
// For fix grid networks, m=1
};

// circuit extension message
struct of_circuit_header : of_experimenter {
uint8_t version;
uint8_t type == 4;
uint16_t length;
uint32_t xid;
uint32_t experimenter == 0xffff;
uint32_t subtype == ?;
uint8_t sigtype;
oxm_of_och_sig_id_t sig_id;
};



// circuit extension action
struct of_action_circuit: of_action_experimenter {
uint16_t type == 65535;
uint16_t len;
uint32_t experimenter == 0xffff;

};

struct of_circuit_ports_request : of_experimenter_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 == 0x5c16c8;
uint32_t subtype == 15;
};

struct of_circuit_ports_reply : of_experimenter_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 == 0x5c16c8;
uint32_t subtype == ?;
};
16 changes: 16 additions & 0 deletions openflow_input/oxm-1.3
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,19 @@ struct of_oxm_tunnel_id_masked : of_oxm {
uint64_t value;
uint64_t value_mask;
};

struct of_oxm_och_sigtype : of_oxm {
uint32_t type_len == 0x80005c08;
uint64_t value;
};


struct of_oxm_och_sigid : of_oxm {
uint32_t type_len == 0x80005d10;
uint64_t value;
};





0 comments on commit f78068b

Please sign in to comment.