OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above the set-field actions for IPv6 addresses are
inconsistent if it the flow does not match on the IPv6 dl_type.

This patch add such a match for those that have set-field actions
for IPv6 addresses.

Also enable these tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <[email protected]>
---
 ryu/tests/integrated/test_add_flow_v12_actions.py | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/ryu/tests/integrated/test_add_flow_v12_actions.py 
b/ryu/tests/integrated/test_add_flow_v12_actions.py
index 52a5bfb..9fbe47f 100644
--- a/ryu/tests/integrated/test_add_flow_v12_actions.py
+++ b/ryu/tests/integrated/test_add_flow_v12_actions.py
@@ -340,14 +340,20 @@ class RunTest(tester.TestFlowBase):
         ipv6_src = '7527:c798:c772:4a18:117a:14ff:c1b6:e4ef'
         value = self.ipv6_to_int(ipv6_src)
 
-        self.add_set_field_action(dp, field, value)
+        match = dp.ofproto_parser.OFPMatch()
+        match.set_dl_type(0x86dd)
+
+        self.add_set_field_action(dp, field, value, match)
 
     def test_action_set_field_ipv6_dst(self, dp):
         field = dp.ofproto.OXM_OF_IPV6_DST
         ipv6_dst = '8893:65b3:6b49:3bdb:3d2:9401:866c:c96'
         value = self.ipv6_to_int(ipv6_dst)
 
-        self.add_set_field_action(dp, field, value)
+        match = dp.ofproto_parser.OFPMatch()
+        match.set_dl_type(0x86dd)
+
+        self.add_set_field_action(dp, field, value, match)
 
     def test_action_set_field_ipv6_flabel(self, dp):
         field = dp.ofproto.OXM_OF_IPV6_FLABEL
@@ -466,8 +472,13 @@ class RunTest(tester.TestFlowBase):
         unsupported = [
             'test_action_set_field_ip_proto',
             'test_action_set_field_dl_type',
-            'test_action_set_field_ipv6',
             'test_action_set_field_icmp',
+            'test_action_set_field_icmpv6_code',
+            'test_action_set_field_icmpv6_type',
+            'test_action_set_field_ipv6_flabel',
+            'test_action_set_field_ipv6_nd_sll',
+            'test_action_set_field_ipv6_nd_target',
+            'test_action_set_field_ipv6_nd_tll',
             'test_action_copy_ttl_in',
             'test_action_copy_ttl_out',
             'test_action_dec_mpls_ttl',
-- 
1.8.5.2


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to