OF 1.3.3 spec (3 Glossary) says:
Flow Entry: an element in a flow table used to match and process packets.
It contains a set of
match fields for matching packets, a priority for matching precedence, a
set of counters to track
packets, and a set of instructions to apply (see 5.2).
According to OF spec, the match fields are treated as the set.
This means that the order of matches which flow_stats message returns is
inconsistant.
This patch corrects the comparison method of matches by sorting in a particular
order before comparison.
Signed-off-by: Yuichi Ito <[email protected]>
---
ryu/tests/switch/tester.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 4b12e29..8954b21 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -810,8 +810,8 @@ class OfTester(app_manager.RyuApp):
value1 = sorted(value1)
value2 = sorted(value2)
elif attr == 'match':
- value1 = __reasm_match(value1)
- value2 = __reasm_match(value2)
+ value1 = sorted(__reasm_match(value1))
+ value2 = sorted(__reasm_match(value2))
if str(value1) != str(value2):
flow_stats = []
for attr in attr_list:
--
1.7.10.4
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel