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 5568AA05D3 for ; Fri, 29 Mar 2019 09:18:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2AD8E2BF4; Fri, 29 Mar 2019 09:18:52 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D46541DB8 for ; Fri, 29 Mar 2019 09:18:50 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2019 01:18:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,283,1549958400"; d="scan'208";a="135838844" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 29 Mar 2019 01:18:49 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 29 Mar 2019 01:18:49 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 29 Mar 2019 01:18:48 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.163]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.252]) with mapi id 14.03.0415.000; Fri, 29 Mar 2019 16:18:47 +0800 From: "Yao, BingX Y" To: "Zhu, WenhuiX" , "dts@dpdk.org" CC: "Zhu, WenhuiX" Thread-Topic: [dts] [PATCH V1] tests/userspace_ethtool Modify judgment conditions Thread-Index: AQHU5fWHrNw4adwN80mSWarnX8G6p6YiQ+xg Date: Fri, 29 Mar 2019 08:18:45 +0000 Message-ID: <95BCD24840F32441BEA74E0F8A31839E04F07589@shsmsx102.ccr.corp.intel.com> References: <1553839799-91625-1-git-send-email-wenhuix.zhu@intel.com> In-Reply-To: <1553839799-91625-1-git-send-email-wenhuix.zhu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 Modify judgment conditions 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" Tested-by: Yao, BingX Y -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui Sent: Friday, March 29, 2019 2:10 PM To: dts@dpdk.org Cc: Zhu, WenhuiX Subject: [dts] [PATCH V1] tests/userspace_ethtool Modify judgment condition= s Set the mtu to 2048. First "stop port_id", then "open port_id" The second package pkt_size needs to be added HEADER_SIZE['eth'] Signed-off-by: zhuwenhui --- tests/TestSuite_userspace_ethtool.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspa= ce_ethtool.py index 4208e0f..060529e 100644 --- a/tests/TestSuite_userspace_ethtool.py +++ b/tests/TestSuite_userspace_ethtool.py @@ -556,16 +556,18 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenera= tor): self.tester.send_expect("ifconfig %s mtu 9000" % (intf), "# ") for mtu in mtus: self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>"= ) + self.dut.send_expect("open %s" % index, "EthApp>") ori_rx_pkts, _ =3D self.strip_portstats(index) pkt_size =3D mtu + HEADER_SIZE['eth'] pkt =3D Packet(pkt_len=3Dpkt_size) pkt.send_pkt(tx_port=3Dintf) rx_pkts, _ =3D self.strip_portstats(index) - self.verify(rx_pkts =3D=3D ori_rx_pkts, "Packet match mtu = not forwarded as expected") - pkt =3D Packet(pkt_len=3Dmtu + 1) + self.verify(rx_pkts =3D=3D ori_rx_pkts + 1, "Packet match = mtu not forwarded as expected") + pkt =3D Packet(pkt_len=3Dmtu + 1 + HEADER_SIZE['eth'])=20 pkt.send_pkt(tx_port=3Dintf) rx_pkts_over, _ =3D self.strip_portstats(index) self.verify(rx_pkts =3D=3D rx_pkts_over, "Packet over mtu = should not be forwarded") + self.dut.send_expect("stop %s" % index, "EthApp>") =20 self.tester.send_expect("ifconfig %s mtu %d" % (intf, ori_mtu)= , "# ") =20 --=20 2.17.2