[dts] [PATCH V1] tests/ddp_mpls: compatible with iavf and i40evf for vf
xiewei
weix.xie at intel.com
Thu Mar 25 18:16:44 CET 2021
iavf has rss hash rx offload capability by default, but i40evf not have.
So the hash value and rx queue number will be random when receive wrong label MPLS packets.
If want to wrong label packets received by default queue 0, just launch test-pmd with parameter "--disable-rss".
Signed-off-by: xiewei <weix.xie at intel.com>
---
tests/TestSuite_ddp_mpls.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py
index 53fd4a76..f0c28386 100644
--- a/tests/TestSuite_ddp_mpls.py
+++ b/tests/TestSuite_ddp_mpls.py
@@ -39,6 +39,7 @@ from test_case import TestCase
from pmd_output import PmdOutput
from settings import get_nic_name
import random
+import re
VM_CORES_MASK = 'all'
PF_MAX_QUEUE = 64
@@ -131,7 +132,12 @@ class Testddp_mpls(TestCase):
self.vm0_testpmd.start_testpmd(
VM_CORES_MASK,"--port-topology=chained --txq=%s --rxq=%s"
% (VF_MAX_QUEUE, VF_MAX_QUEUE))
-
+
+ output = self.vm0_testpmd.execute_cmd('show port info 0')
+ vf_driver = re.findall("Driver\s*name:\s*(\w+)", output)
+ if vf_driver[0] == "net_iavf":
+ self.vm0_testpmd.execute_cmd('quit', '# ')
+ self.vm0_testpmd.start_testpmd(VM_CORES_MASK, "--port-topology=chained --txq=%s --rxq=%s --disable-rss" % (VF_MAX_QUEUE, VF_MAX_QUEUE))
def destroy_vm_env(self):
--
2.17.1
More information about the dts
mailing list