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 <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Simon Horman 2014-04-25 10:20:11 +09:00 committed by FUJITA Tomonori
parent a88bdffab3
commit 9e5e9ce56c

View File

@ -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',