Skip to content

Commit

Permalink
Calient flow and port stat updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc De Leenheer committed Jul 24, 2015
1 parent 1e82b4b commit 88c0bcb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
9 changes: 9 additions & 0 deletions c_gen/of_g_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@
5: "of_match_v3_t", # Currently uses same match as 1.2 (v3).
"short_name":"match"
},
of_calient_port_desc_stats_entry_t = {
1: "of_calient_port_desc_stats_entry_t",
2: "of_calient_port_desc_stats_entry_t",
3: "of_calient_port_desc_stats_entry_t",
4: "of_calient_port_desc_stats_entry_t",
5: "of_calient_port_desc_stats_entry_t",
"short_name":"calient_port_desc_stats_entry"
},

)

## Base data types
Expand Down
3 changes: 3 additions & 0 deletions java_gen/java_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ def gen_fixed_length_string_jtype(length):

generic_t = JType("T")

calient_port_desc_stats_entry = JType('OFCalientPortDescStatsEntry').op(read='OFCalientPortDescStatsEntryVer$version.READER.readFrom(bb)', write='$name.writeTo(bb)')

table_desc = JType('OFTableDesc') \
.op(read='OFTableDescVer$version.READER.readFrom(bb)', \
write='$name.writeTo(bb)')
Expand Down Expand Up @@ -580,6 +582,7 @@ def gen_fixed_length_string_jtype(length):
'of_str64_t': str64,
'of_str32_t': str32,
'of_str6_t': str6,
'of_calient_port_desc_stats_entry_t': calient_port_desc_stats_entry,
'of_ipv4_t': ipv4,
'of_ipv6_t': ipv6,
'of_wc_bmap_t': flow_wildcards,
Expand Down
9 changes: 4 additions & 5 deletions openflow_input/calient_flow_stats
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct of_calient_flow_stats_request : of_calient_stats_request {
uint32_t subtype == 2; /* OFPEMPFS = 2 */
uint8_t table_id; /* Recommended to be set to 0. Ignored */
pad(3);
uint32_t out_port; /* Require matching entries to include this as an output port.
of_port_no_t out_port; /* Require matching entries to include this as an output port.
A value of OFPP_ANY indicates no restriction. Ignored */
uint32_t out_group; /* Require matching entries to include this as an output group.
A value of OFPP_ANY indicates no restriction. Ignored */
Expand Down Expand Up @@ -40,7 +40,7 @@ enum ofp_calient_cflow_Capability(wire_type=uint8_t, bitmask=True){
OFPCCS_Failed = 2, /* Connection has Failed */
OFPCCS_Initializing = 3,/* Connection making is in progress */
};

/*oper_capability,alarm,cflow_name not present in the backend */
struct of_calient_flow_stats_entry {
uint16_t length;
uint8_t table_id; /* Ignored */
Expand All @@ -57,6 +57,7 @@ struct of_calient_flow_stats_entry {
enum ofp_calient_cflow_operational_state oper_status; /* OS = UMA/OOS */
enum ofp_calient_cflow_Capability oper_capability; /* OC = FAIL/OK/INIT */
enum ofp_calient_ocs_alarm alarm; /* Alarm = NA/MJ/MN/CR */
of_port_no_t out_port;
of_str6_t port_power;
pad(2);
of_str6_t connected_port_power;
Expand All @@ -76,9 +77,7 @@ struct of_calient_flow_stats_reply : of_calient_stats_reply {
pad(4);
uint32_t experimenter == 0x0080F958;
uint32_t subtype == 2;
uint16_t data_length;
pad(6);
list(of_calient_flow_stats_entry_t)flow_stats;
list(of_calient_flow_stats_entry_t)entries;
};


14 changes: 13 additions & 1 deletion openflow_input/calient_port_desc_stats
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct of_calient_port_desc_prop_optical : of_calient_port_desc_prop{
uint16_t length; /* Length in bytes of this property. */
enum ofp_calient_optical_port_admin_state in_admin_status;
enum ofp_calient_optical_port_oper_state in_oper_status;
enum ofp_calient_optical_port_oper_capability in_oper_capability;
enum ofp_calient_optical_port_oper_capability in_oper_capability;/* currently not present in backend */
enum ofp_calient_optical_port_admin_state out_admin_status;
enum ofp_calient_optical_port_oper_state out_oper_status;
enum ofp_calient_optical_port_oper_capability out_oper_capability;
Expand Down Expand Up @@ -90,3 +90,15 @@ struct of_calient_port_desc_stats_reply : of_calient_stats_reply {
};


struct of_calient_port_status : of_experimenter{
uint8_t version;
uint8_t type == 4;
uint16_t length;
uint32_t xid;
uint32_t experimenter == 0x0080F958;
uint32_t subtype == 1;
enum ofp_port_reason reason;
pad(7);
of_calient_port_desc_stats_entry_t desc;
};

4 changes: 2 additions & 2 deletions openflow_input/calient_port_stats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct of_calient_port_stats_request : of_calient_stats_request {
};


/* in_admin_status,in_oper_status,in_oper_capability,in_alarm,in_circuit_id not present in the backkend */
struct of_calient_port_stats_entry {
uint16_t length;
pad(2);
Expand All @@ -23,6 +24,7 @@ struct of_calient_port_stats_entry {
enum ofp_calient_optical_port_oper_state in_oper_status; /* Input port operational status */
enum ofp_calient_optical_port_oper_capability in_oper_capability; /* Input port operational capability */
enum ofp_calient_ocs_alarm in_alarm;/* Alarm on Input port */
pad(4);
of_str6_t inport_power; /* Input port power */
pad(2);
of_str6_t outport_power; /* Output port power */
Expand All @@ -46,8 +48,6 @@ struct of_calient_port_stats_reply : of_calient_stats_reply {
pad(4);
uint32_t experimenter == 0x0080F958;
uint32_t subtype == 3;
uint16_t data_length;
pad(6);
list(of_calient_port_stats_entry_t) entries;
};

Expand Down

0 comments on commit 88c0bcb

Please sign in to comment.