From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2813DA00E6 for ; Mon, 13 May 2019 04:25:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 086E22BBD; Mon, 13 May 2019 04:25:32 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 39C9CA3 for ; Mon, 13 May 2019 04:25:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2019 19:25:29 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2019 19:25:28 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 12 May 2019 19:25:27 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 12 May 2019 19:25:27 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.129]) with mapi id 14.03.0415.000; Mon, 13 May 2019 10:25:25 +0800 From: "Lin, Xueqin" To: "Tu, Lijuan" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] tests/vf_daemon: add show and clear statistics case Thread-Index: AQHVCTAdoeQDSgc7n0uUSkktqSRxeaZoU8jA Date: Mon, 13 May 2019 02:25:25 +0000 Message-ID: <0D300480287911409D9FF92C1FA2A3355B4EF5E7@SHSMSX104.ccr.corp.intel.com> References: <1556508696-79429-1-git-send-email-xueqin.lin@intel.com> <8CE3E05A3F976642AAB0F4675D0AD20E0BA7F8D6@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <8CE3E05A3F976642AAB0F4675D0AD20E0BA7F8D6@SHSMSX101.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmVjYWIwM2UtMDdmOC00NDZjLWE1NGUtMGZmMWMxNGFkNDMwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJEM0Y0bEYxMHQrZ0FvVlBjXC8rZVdUXC9aSmd2dUh5dHlNcVlra2lQWG9CTk5FazVhV0NxYkdCT3Y3enZyRXREUTMifQ== dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] tests/vf_daemon: add show and clear statistics case 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" Test plan already has this case.=20 Best regards, Xueqin -----Original Message----- From: Tu, Lijuan=20 Sent: Monday, May 13, 2019 10:04 AM To: Lin, Xueqin ; dts@dpdk.org Cc: Lin, Xueqin Subject: RE: [dts] [PATCH] tests/vf_daemon: add show and clear statistics c= ase Applied, Could you add the test case into test plan? > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xueqin Lin > Sent: Monday, April 29, 2019 11:32 AM > To: dts@dpdk.org > Cc: Lin, Xueqin > Subject: [dts] [PATCH] tests/vf_daemon: add show and clear statistics=20 > case >=20 > Signed-off-by: Xueqin Lin >=20 > --- > tests/TestSuite_vf_daemon.py | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) >=20 > diff --git a/tests/TestSuite_vf_daemon.py=20 > b/tests/TestSuite_vf_daemon.py index 0dd797b..41955c8 100644 > --- a/tests/TestSuite_vf_daemon.py > +++ b/tests/TestSuite_vf_daemon.py > @@ -696,6 +696,40 @@ class TestVfDaemon(TestCase): > self.vm0_testpmd.execute_cmd('vlan set strip off 0') > self.vm0_testpmd.execute_cmd('vlan set filter off 0') >=20 > + def test_stats_show_clear(self): > + """ > + Show and clear statistics for a VF from PF > + """ > + self.check_vf_link_status() > + self.vf0_mac =3D self.vm0_testpmd.get_port_mac(0) > + out =3D self.dut_testpmd.execute_cmd('show vf stats 0 0') > + self.verify("RX-packets: 0" in out and "TX-packets: 0" in out, > + "Fail to show VF RX and TX stats from PF") > + out =3D self.vm0_testpmd.execute_cmd('show port stats 0') > + self.verify("RX-packets: 0" in out and "TX-packets: 0" in out, > + "Fail to show VF RX and TX stats") > + > + self.vm0_testpmd.execute_cmd('set fwd mac') > + self.vm0_testpmd.execute_cmd('set verbose 1') > + self.vm0_testpmd.execute_cmd('start') > + > + self.send_packet(self.vf0_mac, 0, 64 , 10) > + > + out =3D self.dut_testpmd.execute_cmd('show vf stats 0 0') > + self.verify("RX-packets: 10" in out and "TX-packets: 10" in out, > + "Wrong to show VF RX and TX packets from PF") > + out =3D self.vm0_testpmd.execute_cmd('show port stats 0') > + self.verify("RX-packets: 10" in out and "TX-packets: 10" in out, > + "Wrong to show VF RX and TX stats") > + > + self.dut_testpmd.execute_cmd('clear vf stats 0 0') > + out =3D self.dut_testpmd.execute_cmd('show vf stats 0 0') > + self.verify("RX-packets: 0" in out and "TX-packets: 0" in out, > + "Fail to clear VF RX and TX stats from PF") > + out =3D self.vm0_testpmd.execute_cmd('show port stats 0') > + self.verify("RX-packets: 0" in out and "TX-packets: 0" in out, > + "Wrong to show VF RX and TX stats after clear") > + >=20 > def tear_down(self): > self.vm0_testpmd.quit() > -- > 2.5.5