The test creates an OpenFlow pipeline with deeply nested resubmits
in order to trigger packet drops with the 'too many resubmits' reason.

However, it doesn't use bundles and the priorities on the rules are
the same while matches can technically overlap between the in_port
ones and the dl_type ones.  So, if a packet, e.g., ICMPv6 ND, enters
OVS while the pipeline is not fully configured yet, this packet can
hit only a subset of resubmits that doesn't reach the limit and it
will be sent many times to the local port.  This could confuse the
system and mess up counters, as well as create a lot of unnecessary
traffic.

Let's set the rules up more carefully with proper priorities and
passing ICMPv6 traffic via normal pipeline, so only ICMP packets
generated by the ping will hit the resubmits.  Also using a bundle,
so packets never hit a partially configured pipeline.

Fixes: edf56245b828 ("tests: system-traffic: Add coverage for drop action.")
Signed-off-by: Ilya Maximets <[email protected]>
---
 tests/system-traffic.at | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index 62567028e..6550f90d9 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -2538,14 +2538,17 @@ ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
 
 dnl Exceed the max number of resubmits.
-(echo "dl_type=0x806, actions=normal"
+(
+echo "priority=100, arp, actions=normal"
+echo "priority=100, icmp6, actions=normal"
+
 for i in $(seq 1 64); do
      j=$(expr $i + 1)
-     echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
- done
- echo "in_port=65, actions=local"
+     echo "priority=0, in_port=$i, actions=resubmit:$j, resubmit:$j, local"
+done
+echo "priority=0, in_port=65, actions=local"
 ) > flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
+AT_CHECK([ovs-ofctl add-flows --bundle br0 flows.txt])
 
 dnl Generate some traffic.
 NS_CHECK_EXEC([at_ns0], [ping -q -c 10 -i 0.1 -w 2 10.1.1.2], [1], [ignore])
-- 
2.54.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to