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 5DE0F42B31; Thu, 18 May 2023 04:37:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57B9142B71; Thu, 18 May 2023 04:37:19 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 7010C40E25 for ; Thu, 18 May 2023 04:37:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684377438; x=1715913438; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=i3LgfJpasqBQYu6E9GcY0n4U1Yz+upNc0ynb24kP1cA=; b=Qq8bFCDwK3hAnJ2XkdQNrWWDRApuhRGuzWs1xB/apn/6zDFE/tlnMNt+ g6q+mWeIgNBnSvTI4Nc/7s3hj3XFMi4UnO1wxvE6hu92UFCeTY5zPvuNV qWytDnyeJu4WK2mnTzZjgwemB9HC0tpIq5YR/fGvDxAwjRyajR6bwWVb+ gKbjtTmdV9KWunv71vXbmVjKAbX3Nz02icayA9kWoUms+t7TV7VVd7TFe oLIpkET5McoMRahNG1kM1lWgAIT34NDAONfF1uPKXmwMQwBXgUX+VTJNl YSo9U8WLMY2+F+vfspIdYwCdjyTjACZGDWxbQHSNWLnh3D8hcJTM7ULtW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="380146099" X-IronPort-AV: E=Sophos;i="5.99,284,1677571200"; d="scan'208";a="380146099" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 19:37:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="652464793" X-IronPort-AV: E=Sophos;i="5.99,284,1677571200"; d="scan'208";a="652464793" Received: from dpdk-lijuan-icelake4.sh.intel.com ([10.67.119.160]) by orsmga003.jf.intel.com with ESMTP; 17 May 2023 19:37:15 -0700 From: Yingya Han To: dts@dpdk.org Cc: Yingya Han Subject: [dts][PATCH V1]tests/vf_single_core_perf: support IO forwarding mode Date: Thu, 18 May 2023 02:37:11 +0000 Message-Id: <20230518023711.119597-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 | 15 ++++++++++++--- 2 files changed, 16 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..de68f334 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,13 @@ 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 +231,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 +287,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