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 4D5C8A0613 for ; Tue, 27 Aug 2019 10:34:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42B051C0D2; Tue, 27 Aug 2019 10:34:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id E48E729CB for ; Tue, 27 Aug 2019 10:34:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2019 01:34:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,436,1559545200"; d="scan'208";a="181638346" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 27 Aug 2019 01:34:31 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 27 Aug 2019 01:34:31 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 27 Aug 2019 01:34:31 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 27 Aug 2019 01:34:30 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0439.000; Tue, 27 Aug 2019 16:34:29 +0800 From: "Wang, Yinan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/vhost_pmd_xstats: fix issue about send pkt Thread-Index: AQHVXKcpm4s3hpVCbkaT42Su2uArGacOqybw Date: Tue, 27 Aug 2019 08:34:28 +0000 Message-ID: References: <1566863431-9701-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1566863431-9701-1-git-send-email-lihongx.ma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzFiYjlmMWItYTZhZS00YjU4LWE5ZWEtZDdkNDFlNjgwOGE1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYkN6Snc0aXVwWkFNNUxVVmRLWGsyRnJ6dTZIVFpVQXAzUmFBSkxhXC9JT28yOERTU2JhdWxzTGd4NDRNcFwveFMrIn0= x-ctpclassification: CTP_NT 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="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/vhost_pmd_xstats: fix issue about send pkt 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" Acked-by: Wang, Yinan > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: 2019=1B$BG/=1B(B8=1B$B7n=1B(B27=1B$BF|=1B(B 7:51 > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] tests/vhost_pmd_xstats: fix issue about send pk= t >=20 > 1. remove useless import > 2. add mtu set when the pkt size greater then 1518 >=20 > Signed-off-by: lihong > --- > tests/TestSuite_vhost_pmd_xstats.py | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/tests/TestSuite_vhost_pmd_xstats.py > b/tests/TestSuite_vhost_pmd_xstats.py > index 75b87a6..82dcc4b 100755 > --- a/tests/TestSuite_vhost_pmd_xstats.py > +++ b/tests/TestSuite_vhost_pmd_xstats.py > @@ -34,20 +34,17 @@ DPDK Test suite. >=20 > vhost pmd xstats test suite. > """ > -import os > -import string > import re > import time > import utils > import datetime > import copy > from test_case import TestCase > -from exception import VerifyFailure > from settings import HEADER_SIZE > -from etgen import IxiaPacketGenerator > from qemu_kvm import QEMUKvm > from packet import Packet > - > +ETHER_JUMBO_FRAME_MTU =3D 9000 > +DEFAULT_JUMBO_FRAME_MTU =3D 1500 >=20 > class TestVhostPmdXstats(TestCase): >=20 > @@ -61,6 +58,8 @@ class TestVhostPmdXstats(TestCase): > self.dut.unbind_interfaces_linux(self.unbind_ports) > cores =3D self.dut.get_core_list("1S/4C/1T") > self.coremask =3D utils.create_mask(cores) > + txport =3D self.tester.get_local_port(self.dut_ports[0]) > + self.txItf =3D self.tester.get_interface(txport) >=20 > self.scapy_num =3D 0 > self.dmac =3D self.dut.get_mac_address(self.dut_ports[0]) > @@ -124,8 +123,6 @@ class TestVhostPmdXstats(TestCase): > Send a packet to port > """ > self.scapy_num +=3D 1 > - txport =3D self.tester.get_local_port(self.dut_ports[0]) > - self.txItf =3D self.tester.get_interface(txport) > pkt =3D Packet(pkt_type=3D'TCP', pkt_len=3Dpktsize) > pkt.config_layer('ether', {'dst': dmac, }) > pkt.send_pkt(tx_port=3Dself.txItf, count=3Dnum) @@ -166,10 +163,= 13 @@ > class TestVhostPmdXstats(TestCase): > for cat in categories: > scope =3D re.search(r'(?<=3Drx_)\w+(?=3D_packets)', cat).gro= up(0) > pktsize =3D int(re.search(r'(?<=3Drx_size_)\d+', cat).group(= 0)) > + if pktsize > 1518: > + self.tester.send_expect('ifconfig %s mtu %d' % > + (self.txItf, ETHER_JUMBO_FRAME_MTU), '# ') >=20 > self.scapy_send_packet(pktsize, self.dmac, 10000) > self.send_verify(scope, 10000) > self.clear_port_xstats(scope) > + self.tester.send_expect('ifconfig %s mtu %d' % (self.txItf, > + DEFAULT_JUMBO_FRAME_MTU), '# ') >=20 > def clear_port_xstats(self, scope): >=20 > -- > 2.7.4