From patchwork Mon Jul 11 07:22:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113891 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C1A5A0032; Mon, 11 Jul 2022 09:22:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4BC540684; Mon, 11 Jul 2022 09:22:52 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 82C164021E for ; Mon, 11 Jul 2022 09:22:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657524171; x=1689060171; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=A+DqB1w8Tkb/eALOqs1FQA1lTLXdAA2NSMsSYnvmciA=; b=REk8rmNlzC+sKCBuEkSyB4jDZ0WIdi7pulZ+db2kFirahj84LKeQJS91 vPfGOTtxUKtEwVUuaGzlshZeqXlwCfG5N9dHzuQ+yEr/wKq48hMYtlOBK fnjcbTjl43oSjEEWYRSxGOKXkd3xn4jmypexaz7EJxzNYIZgaccLYXYTL UzQ6V3LXeT9VIiKj5CNX8+mClOvMPG0DYzlKgvxENAdVjFesnNvm9cw2T z50fLSFJk5m7dwqpDsb+pYd6BbvSEsRnD/CJvKwoBwvZKTRYnL//1NKDM 4iIdTa5jEJCWbQ5R2RGK/RgT7LjvxCCf+2esKQ3OWIy5InTW6cYuoKWyH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="285723941" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="285723941" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:42 -0700 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="652346723" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:40 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 1/4] tests/kernelpf_iavf: update dts code for driver change Date: Mon, 11 Jul 2022 15:22:31 +0800 Message-Id: <20220711072234.852-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 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 The out-tree driver has vf-vlan-pruning option,but in-tree driver has not. So we need different action to enable vlan filter when we validate the vlan filter function with in-tree and out-tree kernel drvier. Signed-off-by: Weiyuan Li --- v2: -fix format issue v3: -modify the code to check whether vf-vlan-pruning option exists. -modify the description of the test plan about vf-vlan-pruning. tests/TestSuite_kernelpf_iavf.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index d7d17ac4..e06e9267 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -96,7 +96,17 @@ class TestKernelpfIavf(TestCase): # bind to default driver self.bind_nic_driver(self.dut_ports, driver="") self.used_dut_port = self.dut_ports[0] - if self.is_eth_series_nic(800) and self.default_stats: + # check driver whether there is flag vf-vlan-pruning. + if not self.default_stats: + self.logger.warning( + utils.RED( + f"{self.kdriver + '_' + self.driver_version} driver does not have vf-vlan-pruning flag." + ) + ) + if ( + any([self.is_eth_series_nic(800), self.kdriver == "i40e"]) + and self.default_stats + ): self.dut.send_expect( "ethtool --set-priv-flags %s %s on" % (self.host_intf, self.flag), "# " ) @@ -119,7 +129,6 @@ class TestKernelpfIavf(TestCase): self.dut.send_expect( "ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# " ) - try: for port in self.sriov_vfs_port: @@ -453,7 +462,11 @@ class TestKernelpfIavf(TestCase): time.sleep(1) tcpdump_out = self.get_tcpdump_package() receive_pkt = re.findall("vlan %s" % random_vlan, tcpdump_out) - if self.kdriver == "i40e" and self.driver_version < "2.13.10": + if ( + (self.kdriver == "i40e" and self.driver_version < "2.13.10") + or (self.kdriver == "i40e" and not self.default_stats) + or (self.kdriver == "ice" and not self.default_stats) + ): self.verify(len(receive_pkt) == 2, "Failed to received vlan packet!!!") else: self.verify(len(receive_pkt) == 1, "Failed to received vlan packet!!!") @@ -853,7 +866,11 @@ class TestKernelpfIavf(TestCase): self.scapy_send_packet(self.vf_mac, self.tester_intf, vlan_flags=True, count=10) out = self.vm_dut.get_session_output() packets = len(re.findall("received 1 packets", out)) - if self.kdriver == "i40e" and self.driver_version < "2.13.10": + if ( + (self.kdriver == "i40e" and self.driver_version < "2.13.10") + or (self.kdriver == "i40e" and not self.default_stats) + or (self.kdriver == "ice" and not self.default_stats) + ): self.verify(packets == 10, "Not receive expected packet") else: self.verify(packets == 0, "Receive expected packet") @@ -935,7 +952,10 @@ class TestKernelpfIavf(TestCase): if self.env_done: self.destroy_vm_env() - if self.is_eth_series_nic(800) and self.default_stats: + if ( + any([self.is_eth_series_nic(800), self.kdriver == "i40e"]) + and self.default_stats + ): self.dut.send_expect( "ethtool --set-priv-flags %s %s %s" % (self.host_intf, self.flag, self.default_stats), From patchwork Mon Jul 11 07:22:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113892 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 028C2A00C4; Mon, 11 Jul 2022 09:22:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFEEC4021F; Mon, 11 Jul 2022 09:22:53 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 24FC34021E for ; Mon, 11 Jul 2022 09:22:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657524172; x=1689060172; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ouZWIJYik99oDmBY8MUEpZ9dtlk1cNc9GVYG05L1GAE=; b=dP/xKrMcDejqyfPI5Ug5SDa6zcMrn+Kaze4brmJhZODdkKgri00Dd4pO Xz6WdxygSE605Pfk8TuAEeWWGy0fTxLOsCe5NdyKovs94sq2aHojeFX22 TGafIb24YiNGIJZn//s15Mc7z9OpNOCFL3tvAzaHCZoH78V2XOWuUqI/x W41zZ4dKx9Gg+xVD2zjVtqvnDnHp3uo+YtRIeDfS/EvBqnlrYPVXwyHER g28Oh3VAZRlsHJczNe1AKbD8gV7WDQFGUsRlPdeRObXevRYbkxCRRTd8Z rDgBKBnJz/oZlGBRwKnri/akm2KpU2B/iGRrdWTPCI9+AX4u5k7mTr38p A==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="285723944" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="285723944" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:43 -0700 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="652346729" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:42 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 2/4] tests/vf_vlan: update dts code for driver change Date: Mon, 11 Jul 2022 15:22:32 +0800 Message-Id: <20220711072234.852-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220711072234.852-1-weiyuanx.li@intel.com> References: <20220711072234.852-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 The out-tree driver has vf-vlan-pruning option,but in-tree driver has not. So we need different action to enable vlan filter when we validate the vlan filter function with in-tree and out-tree kernel drvier. Signed-off-by: Weiyuan Li --- v2: -fix format issue v3: -modify the code to check whether vf-vlan-pruning option exists. -modify the description of the test plan about vf-vlan-pruning. tests/TestSuite_vf_vlan.py | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index e73ad479..c4904c55 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -6,6 +6,7 @@ import random import re import time +import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.settings import get_nic_name @@ -62,7 +63,17 @@ class TestVfVlan(TestCase): self.host_intf0 = self.dut.ports_info[self.used_dut_port_0]["intf"] tester_port = self.tester.get_local_port(self.used_dut_port_0) self.tester_intf0 = self.tester.get_interface(tester_port) - if self.is_eth_series_nic(800) and self.default_stats: + # check driver whether there is flag vf-vlan-pruning. + if not self.default_stats: + self.logger.warning( + utils.RED( + f"{self.kdriver + '_' + self.driver_version} driver does not have vf-vlan-pruning flag." + ) + ) + if ( + any([self.is_eth_series_nic(800), self.kdriver == "i40e"]) + and self.default_stats + ): self.dut.send_expect( "ethtool --set-priv-flags %s %s on" % (self.host_intf0, self.flag), "# " ) @@ -233,7 +244,11 @@ class TestVfVlan(TestCase): self.vm0_testpmd.execute_cmd("start") out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - if self.kdriver == "i40e" and self.driver_version < "2.13.10": + if ( + (self.kdriver == "i40e" and self.driver_version < "2.13.10") + or (self.kdriver == "i40e" and not self.default_stats) + or (self.kdriver == "ice" and not self.default_stats) + ): self.verify("received" in out, "Failed to received vlan packet!!!") else: self.verify("received" not in out, "Received vlan packet without pvid!!!") @@ -354,7 +369,11 @@ class TestVfVlan(TestCase): # send packet with vlan out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - if self.kdriver == "i40e" and self.driver_version < "2.13.10": + if ( + (self.kdriver == "i40e" and self.driver_version < "2.13.10") + or (self.kdriver == "i40e" and not self.default_stats) + or (self.kdriver == "ice" and not self.default_stats) + ): self.verify( "received 1 packets" in out, "Received mismatched vlan packet while vlan filter on", @@ -415,7 +434,10 @@ class TestVfVlan(TestCase): def tear_down_all(self): self.destroy_vm_env() - if self.is_eth_series_nic(800) and self.default_stats: + if ( + any([self.is_eth_series_nic(800), self.kdriver == "i40e"]) + and self.default_stats + ): self.dut.send_expect( "ethtool --set-priv-flags %s %s %s" % (self.host_intf0, self.flag, self.default_stats), From patchwork Mon Jul 11 07:22:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113893 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FE23A0032; Mon, 11 Jul 2022 09:22:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E0E741156; Mon, 11 Jul 2022 09:22:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id A1E104021E for ; Mon, 11 Jul 2022 09:22:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657524172; x=1689060172; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=My1OGrJmHxvyHJXcfbVKkt1dTeFrDws0TqVZ+jZJZHQ=; b=U/KWqYUK1B9mZU7u1L0ZjSIEYJmmQS+JbwcnZhQ8qpC89k+VVWuK0izz kZgxArYK1fPYiyuQM2PyZSUOq0KqEBpd0wLSRtpDYKnPyez4RWN0G40TE +/VbqswWfKoefznLmBXcLy7qJ+w8S0pKsVpQBwCs/nGBppO9Cnvvyc+MP SUDZhaugWTVfAP7gZi1sbYk4ZBeFbzXxzzoLlMPLDwZiwk0+V5XnTTsHh gCN50hM1Q0KYbR1qAXcgWCE5w9DugKZLjKfLy0kBaf4JCaIpk393D+I4h LI7rLdb/g8oc45/RvQcduOmpj/pd3PDS3uNUKqvk8THTD424SOsyMT8Zr Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="285723946" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="285723946" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:45 -0700 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="652346734" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:43 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 3/4] test_plans/kernelpf_iavf: update dts code for driver change Date: Mon, 11 Jul 2022 15:22:33 +0800 Message-Id: <20220711072234.852-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220711072234.852-1-weiyuanx.li@intel.com> References: <20220711072234.852-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 The out-tree driver has vf-vlan-pruning option,but in-tree driver has not. So we need different action to enable vlan filter when we validate the vlan filter function with in-tree and out-tree kernel drvier. Signed-off-by: Weiyuan Li --- v2: -fix format issue v3: -modify the code to check whether vf-vlan-pruning option exists. -modify the description of the test plan about vf-vlan-pruning. test_plans/kernelpf_iavf_test_plan.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst index 8c7d1ad5..77c1241d 100644 --- a/test_plans/kernelpf_iavf_test_plan.rst +++ b/test_plans/kernelpf_iavf_test_plan.rst @@ -28,6 +28,9 @@ Get the pci device id of DUT, for example:: 0000:18:00.0 'Device 1592' if=enp24s0f0 drv=ice unused=igb_uio 0000:18:00.1 'Device 1592' if=enp24s0f1 drv=ice unused=igb_uio +If the drive support vf-vlan-pruning flag:: + ethtool --set-priv-flags $PF_INTF vf-vlan-pruning on + Create 1 VF from 1 kernel PF:: echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs From patchwork Mon Jul 11 07:22:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113894 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1444A00C5; Mon, 11 Jul 2022 09:22:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A9744280C; Mon, 11 Jul 2022 09:22:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id BEF974021F for ; Mon, 11 Jul 2022 09:22:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657524173; x=1689060173; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8pxefHeQtfDOs1rla8qQnB6fVnZb/oeFNsPctSiYBdM=; b=SIitLmN6VhnBw6RasNtOX+2z51jiM8hOIHmc40reweU6xGJwUZd44Ct6 anP5GKyuatrkqbXlv1JoAGznGK1kcX97Ai+i2pVYGE3W9aAcw4oSLyD8e 8xMZExEu3/c+4seFCDTt1hxK3S10LCZGEJu6KA/UiUOcokx8Z26vuNaG7 jS/iSNBkxUAW8pMpFtSwRohMEtGt3gGZUT9X73whU/2YuW81B5pqu3TsW IzJRSy8caQ2bf0aCYENWktUpn9+Gj+efyaSdVxhI4tv3wT7DshCK0UtoB hO2SqEMLPNUz45d+IQXaJRpvyXKeyDCZtYbDXej/CzAN1tVz2g0TMSgXl Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="285723951" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="285723951" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:46 -0700 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="652346741" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 00:22:45 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 4/4] test_plans/vf_vlan: update dts code for driver change Date: Mon, 11 Jul 2022 15:22:34 +0800 Message-Id: <20220711072234.852-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220711072234.852-1-weiyuanx.li@intel.com> References: <20220711072234.852-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 The out-tree driver has vf-vlan-pruning option,but in-tree driver has not. So we need different action to enable vlan filter when we validate the vlan filter function with in-tree and out-tree kernel drvier. Signed-off-by: Weiyuan Li Tested-by: Lingli Chen Acked-by: Lijuan Tu --- v2: -fix format issue v3: -modify the code to check whether vf-vlan-pruning option exists. -modify the description of the test plan about vf-vlan-pruning. test_plans/vf_vlan_test_plan.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_plans/vf_vlan_test_plan.rst b/test_plans/vf_vlan_test_plan.rst index c183b3d6..2c38d4dd 100644 --- a/test_plans/vf_vlan_test_plan.rst +++ b/test_plans/vf_vlan_test_plan.rst @@ -21,6 +21,10 @@ Prerequisites 0000:87:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused= 0000:87:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused= + If the drive support vf-vlan-pruning flag: + ethtool --set-priv-flags ens259f0 vf-vlan-pruning on + ethtool --set-priv-flags ens259f1 vf-vlan-pruning on + echo 1 > /sys/bus/pci/devices/0000\:87\:00.0/sriov_numvfs echo 1 > /sys/bus/pci/devices/0000\:87\:00.1/sriov_numvfs