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 14A68A04F6; Tue, 7 Jan 2020 08:12:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 058E21D94A; Tue, 7 Jan 2020 08:12:55 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3B0B61D918 for ; Tue, 7 Jan 2020 08:12:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2020 23:12:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,404,1571727600"; d="scan'208";a="253632601" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 06 Jan 2020 23:12:51 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jan 2020 23:12:51 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.28]) with mapi id 14.03.0439.000; Tue, 7 Jan 2020 15:12:49 +0800 From: "Tu, Lijuan" To: "Xu, HailinX" , "dts@dpdk.org" CC: "Xu, HailinX" Thread-Topic: [dts] [PATCH v1]tests/userspace_ethtool: optimize code Thread-Index: AQHVxQf8d7/XZpNrbkGVyfCXpScl5qfeyaYQ Date: Tue, 7 Jan 2020 07:12:49 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBA3CD9@SHSMSX101.ccr.corp.intel.com> References: <1578365959-76061-1-git-send-email-hailinx.xu@intel.com> In-Reply-To: <1578365959-76061-1-git-send-email-hailinx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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 v1]tests/userspace_ethtool: optimize code 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" applied > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xuhailin > Sent: Tuesday, January 7, 2020 10:59 AM > To: dts@dpdk.org > Cc: Xu, HailinX > Subject: [dts] [PATCH v1]tests/userspace_ethtool: optimize code >=20 > From: "xu,hailin" >=20 > On some platforms, the port not up,add check port link status to make sur= e > port link up >=20 > Signed-off-by: xu,hailin > --- > tests/TestSuite_userspace_ethtool.py | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/tests/TestSuite_userspace_ethtool.py > b/tests/TestSuite_userspace_ethtool.py > index e10c376..248d1d1 100644 > --- a/tests/TestSuite_userspace_ethtool.py > +++ b/tests/TestSuite_userspace_ethtool.py > @@ -423,6 +423,8 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > self.verify(tx_ring =3D=3D tx_max, "Userspace tool failed to= set Tx ring > parameter") > pkt =3D Packet(pkt_type=3D'UDP') > tester_port =3D self.tester.get_local_port(port) > + self.verify(self.ethapp_check_link_status(index, 'Up') =3D= =3D True, > + 'Fail to Open port{}'.format(index)) > intf =3D self.tester.get_interface(tester_port) > pkt.send_pkt(self.tester, tx_port=3Dintf, count=3D4) > rx_pkts, tx_pkts =3D self.strip_portstats(index) @@ -456,6 += 458,8 @@ > class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > pkt.config_layer('vlan', {'vlan': vlan}) > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > + self.verify(self.ethapp_check_link_status(index, 'Up') =3D= =3D True, > + 'Fail to Open port{}'.format(index)) > pkt.send_pkt(self.tester, tx_port=3Dintf, count=3D4) > rx_pkts, tx_pkts =3D self.strip_portstats(port) > self.verify(rx_pkts =3D=3D ori_rx_pkts + 4, "Failed to Rx vl= an packet") @@ - > 501,6 +505,8 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator)= : > pkt =3D Packet(pkt_type=3D'UDP') > tester_port =3D self.tester.get_local_port(port) > intf =3D self.tester.get_interface(tester_port) > + self.verify(self.ethapp_check_link_status(index, 'Up') =3D= =3D True, > + 'Fail to Open port{}'.format(index)) > # send and sniff packet > inst =3D self.tester.tcpdump_sniff_packets(intf) > pkt.send_pkt(self.tester, tx_port=3Dintf, count=3D4) > -- > 2.17.2