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 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") -- 2.17.1