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 A9C1642800; Wed, 22 Mar 2023 04:45:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80F0E40E09; Wed, 22 Mar 2023 04:45:40 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 315FB40A84 for ; Wed, 22 Mar 2023 04:45:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679456739; x=1710992739; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tqe5bDG6M3oJAgUibqrYDuX4n0zfBACn17OSvT2zveg=; b=AGhM/Aao3YiTiEsSaYG+w6SMzJJZPzE+Vm9bKF0RkslFoJbdKgxLx+RK tjzVyb9ZL8DFm0zWBxRg/+RvquqnxwTp++iTqBoB76CKQsbEuPi083N1D f+Vr30Z1ODYYfXhmmJxbRpgYTlJsW/FBGFN+fff5p/b6mHQonMlXzWRC3 Y+AIjQZvE6M22Sow3pyhSEyOop3swu6V7rewwPHz4HD3xVljZDG/IW2Z8 nmRS4BsZTuy3InCNiauEB9npZsOX80p7VNyeNKORxKVIea1F0PWaUEk3Q NI1Zm8f3dpwtsTZfISg86siZ1ANVTf/3sSoML6h/F+jMkKBGqlLU64Zs+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="341475639" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="341475639" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 20:45:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="805680297" X-IronPort-AV: E=Sophos;i="5.98,280,1673942400"; d="scan'208";a="805680297" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga004.jf.intel.com with ESMTP; 21 Mar 2023 20:45:35 -0700 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, lijuan.tu@intel.com, yux.jiang@intel.com Subject: [DTS][PATCH V1] tests/vf_vlan: Add avx512 support for vf vlan validation. Date: Wed, 22 Mar 2023 11:42:56 +0800 Message-Id: <20230322034256.82387-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 | 91 ++++++++++++++++++++++++++++++++------ 1 file changed, 78 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index f2a59b18..55af048f 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -168,23 +168,38 @@ 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 +214,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 +233,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 +254,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 +267,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 +296,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 +328,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 +349,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 +357,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 +378,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 +396,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 +472,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 +491,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 +528,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