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 AAEDE427F0; Wed, 22 Mar 2023 07:03:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B842410D1; Wed, 22 Mar 2023 07:03:55 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B54F740F18 for ; Wed, 22 Mar 2023 07:03:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679465033; x=1711001033; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yHyyq1WKH+LVns6qhJsqNP2zpoitunHvB/hsYNOk9U4=; b=jCTSZ+t4SM9idVCyfjilKrDdWiMqX9w5fi+dK6t+SKw2/PpwpF/v8aNL n/MU2UKVTds9oeCyeiam3ZMBBn13X67HkPzW8Tn3+Fr/xEh8SabLJeHRJ kl9EjXy68UMTMXo9/XhTAD7BaKmj6YxF1MjYWluW8AuBgDAoDhNoIqcN3 9qT+8tqUi/vud1F9wZS2gPxXYGRrIYrWPcMdnvq7d1V21fwN/1pY4LXef 0Liz7CWBeyFOkVEEidjHz7b5a8zjIyJ8rzc8i3z6nhX8Fyh0lOVrP3dSn iHhLVqRReaQNlS9xNcBB/JSNFE4s0jEMzoAsvXnh17ZD59sMQMEOUhH3d g==; X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="404019023" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="404019023" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 23:03:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="684176529" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="684176529" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga007.fm.intel.com with ESMTP; 21 Mar 2023 23:03:51 -0700 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, lijuan.tu@intel.com, yux.jiang@intel.com Subject: [DTS][PATCH V3] tests/vf_vlan: Add avx512 support for vf vlan validation. Date: Wed, 22 Mar 2023 14:00:53 +0800 Message-Id: <20230322060053.86803-1-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.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 In DPDK v23.03, avx512 offload path is updated to support checksum offload. This modification involves VF VLAN offload and requires avx512 regression to cover. This patch is to introduce avx512 cases to support the regression requirements. Signed-off-by: Ke Xu --- tests/TestSuite_vf_vlan.py | 89 ++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index f2a59b18..20868bf6 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -168,23 +168,36 @@ class TestVfVlan(TestCase): def launch_testpmd(self, **kwargs): dcf_flag = kwargs.get("dcf_flag") + force_max_simd_bitwidth = kwargs.get("force-max-simd-bitwidth") param = kwargs.get("param") if kwargs.get("param") else "" + eal_param = "" # for dcf mode, the vlan offload support in scalar path if dcf_flag: + eal_param += " --force-max-simd-bitwidth=64 " + eal_param += " --log-level='dcf,8' " self.vm0_testpmd.start_testpmd( VM_CORES_MASK, ports=[self.vf0_guest_pci, self.vf1_guest_pci], param=param, - eal_param="--force-max-simd-bitwidth=64", + eal_param=eal_param, port_options={ self.vf0_guest_pci: "cap=dcf", self.vf1_guest_pci: "cap=dcf", }, ) else: - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, param=param) + if force_max_simd_bitwidth: + eal_param += " --force-max-simd-bitwidth=%d " % force_max_simd_bitwidth + param += " --enable-rx-cksum " + if self.kdriver == "ice" or self.kdriver == "i40e": + eal_param += " --log-level='iavf,8' " + elif self.kdriver == "ixgbe" or self.kdriver == "igbe": + eal_param += " --log-level='%svf,8' " % self.kdriver + self.vm0_testpmd.start_testpmd( + VM_CORES_MASK, param=param, eal_param=eal_param + ) - def test_pvid_vf_tx(self): + def execute_pvid_vf_tx(self, specific_bitwidth=None): """ Add port based vlan on vf device and check vlan tx work """ @@ -199,7 +212,10 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports("any") self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.launch_testpmd(dcf_flag=self.dcf_mode) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set fwd mac") self.vm0_testpmd.execute_cmd("start") @@ -215,6 +231,12 @@ class TestVfVlan(TestCase): # disable pvid self.dut.send_expect("ip link set %s vf 0 vlan 0" % (self.host_intf0), "# ") + def test_pvid_vf_tx(self): + self.execute_pvid_vf_tx() + + def test_pvid_vf_tx_avx512(self): + self.execute_pvid_vf_tx(specific_bitwidth=512) + def send_and_getout(self, vlan=0, pkt_type="UDP"): if pkt_type == "UDP": @@ -230,7 +252,7 @@ class TestVfVlan(TestCase): return out - def test_add_pvid_vf(self): + def execute_add_pvid_vf(self, specific_bitwidth=None): random_vlan = random.randint(1, MAX_VLAN) self.dut.send_expect( @@ -243,7 +265,10 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports("any") self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.launch_testpmd(dcf_flag=self.dcf_mode) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set fwd rxonly") self.vm0_testpmd.execute_cmd("set verbose 1") self.vm0_testpmd.execute_cmd("start") @@ -269,7 +294,10 @@ class TestVfVlan(TestCase): # restart testpmd self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.launch_testpmd(dcf_flag=self.dcf_mode) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set fwd rxonly") self.vm0_testpmd.execute_cmd("set verbose 1") self.vm0_testpmd.execute_cmd("start") @@ -298,6 +326,12 @@ class TestVfVlan(TestCase): # disable pvid self.dut.send_expect("ip link set %s vf 0 vlan 0" % (self.host_intf0), "# ") + def test_add_pvid_vf(self): + self.execute_add_pvid_vf() + + def test_add_pvid_vf_avx512(self): + self.execute_add_pvid_vf(specific_bitwidth=512) + def tx_and_check(self, tx_vlan=1): inst = self.tester.tcpdump_sniff_packets(self.tester_intf0) self.vm0_testpmd.execute_cmd("set burst 1") @@ -313,7 +347,7 @@ class TestVfVlan(TestCase): self.verify(tx_vlan in vlans, "Tx packet with vlan not received!!!") - def test_vf_vlan_tx(self): + def execute_vf_vlan_tx(self, specific_bitwidth=None): self.verify(self.kdriver not in ["ixgbe"], "NIC Unsupported: " + str(self.nic)) random_vlan = random.randint(1, MAX_VLAN) tx_vlans = [1, random_vlan, MAX_VLAN] @@ -321,7 +355,10 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports("any") self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.launch_testpmd(dcf_flag=self.dcf_mode) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set verbose 1") for tx_vlan in tx_vlans: @@ -339,7 +376,13 @@ class TestVfVlan(TestCase): self.vm0_testpmd.quit() - def test_vf_vlan_rx(self): + def test_vf_vlan_tx(self): + self.execute_vf_vlan_tx() + + def test_vf_vlan_tx_avx512(self): + self.execute_vf_vlan_tx(specific_bitwidth=512) + + def execute_vf_vlan_rx(self, specific_bitwidth=None): random_vlan = random.randint(1, MAX_VLAN - 1) rx_vlans = [1, random_vlan, MAX_VLAN] # start testpmd in VM @@ -351,7 +394,11 @@ class TestVfVlan(TestCase): if not self.dcf_mode and self.kdriver is not "ixgbe" else "" ) - self.launch_testpmd(dcf_flag=self.dcf_mode, param=param) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + param=param, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set fwd rxonly") self.vm0_testpmd.execute_cmd("set verbose 1") self.vm0_testpmd.execute_cmd("vlan set strip on 0") @@ -423,7 +470,13 @@ class TestVfVlan(TestCase): self.vm0_testpmd.quit() - def test_vf_vlan_strip(self): + def test_vf_vlan_rx(self): + self.execute_vf_vlan_rx() + + def test_vf_vlan_rx_avx512(self): + self.execute_vf_vlan_rx(specific_bitwidth=512) + + def execute_vf_vlan_strip(self, specific_bitwidth=None): random_vlan = random.randint(1, MAX_VLAN - 1) rx_vlans = [1, random_vlan, MAX_VLAN] # start testpmd in VM @@ -436,7 +489,11 @@ class TestVfVlan(TestCase): else "" ) - self.launch_testpmd(dcf_flag=self.dcf_mode, param=param) + self.launch_testpmd( + dcf_flag=self.dcf_mode, + param=param, + force_max_simd_bitwidth=specific_bitwidth, + ) self.vm0_testpmd.execute_cmd("set fwd rxonly") self.vm0_testpmd.execute_cmd("set verbose 1") self.vm0_testpmd.execute_cmd("start") @@ -469,6 +526,12 @@ class TestVfVlan(TestCase): self.vm0_testpmd.quit() + def test_vf_vlan_strip(self): + self.execute_vf_vlan_strip() + + def test_vf_vlan_strip_avx512(self): + self.execute_vf_vlan_strip(specific_bitwidth=512) + def tear_down(self): self.destroy_vm_env() -- 2.25.1