[ovs-dev] [PATCH v3 05/16] ofp-actions: Add clone action.

William Tu u9012063 at gmail.com
Wed Dec 21 18:28:33 UTC 2016


sorry, I forgot to add priority. Below lower the priority of the NORMAL action.

diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index d70c5c3..321a901 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -340,6 +340,7 @@ AT_CLEANUP
 AT_SETUP([datapath - clone action])
 OVS_TRAFFIC_VSWITCHD_START()

+AT_CHECK([ovs-ofctl add-flow br0 "priority=1 actions=normal"])
 ADD_NAMESPACES(at_ns0, at_ns1, at_ns2)

 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
@@ -352,9 +353,9 @@ AT_CHECK([ovs-vsctl -- set interface ovs-p2
ofport_request=3])

 dnl verify that the clone(...) won't affect the original packet, so
ping still works OK
 dnl without 'output' in 'clone()'
-AT_CHECK([ovs-ofctl add-flow br0
"in_port=1,ip,actions=clone(mod_dl_dst(50:54:00:00:00:0a),set_field:192.168.3.3->ip_dst),
output:2"])
+AT_CHECK([ovs-ofctl add-flow br0 "priority=99
in_port=1,ip,actions=clone(mod_dl_dst(50:54:00:00:00:0a),set_field:192.168.3.3->ip_dst),
output:2"])
 dnl with 'output' in 'clone()'
-AT_CHECK([ovs-ofctl add-flow br0
"in_port=2,ip,actions=clone(mod_dl_dst(50:54:00:00:00:0b),set_field:192.168.4.4->ip_dst,
output:3), output:1"])
+AT_CHECK([ovs-ofctl add-flow br0 "priority=99
in_port=2,ip,actions=clone(mod_dl_dst(50:54:00:00:00:0b),set_field:192.168.4.4->ip_dst,
output:3), output:1"])

 NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 |
FORMAT_PING], [0], [dnl
 3 packets transmitted, 3 received, 0% packet loss, time 0ms

Regards,
William

On Wed, Dec 21, 2016 at 10:21 AM, Joe Stringer <joe at ovn.org> wrote:
> On 21 December 2016 at 07:45, William Tu <u9012063 at gmail.com> wrote:
>> Hi Joe,
>>
>> I think we're missing the normal action for handling the non-IP
>> traffic. Can you try this patch on top of the clone?
>>
>> --- a/tests/system-traffic.at
>> +++ b/tests/system-traffic.at
>> @@ -340,6 +340,7 @@ AT_CLEANUP
>>  AT_SETUP([datapath - clone action])
>>  OVS_TRAFFIC_VSWITCHD_START()
>>
>> +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
>>  ADD_NAMESPACES(at_ns0, at_ns1, at_ns2)
>>
>>  ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
>
> If you force all traffic to be handled with this flow, then the test
> will pass but it will not be testing anything.
>
> Looking at the test, I don't really follow how it is supposed to be
> guaranteeing that the expected actions are executed on both copies of
> the packet. Could you explain it?


More information about the dev mailing list