From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 281C1A0A02; Thu, 25 Mar 2021 09:52:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F186140D62; Thu, 25 Mar 2021 09:52:47 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C01CB140D36 for ; Thu, 25 Mar 2021 09:52:45 +0100 (CET) IronPort-SDR: xNyFno+eB135AcjMXrKD3bx0MuB9zdbnnbu4I236SZo1YFsnuUPfCL2J4/R0J1GPR2KdykgVsJ UTK+gN7J7WVA== X-IronPort-AV: E=McAfee;i="6000,8403,9933"; a="190912372" X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="190912372" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 01:52:44 -0700 IronPort-SDR: u3oHDttelhydvNWL+0zejjn0863U6nGA6xMgUfkP6a2KItiJpbAgm0HoWfX5D66jHQSEaTHigV 9gCNXPLZjopQ== X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="415903863" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 01:52:43 -0700 From: xiewei To: dts@dpdk.org Cc: xiewei Date: Fri, 26 Mar 2021 01:16:44 +0800 Message-Id: <20210325171644.25055-1-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/ddp_mpls: compatible with iavf and i40evf for vf X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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