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 <[email protected]>
---
ryu/tests/switch/tester.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index a59205e..98788a9 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -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):
--
1.7.10.4
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel