From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F1208A00BE; Tue, 28 Apr 2020 12:15:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4BAF1D58F; Tue, 28 Apr 2020 12:15:42 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 32F891D411 for ; Tue, 28 Apr 2020 12:15:41 +0200 (CEST) IronPort-SDR: tixK/vUnPSgxNvuq3nTrg1sCCpFRFNEoxKDcI5GhAPAtH2nzfPD+67YUaarsfFM8/lIj7rtIFO /jOBxubjFMFA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 03:15:39 -0700 IronPort-SDR: dGajsViukwEf35FlSNnsJ62jG0XgTbXc755mX1LInrc/3ciitKw80bpXHVmwpK65J1G+ioL9Ce kKcC+6h684Qg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="247672699" Received: from unknown (HELO dpdk-test60-xueqin.sh.intel.com) ([10.67.117.106]) by fmsmga007.fm.intel.com with ESMTP; 28 Apr 2020 03:15:38 -0700 From: Xueqin Lin To: dts@dpdk.org Cc: Xueqin Lin Date: Tue, 28 Apr 2020 00:17:06 -0400 Message-Id: <1588047426-91326-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH 2/3] tests/shutdown_api: add rx/tx descriptor status test for intel nics 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" rx/tx descriptor status case could support igb, ixgbe, i40e nics Signed-off-by: Xueqin Lin --- tests/TestSuite_shutdown_api.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py index 181a385..b29ae9b 100644 --- a/tests/TestSuite_shutdown_api.py +++ b/tests/TestSuite_shutdown_api.py @@ -787,22 +787,30 @@ class TestShutdownApi(TestCase): def test_check_rxtx_desc_status(self): """ Check tx and rx descriptors status. + When rx_descriptor_status is used, status can be “AVAILABLE”, “DONE” or “UNAVAILABLE”. + When tx_descriptor_status is used, status can be “FULL”, “DONE” or “UNAVAILABLE.” """ - self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket) + self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop --txq=16 --rxq=16 --txd=4096 --rxd=4096" % utils.create_mask(self.ports), socket=self.ports_socket) for i in range(3): + rxqid = randint(0, 16) self.desc = randint(0, 4095) - out = self.dut.send_expect("show port %s rxq 0 desc %s status" % (self.ports[0], self.desc), "testpmd> ") + out = self.dut.send_expect("show port %s rxq %s desc %s status" % (self.ports[0], rxqid, self.desc), "testpmd> ") self.verify( - "Desc status = AVAILABLE" in out, "RX descriptor status is improper") + "Desc status = AVAILABLE" in out or "Desc status = DONE" in out or "Desc status = UNAVAILABLE" in out, + "RX descriptor status is improper") self.verify( - "Bad arguments" not in out, "RX descriptor status is not supported") + "Bad arguments" not in out and "Invalid queueid" not in out, + "RX descriptor status is not supported") + txqid = randint(0, 16) self.desc = randint(0, 511) - out = self.dut.send_expect("show port %s txq 0 desc %s status" % (self.ports[0], self.desc), "testpmd> ") + out = self.dut.send_expect("show port %s txq %s desc %s status" % (self.ports[0], txqid, self.desc), "testpmd> ") self.verify( - "Desc status = FULL" in out, "TX descriptor status is improper") + "Desc status = FULL" in out or "Desc status = DONE" in out or "Desc status = UNAVAILABLE" in out, + "TX descriptor status is improper") self.verify( - "Bad arguments" not in out, "TX descriptor status is not supported") + "Bad arguments" not in out and "Invalid queueid" not in out, + "TX descriptor status is not supported") def tear_down(self): """ -- 2.7.5