From patchwork Thu Sep 10 07:47:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingya Han X-Patchwork-Id: 77128 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95913A04B5; Thu, 10 Sep 2020 09:53:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CFC11B9B7; Thu, 10 Sep 2020 09:53:44 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4DEF7255 for ; Thu, 10 Sep 2020 09:53:42 +0200 (CEST) IronPort-SDR: gMoRwPQGXOUB7NM0/bdVEr3QZpZEgafVgAR9VkYppw1kFGGfiFvc5HxkJoUY4caEQP4qNDoYjU BJuYcP7P/oNw== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="220046740" X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="220046740" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 00:53:41 -0700 IronPort-SDR: OLMir0YRA5RArvwTyrgsTg/+rNuxNnS4T7Ovs230pm8qcMqUgvbtlYLnQnV/kLmuXLU6z7pqYF TZIbK/bNkUFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="300456348" Received: from dpdk-lijuan-purley1.sh.intel.com ([10.67.119.21]) by orsmga003.jf.intel.com with ESMTP; 10 Sep 2020 00:53:40 -0700 From: hanyingya To: dts@dpdk.org Cc: hanyingya Date: Thu, 10 Sep 2020 15:47:24 +0800 Message-Id: <20200910074724.64291-1-yingyax.han@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1]tests/link_flowctrl: add the verification of Niantic card X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" add the verification of Niantic card. fix incorrect verification that only enabling rx link flow control. Signed-off-by: hanyingya --- tests/TestSuite_link_flowctrl.py | 44 ++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py index 45b0654..9e608ba 100644 --- a/tests/TestSuite_link_flowctrl.py +++ b/tests/TestSuite_link_flowctrl.py @@ -455,9 +455,12 @@ class TestLinkFlowctrl(TestCase): pause_frame_fwd='off') self.logger.info("Packet loss: %.3f" % result) - - self.verify(result <= 0.01, - "Link flow control fail, the loss percent is more than 1%") + if self.nic == "niantic": + self.verify(result >= 0.3, + "Link flow control fail, the loss percent is less than 30%") + else: + self.verify(result >= 0.5, + "Link flow control fail, the loss percent is less than 50%") def test_perf_flowctrl_off_pause_fwd_on(self): """ @@ -469,9 +472,12 @@ class TestLinkFlowctrl(TestCase): pause_frame_fwd='on') self.logger.info("Packet loss: %.3f" % result) - - self.verify(result >= 0.5, - "Link flow control fail, the loss percent is less than 50%") + if self.nic == "niantic": + self.verify(result >= 0.3, + "Link flow control fail, the loss percent is less than 30%") + else: + self.verify(result >= 0.5, + "Link flow control fail, the loss percent is less than 50%") def test_perf_flowctrl_off_pause_fwd_off(self): """ @@ -483,9 +489,12 @@ class TestLinkFlowctrl(TestCase): pause_frame_fwd='off') self.logger.info("Packet loss: %.3f" % result) - - self.verify(result >= 0.5, - "Link flow control fail, the loss percent is less than 50%") + if self.nic == "niantic": + self.verify(result >= 0.3, + "Link flow control fail, the loss percent is less than 30%") + else: + self.verify(result >= 0.5, + "Link flow control fail, the loss percent is less than 50%") def test_perf_flowctrl_tx_on(self): """ @@ -533,9 +542,12 @@ class TestLinkFlowctrl(TestCase): pause_frame_fwd='off') result = self.start_traffic(tgenInput) self.logger.info("Packet loss: %.3f" % result) - self.verify(result >= 0.5, - "Link flow control fail after port stop/start, the loss percent is more than 50%") - + if self.nic == "niantic": + self.verify(result >= 0.3, + "Link flow control fail, the loss percent is less than 30%") + else: + self.verify(result >= 0.5, + "Link flow control fail, the loss percent is less than 50%") # test again after port Stop/start self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop 0", "testpmd> ") @@ -543,8 +555,12 @@ class TestLinkFlowctrl(TestCase): self.dut.send_expect("start", "testpmd> ", 60) result = self.start_traffic(tgenInput) self.logger.info("Packet loss: %.3f" % result) - self.verify(result >= 0.5, - "Link flow control fail after port stop/start, the loss percent is more than 50%") + if self.nic == "niantic": + self.verify(result >= 0.3, + "Link flow control fail, the loss percent is less than 30%") + else: + self.verify(result >= 0.5, + "Link flow control fail, the loss percent is less than 50%") self.dut.send_expect("stop", "testpmd> ") def tear_down_all(self):