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 6128F42800; Wed, 22 Mar 2023 04:51:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36F4540E09; Wed, 22 Mar 2023 04:51:30 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id E715040A84 for ; Wed, 22 Mar 2023 04:51:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679457088; x=1710993088; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TlM2tpL8aFB/nsMgeYNtdErWUAY6XZhHzlV6vrj+h+0=; b=dk3m2q0UfknDkSxG4VE5ViM4nwc2Ym19WY8/MgA6oPd5+L6VQ1IzZcNH lRe6frbsJXlAtoONXfZpx4B27ITmvM/P4JMbTY4z1exa+Z135eq73i83Y YjnO2s6JZk0bmQMfkiDHC1OG8/v3qDDL32/przGY9ZO4MPIYMjAwsQeV0 nuGiBnfyHunbAcdCT2i9okcRQjlLyka//aOzHEv+h/XE3OWw9zXtnFCWC ayS7al/sQfHR68IPfLcW0LX98k4SR1Z9kg0r/RDt4J6Mx6EEF346pafEc NeDR5KfdPigrzSu3mnbbFD3f396b/JhoIp8KpLQJxNI9FELLKyC745HRv A==; X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="318764515" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="318764515" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 20:51:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="681758221" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="681758221" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga002.jf.intel.com with ESMTP; 21 Mar 2023 20:51:25 -0700 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, lijuan.tu@intel.com, yux.jiang@intel.com Subject: [DTS][PATCH V2] tests/vf_vlan: Add avx512 support for vf vlan validation. Date: Wed, 22 Mar 2023 11:48:48 +0800 Message-Id: <20230322034848.83520-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_scalar(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