diff mbox series

tests/Test_mtu_update:tests/Test_mtu_update start testpmd with extra parameters on melx

Message ID 20201222201916.64391-1-dliu@iol.unh.edu (mailing list archive)
State Accepted
Headers show
Series tests/Test_mtu_update:tests/Test_mtu_update start testpmd with extra parameters on melx | expand

Commit Message

dliu Dec. 22, 2020, 8:19 p.m. UTC
Fix only tx ports are being configurated

Fix package import

melx machine need different parameters to start testpmd

Signed-off-by: David Liu <dliu@iol.unh.edu>
---
 tests/TestSuite_mtu_update.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Tu, Lijuan Dec. 23, 2020, 3 a.m. UTC | #1
> Fix only tx ports are being configurated
> 
> Fix package import
> 
> melx machine need different parameters to start testpmd
> 
> Signed-off-by: David Liu <dliu@iol.unh.edu>

Applied with commit message changed
diff mbox series

Patch

diff --git a/tests/TestSuite_mtu_update.py b/tests/TestSuite_mtu_update.py
index 6e425dcb..4fe697b4 100644
--- a/tests/TestSuite_mtu_update.py
+++ b/tests/TestSuite_mtu_update.py
@@ -51,8 +51,8 @@  import time
 from test_case import TestCase
 from pktgen import TRANSMIT_CONT
 
-from framework.packet import Packet
-from framework.settings import HEADER_SIZE
+from packet import Packet
+from settings import HEADER_SIZE
 
 ETHER_HEADER_LEN = 18
 IP_HEADER_LEN = 20
@@ -208,6 +208,7 @@  class TestMtuUpdate(TestCase):
         @return: None
         """
         self.admin_tester_port(self.tester.get_local_port(self.tx_port), f"mtu {mtu:d}")
+        self.admin_tester_port(self.tester.get_local_port(self.rx_port), f"mtu {mtu:d}")
     #
     #
     #
@@ -220,7 +221,12 @@  class TestMtuUpdate(TestCase):
         """
         self.set_mtu(packet_size + 1)
 
-        self.pmdout.start_testpmd("Default")
+        if self.kdriver == "mlx5_core" or self.kdriver == "mlx4_core":
+        # Mellanox will need extra options to start testpmd
+            self.pmdout.start_testpmd("Default", "--max-pkt-len=9500 --tx-offloads=0x8000 --enable-scatter -a")
+        else:
+            self.pmdout.start_testpmd("Default")
+        
         self.exec("port stop all")
         self.exec(f"port config mtu 0 {packet_size:d}")
         self.exec(f"port config mtu 1 {packet_size:d}")