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 8B61742B95; Thu, 25 May 2023 07:36:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87AFD40E6E; Thu, 25 May 2023 07:36:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 4FAE240A82 for ; Thu, 25 May 2023 07:36:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684993003; x=1716529003; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=soDx2UXQG9nZybeGGEtlpKeXqp4I84Nc0Gu9zkIyfJo=; b=Dh7ZnXAkrBQU82n0cBGeQRn6wNgJP4xoUFuthCCgBwEkjTnIEt/K7FbV MVStTSThZgm/FrVBKw8fHGV8AaoaKK1di0ovR/U9Eei5PM5gJz9xusJB4 ljSwBK/WSucUJE54dEMO0p2RSkUNs7k7Wr4IY784rwByWqGj0pRQ53Fbr 5qkgPkkMW3vHTwBkfI6TDo9DX44VKylzvJQfcBf/88dalDzgjNm/umBHF nGUyR7A1tpsy/Zyfz3jdt8m2a8WI9B2QMYBH2eY1TbY0YbhqZwpBwx15l Q19KciY6lHfMMOtlC8yBvxHGSr36ctecTNPL07yBhWcWKWVJTL3K/OnkX Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="343260341" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="343260341" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 22:36:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="737575774" X-IronPort-AV: E=Sophos;i="6.00,190,1681196400"; d="scan'208";a="737575774" Received: from dpdk-lijuan-icelake4.sh.intel.com ([10.67.119.149]) by orsmga001.jf.intel.com with ESMTP; 24 May 2023 22:36:41 -0700 From: Yingya Han To: dts@dpdk.org Cc: Yingya Han Subject: [dts][PATCH V2]tests/vf_single_core_perf: support IO forwarding mode Date: Thu, 25 May 2023 05:36:37 +0000 Message-Id: <20230525053637.23947-1-yingyax.han@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Yingya Han --- conf/vf_single_core_perf.cfg | 4 ++++ tests/TestSuite_vf_single_core_perf.py | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/conf/vf_single_core_perf.cfg b/conf/vf_single_core_perf.cfg index b0546f48..ccdde983 100644 --- a/conf/vf_single_core_perf.cfg +++ b/conf/vf_single_core_perf.cfg @@ -8,6 +8,9 @@ # - test_duration is how many seconds each combination performance will # be recorded. # +# - forwarding_mode: +# testpmd set the packet forwarding mode, support 'io'/'mac' +# # - accepted_tolerance defines the accepted tolerance between test # results and expected numbers. # @@ -33,6 +36,7 @@ update_expected = True test_parameters = {'1C/1T': {64: [512, 2048]}, '1C/2T': {64: [512, 2048]}} test_duration = 60 +forwarding_mode = 'io' accepted_tolerance = 1 expected_throughput = { 'I40E_40G-QSFP_A': { diff --git a/tests/TestSuite_vf_single_core_perf.py b/tests/TestSuite_vf_single_core_perf.py index 7101e4b9..85bd0d46 100644 --- a/tests/TestSuite_vf_single_core_perf.py +++ b/tests/TestSuite_vf_single_core_perf.py @@ -56,6 +56,7 @@ class TestVfSingleCorePerf(TestCase): """ # test parameters include: frames size, descriptor numbers self.test_parameters = self.get_suite_cfg()["test_parameters"] + self.forwarding_mode = self.get_suite_cfg()["forwarding_mode"] # traffic duraion in second self.test_duration = self.get_suite_cfg()["test_duration"] @@ -99,6 +100,9 @@ class TestVfSingleCorePerf(TestCase): self.dut.send_expect( "ip link set %s vf 0 mac %s" % (pf_intf, self.vfs_mac[i]), "#" ) + if self.forwarding_mode == "io": + self.dut.send_expect("ip link set %s vf 0 trust on" % pf_intf, "#") + self.dut.send_expect("ip link set %s vf 0 spoofchk off" % pf_intf, "#") # bind vf to vf driver try: @@ -223,10 +227,10 @@ class TestVfSingleCorePerf(TestCase): for i in range(port_num): eal_para += " -a " + self.sriov_vfs_port[i][0].pci port_mask = utils.create_mask(self.dut_ports) - # parameters for application/testpmd - param = " --portmask=%s" % (port_mask) for fwd_config in list(self.test_parameters.keys()): + # parameters for application/testpmd + param = " --portmask=%s" % (port_mask) # the fwd_config just the config for fwd core # to start testpmd should add 1C to it core_config = "1S/%s" % fwd_config @@ -279,7 +283,8 @@ class TestVfSingleCorePerf(TestCase): self.pmdout.start_testpmd( core_list, parameter, eal_para, socket=self.socket ) - self.dut.send_expect("set fwd mac", "testpmd> ", 15) + if self.forwarding_mode == "mac": + self.dut.send_expect("set fwd mac", "testpmd> ", 15) self.dut.send_expect("start", "testpmd> ", 15) vm_config = self.set_fields() -- 2.34.1