From 9e5e9ce56c3d571b4615de043cf3dee1a110a58a Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 25 Apr 2014 10:20:11 +0900 Subject: [PATCH] tests/integrated: Match on IP dl_type for flows with set IPv6 addresses 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 Signed-off-by: FUJITA Tomonori --- .../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 52a5bfb5..9fbe47f9 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',