Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Loxigen Head commit floodlight/loxigen@56666f9
commit 56666f9ed43c8623901166eb659a44e9bd20ad89
Merge: 85698af 6a9203d
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 6 16:03:43 2015 -0800

    Merge into master from pull request #445:
    Add link_up and link_down counters to ofp_bsn_port_counter. (floodlight/loxigen#445)

commit 6a9203de1ad95bbf1ee0c755d6f5e4dc5d70e493
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Nov 6 16:00:55 2015 -0800

    Add link_up and link_down counters to ofp_bsn_port_counter.
  • Loading branch information
abat committed Nov 7, 2015
1 parent e150e04 commit 27459a6
Show file tree
Hide file tree
Showing 9 changed files with 541 additions and 473 deletions.
952 changes: 487 additions & 465 deletions loci/inc/loci/loci_idents.h

Large diffs are not rendered by default.

24 changes: 18 additions & 6 deletions locitest/src/test_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -274332,12 +274332,12 @@ test_ident_macros(void)
TEST_ASSERT(OF_PORT_MOD_FAILED_BAD_PORT_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(OF_PORT_MOD_FAILED_BAD_PORT_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OF_PORT_MOD_FAILED_BAD_PORT_SUPPORTED(OF_VERSION_1_4));
value = OF_OBJ_TYPE_REQUESTFORWARD;
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_1));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_4));
value = OFP_BSN_PORT_COUNTER_LINK_UP;
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_UP_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_UP_SUPPORTED(OF_VERSION_1_1));
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_UP_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(OFP_BSN_PORT_COUNTER_LINK_UP_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OFP_BSN_PORT_COUNTER_LINK_UP_SUPPORTED(OF_VERSION_1_4));
value = OF_IPV6_EXT_HDR_FLAG_AUTH;
TEST_ASSERT(!OF_IPV6_EXT_HDR_FLAG_AUTH_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OF_IPV6_EXT_HDR_FLAG_AUTH_SUPPORTED(OF_VERSION_1_1));
Expand Down Expand Up @@ -275588,6 +275588,12 @@ test_ident_macros(void)
TEST_ASSERT(OF_SERIAL_NUM_LEN_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(OF_SERIAL_NUM_LEN_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OF_SERIAL_NUM_LEN_SUPPORTED(OF_VERSION_1_4));
value = OF_OBJ_TYPE_REQUESTFORWARD;
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_1));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(!OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OF_OBJ_TYPE_REQUESTFORWARD_SUPPORTED(OF_VERSION_1_4));
value = OF_HELLO_FAILED_EPERM;
TEST_ASSERT(OF_HELLO_FAILED_EPERM_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(OF_HELLO_FAILED_EPERM_SUPPORTED(OF_VERSION_1_1));
Expand Down Expand Up @@ -278230,6 +278236,12 @@ test_ident_macros(void)
TEST_ASSERT(!OF_TABLE_FEATURE_TABLE_SYNC_FROM_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(!OF_TABLE_FEATURE_TABLE_SYNC_FROM_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OF_TABLE_FEATURE_TABLE_SYNC_FROM_SUPPORTED(OF_VERSION_1_4));
value = OFP_BSN_PORT_COUNTER_LINK_DOWN;
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_DOWN_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_DOWN_SUPPORTED(OF_VERSION_1_1));
TEST_ASSERT(!OFP_BSN_PORT_COUNTER_LINK_DOWN_SUPPORTED(OF_VERSION_1_2));
TEST_ASSERT(OFP_BSN_PORT_COUNTER_LINK_DOWN_SUPPORTED(OF_VERSION_1_3));
TEST_ASSERT(OFP_BSN_PORT_COUNTER_LINK_DOWN_SUPPORTED(OF_VERSION_1_4));
value = OFPACFC_UNSUPPORTED;
TEST_ASSERT(!OFPACFC_UNSUPPORTED_SUPPORTED(OF_VERSION_1_0));
TEST_ASSERT(!OFPACFC_UNSUPPORTED_SUPPORTED(OF_VERSION_1_1));
Expand Down
2 changes: 1 addition & 1 deletion loxi-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
85698af624ea341a4e7a1bd868c49f0d649c73a2 Merge into master from pull request #444: Status TLV. (https://github.com/floodlight/loxigen/pull/444)
56666f9ed43c8623901166eb659a44e9bd20ad89 Merge into master from pull request #445: Add link_up and link_down counters to ofp_bsn_port_counter. (https://github.com/floodlight/loxigen/pull/445)
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public enum OFBsnPortCounter {
BSN_PORT_COUNTER_RX_LENGTH_ERRORS((byte) 0x18),
BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS((byte) 0x19),
BSN_PORT_COUNTER_TX_CARRIER_ERRORS((byte) 0x1a),
BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN((byte) 0x1b);
BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN((byte) 0x1b),
BSN_PORT_COUNTER_LINK_UP((byte) 0x1c),
BSN_PORT_COUNTER_LINK_DOWN((byte) 0x1d);

private final byte stableValue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class OFBsnPortCounterSerializerVer13 {
public final static byte BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS_VAL = (byte) 0x19;
public final static byte BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL = (byte) 0x1a;
public final static byte BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL = (byte) 0x1b;
public final static byte BSN_PORT_COUNTER_LINK_UP_VAL = (byte) 0x1c;
public final static byte BSN_PORT_COUNTER_LINK_DOWN_VAL = (byte) 0x1d;

public static OFBsnPortCounter readFrom(ByteBuf bb) throws OFParseError {
try {
Expand Down Expand Up @@ -132,6 +134,10 @@ public static OFBsnPortCounter ofWireValue(byte val) {
return OFBsnPortCounter.BSN_PORT_COUNTER_TX_CARRIER_ERRORS;
case BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN;
case BSN_PORT_COUNTER_LINK_UP_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_LINK_UP;
case BSN_PORT_COUNTER_LINK_DOWN_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_LINK_DOWN;
default:
throw new IllegalArgumentException("Illegal wire value for type OFBsnPortCounter in version 1.3: " + val);
}
Expand Down Expand Up @@ -196,6 +202,10 @@ public static byte toWireValue(OFBsnPortCounter e) {
return BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL;
case BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN:
return BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL;
case BSN_PORT_COUNTER_LINK_UP:
return BSN_PORT_COUNTER_LINK_UP_VAL;
case BSN_PORT_COUNTER_LINK_DOWN:
return BSN_PORT_COUNTER_LINK_DOWN_VAL;
default:
throw new IllegalArgumentException("Illegal enum value for type OFBsnPortCounter in version 1.3: " + e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class OFBsnPortCounterSerializerVer14 {
public final static byte BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS_VAL = (byte) 0x19;
public final static byte BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL = (byte) 0x1a;
public final static byte BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL = (byte) 0x1b;
public final static byte BSN_PORT_COUNTER_LINK_UP_VAL = (byte) 0x1c;
public final static byte BSN_PORT_COUNTER_LINK_DOWN_VAL = (byte) 0x1d;

public static OFBsnPortCounter readFrom(ByteBuf bb) throws OFParseError {
try {
Expand Down Expand Up @@ -132,6 +134,10 @@ public static OFBsnPortCounter ofWireValue(byte val) {
return OFBsnPortCounter.BSN_PORT_COUNTER_TX_CARRIER_ERRORS;
case BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN;
case BSN_PORT_COUNTER_LINK_UP_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_LINK_UP;
case BSN_PORT_COUNTER_LINK_DOWN_VAL:
return OFBsnPortCounter.BSN_PORT_COUNTER_LINK_DOWN;
default:
throw new IllegalArgumentException("Illegal wire value for type OFBsnPortCounter in version 1.4: " + val);
}
Expand Down Expand Up @@ -196,6 +202,10 @@ public static byte toWireValue(OFBsnPortCounter e) {
return BSN_PORT_COUNTER_TX_CARRIER_ERRORS_VAL;
case BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN:
return BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN_VAL;
case BSN_PORT_COUNTER_LINK_UP:
return BSN_PORT_COUNTER_LINK_UP_VAL;
case BSN_PORT_COUNTER_LINK_DOWN:
return BSN_PORT_COUNTER_LINK_DOWN_VAL;
default:
throw new IllegalArgumentException("Illegal enum value for type OFBsnPortCounter in version 1.4: " + e);
}
Expand Down
4 changes: 4 additions & 0 deletions pyloxi/loxi/of13/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@
OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
OFP_BSN_PORT_COUNTER_LINK_UP = 28
OFP_BSN_PORT_COUNTER_LINK_DOWN = 29

ofp_bsn_port_counter_map = {
0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
Expand Down Expand Up @@ -427,6 +429,8 @@
25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
28: 'OFP_BSN_PORT_COUNTER_LINK_UP',
29: 'OFP_BSN_PORT_COUNTER_LINK_DOWN',
}

# Identifiers from group ofp_bsn_port_vxlan_mode
Expand Down
4 changes: 4 additions & 0 deletions pyloxi/loxi/of14/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@
OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
OFP_BSN_PORT_COUNTER_LINK_UP = 28
OFP_BSN_PORT_COUNTER_LINK_DOWN = 29

ofp_bsn_port_counter_map = {
0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
Expand Down Expand Up @@ -456,6 +458,8 @@
25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
28: 'OFP_BSN_PORT_COUNTER_LINK_UP',
29: 'OFP_BSN_PORT_COUNTER_LINK_DOWN',
}

# Identifiers from group ofp_bsn_port_vxlan_mode
Expand Down
4 changes: 4 additions & 0 deletions wireshark/openflow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,8 @@ enum_v4_ofp_bsn_port_counter = {
[25] = "OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS",
[26] = "OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS",
[27] = "OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN",
[28] = "OFP_BSN_PORT_COUNTER_LINK_UP",
[29] = "OFP_BSN_PORT_COUNTER_LINK_DOWN",
}

enum_v4_ofp_packet_in_reason = {
Expand Down Expand Up @@ -2280,6 +2282,8 @@ enum_v5_ofp_bsn_port_counter = {
[25] = "OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS",
[26] = "OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS",
[27] = "OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN",
[28] = "OFP_BSN_PORT_COUNTER_LINK_UP",
[29] = "OFP_BSN_PORT_COUNTER_LINK_DOWN",
}

enum_v5_ofp_packet_in_reason = {
Expand Down

0 comments on commit 27459a6

Please sign in to comment.