From d9a672876a910fd828017a881e399e4dc51ca7d9 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Fri, 6 Sep 2019 11:49:04 +0300 Subject: [PATCH 1/2] [simple-fib] Fix vm CPU hog issue in ECMP test. The ecmp test test works by sending 10000 packets to DUT and then checking whether the load is balanced. However, the default mtu for this test case is 9112. With such mtu the VM CPU utilization can rise to 100%, which prevent routing protocols and LACP from running and then causes routing entries on DUT withdrawn and LAG interfaces flapped and fails the test. Fix the issue by using 1500 as the MTU to avoid hogging VM CPU. --- ansible/roles/test/tasks/simple-fib.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/test/tasks/simple-fib.yml b/ansible/roles/test/tasks/simple-fib.yml index 889538da3c3..c5eb4775566 100644 --- a/ansible/roles/test/tasks/simple-fib.yml +++ b/ansible/roles/test/tasks/simple-fib.yml @@ -6,7 +6,7 @@ - debug : msg="Start FIB Test" -- set_fact: mtu=9114 +- set_fact: mtu=1500 when: mtu is not defined - name: "Start PTF runner" From 51c8854591c9d8c6c36bd522f7d74e155cfe08ef Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Sat, 7 Sep 2019 02:16:32 +0300 Subject: [PATCH 2/2] [fib_test.py] add more information when assert failure --- ansible/roles/test/files/ptftests/fib_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/test/files/ptftests/fib_test.py b/ansible/roles/test/files/ptftests/fib_test.py index 8f085c945f7..7f648d59923 100644 --- a/ansible/roles/test/files/ptftests/fib_test.py +++ b/ansible/roles/test/files/ptftests/fib_test.py @@ -277,7 +277,7 @@ def check_balancing(self, dest_port_list, port_hit_cnt): % ("LAG", str(member), total_entry_hit_cnt/len(ecmp_entry), port_hit_cnt.get(member, 0), str(round(p, 4)*100) + '%')) result &= r - assert result + assert result, "dest port list {}, port hit count {}".format(dest_port_list, port_hit_cnt) #---------------------------------------------------------------------