From patchwork Mon Jan 18 07:09:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xie, WeiX" X-Patchwork-Id: 86739 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 823EDA0A04; Mon, 18 Jan 2021 08:07:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76907140D13; Mon, 18 Jan 2021 08:07:42 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 1C145140CD5 for ; Mon, 18 Jan 2021 08:07:39 +0100 (CET) IronPort-SDR: FYvKi1ezIkxUymGFkTj1e7HQKsjLKQQo+XvptWx1j/GCdS9w92Z/HDUjfpwYxpUQeA3LSH0d2D Pxj9pRxy37pA== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="242837752" X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="242837752" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:07:39 -0800 IronPort-SDR: MG2a7Prd9WbVZGg2R0FnV6lbhWxoADXIlg4YhqEjA93tBvPJm9DZbu/RTlj3L2Y8BsMGXo+wOe CRnro2dQOOIA== X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="383463745" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:07:38 -0800 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Mon, 18 Jan 2021 15:09:23 +0800 Message-Id: <20210118070924.23616-2-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210118070924.23616-1-weix.xie@intel.com> References: <20210118070924.23616-1-weix.xie@intel.com> Subject: [dts] [PATCH V1 1/2] tests/vf_jumboframe: fix Rx bytes statistics 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" According to dpdk commit e8326d3, fix Rx bytes statistics. After testing, found that: when send a packet which length is 1513 bytes. for i40e nic; the statistic from "show port stats 0" is: RX-bytes: 1513, but before that it show "RX-bytes: 1517". Signed-off-by: Xie wei --- tests/TestSuite_vf_jumboframe.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py index cb77cf31..75480f1f 100644 --- a/tests/TestSuite_vf_jumboframe.py +++ b/tests/TestSuite_vf_jumboframe.py @@ -192,11 +192,6 @@ 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 @@ -221,19 +216,11 @@ 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': + if self.kdriver in ["ixgbe", "ice", "i40e"]: self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4") - else: - 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 18 07:09:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xie, WeiX" X-Patchwork-Id: 86740 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 E192EA0A03; Mon, 18 Jan 2021 08:07:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D988140D1A; Mon, 18 Jan 2021 08:07:42 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 77D8F140D11 for ; Mon, 18 Jan 2021 08:07:41 +0100 (CET) IronPort-SDR: GMfsDwTySI09XY3UHQbDfxvIZ8UewLl7pPokUPCQsht1dVURmqJu/EbDL4DI0FT4hedXP7nbRB Ew5Cnjz+Zn7g== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="242837755" X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="242837755" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:07:41 -0800 IronPort-SDR: +5SGdJiOBwvivyfyXsU/j/2u3cSAvIdwrtlSzIqKwub4vXBlUPe8AIn88yNsvRU5kp8a6fVxu+ +XEE+sDcTPyQ== X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="383463753" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:07:39 -0800 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Mon, 18 Jan 2021 15:09:24 +0800 Message-Id: <20210118070924.23616-3-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210118070924.23616-1-weix.xie@intel.com> References: <20210118070924.23616-1-weix.xie@intel.com> Subject: [dts] [PATCH V1 2/2] tests/veb_switch: fix Rx bytes statistics 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" According to dpdk commit e8326d3, fix Rx bytes statistics. Signed-off-by: Xie wei --- tests/TestSuite_veb_switch.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/TestSuite_veb_switch.py b/tests/TestSuite_veb_switch.py index cdd2b3c4..915296ff 100644 --- a/tests/TestSuite_veb_switch.py +++ b/tests/TestSuite_veb_switch.py @@ -283,18 +283,10 @@ 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] + vf1_rx_stats[-1] = vf1_rx_stats[-1] + 4 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")