From patchwork Mon Jan 11 10:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xie, WeiX" X-Patchwork-Id: 86273 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 3D933A04B5; Mon, 11 Jan 2021 11:24:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03055140CC3; Mon, 11 Jan 2021 11:24:50 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 78373140CB5 for ; Mon, 11 Jan 2021 11:24:48 +0100 (CET) IronPort-SDR: 4S7PxCz+niw0neFHiETrN9ysyAcW9PD9fZyv3QCpNfh83GBy5hSfq5HWr4U0gASknYngBvvgQ7 iie69F6a1s1g== X-IronPort-AV: E=McAfee;i="6000,8403,9860"; a="165520865" X-IronPort-AV: E=Sophos;i="5.79,338,1602572400"; d="scan'208";a="165520865" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 02:24:44 -0800 IronPort-SDR: Yqww1t+QH6PyAJAjkKHGHo8RGoIrOH2JWdRs8wP2lKO0EhcS/fIQI9BNqC3YnRwoROIC+jFCjt tcC+Yo4Flq7A== X-IronPort-AV: E=Sophos;i="5.79,338,1602572400"; d="scan'208";a="380963509" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 02:24:42 -0800 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Mon, 11 Jan 2021 18:26:29 +0800 Message-Id: <20210111102630.28937-2-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210111102630.28937-1-weix.xie@intel.com> References: <20210111102630.28937-1-weix.xie@intel.com> Subject: [dts] [PATCH V2 1/2] tests/TestSuite_vf_jumboframe:Rx packet size need add 4 bytes 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 Sender: "dts" DTS framework has switched i40evf to iavf, so align with it. After testing, found that: when send a packet which length is 1513 bytes. for net_iavf driver; the statistic from "show port stats 0" is: RX-bytes: 1513 for net_i40e_vf driver; the statistic from "show port stats 0" is: RX-bytes: 1517 Signed-off-by: Xie wei --- tests/TestSuite_vf_jumboframe.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py index 6da2c5e5..cb77cf31 100644 --- a/tests/TestSuite_vf_jumboframe.py +++ b/tests/TestSuite_vf_jumboframe.py @@ -192,6 +192,11 @@ class TestVfJumboFrame(TestCase): else: return None + def check_vf_driver(self): + output = self.vm_testpmd.execute_cmd("show port info 0") + vf0_driver = re.findall("Driver\s*name:\s*(\w+)", output) + return vf0_driver[0] + def jumboframes_send_packet(self, pktsize, received=True): """ Send 1 packet to portid @@ -216,13 +221,19 @@ class TestVfJumboFrame(TestCase): rx_bytes -= rx_bytes_ori rx_err -= rx_err_ori + vf_driver = self.check_vf_driver() + if received: self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert error") if self.kdriver == "ixgbe" or self.kdriver == 'ice': self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4") else: - self.verify(rx_bytes == pktsize, "Rx packet size should be equal to packet size") + if self.kdriver == "i40e": + if vf_driver == "net_iavf": + self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4") + else: + self.verify(rx_bytes == pktsize, "Rx packet size should be equal to packet size") if self.kdriver == "igb": self.verify(tx_bytes == pktsize, "Tx packet size should be packet size") From patchwork Mon Jan 11 10:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xie, WeiX" X-Patchwork-Id: 86274 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 974CDA09EF; Mon, 11 Jan 2021 11:24:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C85F140CCA; Mon, 11 Jan 2021 11:24:50 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 341F2140CB5 for ; Mon, 11 Jan 2021 11:24:48 +0100 (CET) IronPort-SDR: LU0NGbD33clfDbVd6ZM8Fdirl9ROXlQFZyBv94cIUjvLFhvw3N4DttHk8xaZIs9++StmWz63Of uA3vBMjuq78w== X-IronPort-AV: E=McAfee;i="6000,8403,9860"; a="165520868" X-IronPort-AV: E=Sophos;i="5.79,338,1602572400"; d="scan'208";a="165520868" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 02:24:46 -0800 IronPort-SDR: Xj2D+uVPS28u9n4WAUpKorvL8QRo8BrIymRyaLtq2DTV7SmeBWndlYFjrbEPvdhgMO5vA6kwyW wTSxm0iXTldg== X-IronPort-AV: E=Sophos;i="5.79,338,1602572400"; d="scan'208";a="380963517" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 02:24:44 -0800 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Mon, 11 Jan 2021 18:26:30 +0800 Message-Id: <20210111102630.28937-3-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210111102630.28937-1-weix.xie@intel.com> References: <20210111102630.28937-1-weix.xie@intel.com> Subject: [dts] [PATCH V2 2/2] tests/TestSuite_veb_switch:vf1 RX-bytes need add 4 bytes 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 Sender: "dts" DTS framework has switched i40evf to iavf, so align with it. After testing, found that: when send a packet which length is 60 bytes. for net_iavf driver; the statistic from "show port stats 0" is: RX-bytes:56, but set verbose 1, we can see the packet length is 60. for net_i40e_vf driver; the statistic from "show port stats 0" is: RX-bytes: 60 Signed-off-by: Xie wei --- tests/TestSuite_veb_switch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TestSuite_veb_switch.py b/tests/TestSuite_veb_switch.py index 00dd76e7..cdd2b3c4 100644 --- a/tests/TestSuite_veb_switch.py +++ b/tests/TestSuite_veb_switch.py @@ -283,11 +283,18 @@ class TestVEBSwitching(TestCase): self.dut.send_expect("stop", "testpmd>", 2) self.session_secondary.send_expect("stop", "testpmd>", 2) + out = self.session_secondary.send_expect("show port info 0", "testpmd>") + vf1_driver = re.findall("Driver\s*name:\s*(\w+)", out)[0] vf0_tx_stats = self.veb_get_pmd_stats("first", 0, "tx") vf1_rx_stats = self.veb_get_pmd_stats("second", 0, "rx") if self.kdriver == 'ice': vf1_rx_stats[-1] = vf1_rx_stats[-1] + 4 + if self.kdriver == 'i40e': + if vf1_driver == 'net_iavf': + vf1_rx_stats[-1] = vf1_rx_stats[-1] + 4 + else: + vf1_rx_stats[-1] = vf1_rx_stats[-1] self.verify(vf0_tx_stats[0] != 0, "no packet was sent by VF0") self.verify(vf0_tx_stats == vf1_rx_stats, "VF1 failed to receive packets from VF0")