sw test tool: Modify conditions of ofp_packet_in_reason

OF 1.4.0 spec (B.14.2 More descriptive reasons for packet-in) says:

    The main change is that the the "output action" reason OFPR_ACTION is effectively split into four reasons,
    "apply-action", "action-set", "group bucket" and "packet-out", representing the four distinct context
    where this action is used.

A set of reason values for ofp_packet_in message in OF 1.3.3 is:

    enum ofp_packet_in_reason {
        OFPR_NO_MATCH    = 0, /* No matching flow (table-miss flow entry). */
        OFPR_ACTION      = 1, /* Action explicitly output to controller. */
        OFPR_INVALID_TTL = 2, /* Packet has invalid TTL */
    };

And a new set of reason values for ofp_packet_in message in OF 1.4.0 is:

    enum ofp_packet_in_reason {
        OFPR_TABLE_MISS   = 0, /* No matching flow (table-miss flow entry). */
        OFPR_APPLY_ACTION = 1, /* Output to controller in apply-actions. */
        OFPR_INVALID_TTL  = 2, /* Packet has invalid TTL */
        OFPR_ACTION_SET   = 3, /* Output to controller in action set. */
        OFPR_GROUP        = 4, /* Output to controller in group bucket. */
        OFPR_PACKET_OUT   = 5, /* Output to controller in packet-out. */
    };

Therefore, "reason != OFPR_ACTION" means "reason == OFPR_NOMATCH or reason == OFPR_INVALID_TTL".

NOTE: OFPR_TABLE_MISS is defined as OFPR_NO_MATCH in ryu.ofproto.ofproto_v1_4.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
ryu/flags: Add config parameters related sw test tool

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for using user-specified versions

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable using user-specified versions to parse

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable using connected switches to compare

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Modify OFPMatch to normalize

This patch is for avoiding the following issues when using ofproto_v1_4_parser:

  - OFPMatch that is created from JSON keeps unicode strings, instead of usual strings.
  - In OFPMatch that is created from JSON, IPv6 formats like 'ff::0' or '00ff:0000:0000:0000:0000:0000:0000:0000' are not normalized to 'ff::'.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Modify OFPActionSetField to normalize

This patch is for avoiding the following issues when using ofproto_v1_4_parser:

  - OFPActionSetField that is created from JSON keeps unicode strings, instead of usual strings.
  - In OFPActionSetField that is created from JSON, IPv6 formats like 'ff::0' or '00ff:0000:0000:0000:0000:0000:0000:0000' are not normalized to 'ff::'.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: action without set-field)

These test files aim to examine 'action' excluding 'set-field' of FlowMod message.
This patch only copies ryu/tests/switch/of13/action.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: action with set-field only)

These test files aim to examine 'set-field action' of FlowMod message.
This patch only copies ryu/tests/switch/of13/action/25_SET_FIELD.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: match)

These test files aim to examine 'match' of FlowMod message.
This patch only copies ryu/tests/switch/of13/match.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: meter)

These test files aim to examine 'meter instruction' of FlowMod message.
This patch only copies ryu/tests/switch/of13/meter.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: group:all/select)

These test files aim to examine 'group action' of FlowMod message.
This patch only copies ryu/tests/switch/of13/group.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (of14: new features)

OF 1.4.0 spec (B.14.14 PBB UCA header field) says:

    A new OXM field OFPXMT_OFB_PBB_UCA has been added to match the "use customer address" header
    field from the PBB header (EXT-256).

These test files aim to examine new features of 'set-field action' and 'match' of FlowMod message.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>