mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-09 06:16:10 +02:00
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>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
63451ce0a2
commit
6942189d8f
@ -642,7 +642,8 @@ class OfTester(app_manager.RyuApp):
|
||||
if msg.datapath.id != pkt_in_src_model.dp.id:
|
||||
pkt_type = 'packet-in'
|
||||
err_msg = 'SW[dpid=%s]' % dpid_lib.dpid_to_str(msg.datapath.id)
|
||||
elif msg.reason != ofproto_v1_3.OFPR_ACTION:
|
||||
elif msg.reason == msg.datapath.ofproto.OFPR_NO_MATCH or \
|
||||
msg.reason == msg.datapath.ofproto.OFPR_INVALID_TTL:
|
||||
pkt_type = 'packet-in'
|
||||
err_msg = 'OFPPacketIn[reason=%d]' % msg.reason
|
||||
elif repr(msg.data) != repr(model_pkt):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user