From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id AEE142C6D for ; Thu, 12 Jan 2017 03:03:02 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 11 Jan 2017 18:03:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,347,1477983600"; d="scan'208";a="29295633" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 11 Jan 2017 18:03:01 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Jan 2017 18:03:00 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Thu, 12 Jan 2017 10:02:59 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [patch V1 2/2] update shutdown_api and jumboframes check tx-packets code Thread-Index: AQHSbHICjveH+QRhzk+MRGDxU64p9KE0FvKQ Date: Thu, 12 Jan 2017 02:02:58 +0000 Message-ID: References: <1484031290-35715-1-git-send-email-huilongx.xu@intel.com> <1484031290-35715-2-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D4137C@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D4137C@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, 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 2/2] update shutdown_api and jumboframes check tx-packets 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: , X-List-Received-Date: Thu, 12 Jan 2017 02:03:03 -0000 Yes, I will send V2 patch for check tx-bytes. Thanks a lot > -----Original Message----- > From: Liu, Yong > Sent: Thursday, January 12, 2017 9:20 AM > To: Xu, HuilongX; dts@dpdk.org > Cc: Xu, HuilongX > Subject: RE: [dts] [patch V1 2/2] update shutdown_api and jumboframes > check tx-packets code >=20 > Huilong, > There're lots of function may affected if we can't avoid LLDP packets sen= ding > out from dpdk drive Fortville port. > We need a list about which case will be affected by this issue. And we n= eed > to abstract one function to check packet size. > Function input will be expected received or transmitted size and return v= alue > is just meet the expectation or not. >=20 > Regards, > Marvin >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > Sent: Tuesday, January 10, 2017 2:55 PM > > To: dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: [dts] [patch V1 2/2] update shutdown_api and jumboframes > > check tx- packets code > > > > fotville nic will send lldp packet when port setup by dpdk testpmd. > > so we need update check tx-packets code. > > used (tx-packets - forward packet size) % lldp packet size replace > > tx-packets =3D=3D forward packets size > > > > Signed-off-by: "xu,huilong" > > --- > > tests/TestSuite_jumboframes.py | 5 ++++- > > tests/TestSuite_shutdown_api.py | > > 16 ++++++++++------ > > 2 files changed, 14 insertions(+), 7 deletions(-) > > > > diff --git a/tests/TestSuite_jumboframes.py > > b/tests/TestSuite_jumboframes.py index 58f2e17..bebee59 100644 > > --- a/tests/TestSuite_jumboframes.py > > +++ b/tests/TestSuite_jumboframes.py > > @@ -39,6 +39,7 @@ import re > > from time import sleep > > from test_case import TestCase > > from pmd_output import PmdOutput > > +from settings import PROTOCOL_PACKET_SIZE > > > > ETHER_HEADER_LEN =3D 18 > > IP_HEADER_LEN =3D 20 > > @@ -93,7 +94,9 @@ class TestJumboframes(TestCase): > > rx_err -=3D rx_err_ori > > > > if received: > > - self.verify((tx_pkts =3D=3D rx_pkts) and ((tx_bytes + 4) = =3D=3D pktsize) and > > ((rx_bytes + 4) =3D=3D pktsize), > > + self.verify((tx_pkts - rx_pkts % PROTOCOL_PACKET_SIZE['lld= p'] =3D=3D 0) > > + and ( (tx_bytes + 4 - pktsize ) % > > + PROTOCOL_PACKET_SIZE['lldp'] > > =3D=3D 0) > > + and ((rx_bytes + 4) =3D=3D pktsize), > > "packet pass assert error") > > else: > > #self.verify(p0tx_pkts =3D=3D p1rx_pkts and (p1rx_err =3D= =3D 1 or > > p1rx_pkts =3D=3D 0), diff --git a/tests/TestSuite_shutdown_api.py > > b/tests/TestSuite_shutdown_api.py index 3dbacf2..5e67bf5 100644 > > --- a/tests/TestSuite_shutdown_api.py > > +++ b/tests/TestSuite_shutdown_api.py > > @@ -42,7 +42,7 @@ import re > > import os > > from test_case import TestCase > > from pmd_output import PmdOutput > > -from settings import HEADER_SIZE > > +from settings import HEADER_SIZE, PROTOCOL_PACKET_SIZE > > from exception import VerifyFailure > > > > # > > @@ -149,14 +149,18 @@ class TestShutdownApi(TestCase): > > if vlan is True: > > # vlan strip default is on > > tx_bytes_exp -=3D 4 > > - > > + > > + # fortville nic enable send lldp packet function when port set= up > > + # now the tx-packets size is lldp_size(110) * n + forward pack= e size > > + # so use (tx-packets - forward packet size) % lldp_size, if > > + it is 0, it means forward packet size right > > + > > if received: > > - self.verify(p0tx_pkts =3D=3D p1rx_pkts, "Wrong TX pkts p0_= tx=3D%d, > > p1_rx=3D%d" % (p0tx_pkts, p1rx_pkts)) > > + self.verify((p0tx_pkts - p1rx_pkts) % > > + PROTOCOL_PACKET_SIZE['lldp'] =3D=3D 0, "Wrong TX pkts p0_tx=3D%d, > p1_rx=3D%d" > > + % (p0tx_pkts, p1rx_pkts)) > > self.verify(p1rx_bytes =3D=3D rx_bytes_exp, "Wrong Rx byte= s > > p1_rx=3D%d, expect=3D%d" % (p1rx_bytes, rx_bytes_exp)) > > - self.verify(p0tx_bytes =3D=3D tx_bytes_exp, "Wrong Tx byte= s p0_tx=3D%d, > > expect=3D%d" % (p0tx_bytes, tx_bytes_exp)) > > + self.verify((p0tx_bytes - tx_bytes_exp) % > > + PROTOCOL_PACKET_SIZE['lldp'] =3D=3D 0, "Wrong Tx bytes p0_tx=3D%d, > > + expect=3D%d" % (p0tx_bytes, tx_bytes_exp)) > > else: > > - self.verify(p0tx_pkts =3D=3D 0, "Packet not dropped p0tx_p= kts=3D%d" % > > p0tx_pkts) > > - self.verify(p0tx_bytes =3D=3D 0, "Packet not dropped p0tx_= bytes=3D%d" % > > p0tx_bytes) > > + self.verify(p0tx_pkts % PROTOCOL_PACKET_SIZE['lldp'] =3D= =3D > > + 0, "Packet not > > dropped p0tx_pkts=3D%d" % p0tx_pkts) > > + self.verify(p0tx_bytes % PROTOCOL_PACKET_SIZE['lldp'] =3D= =3D > > + 0, "Packet not dropped p0tx_bytes=3D%d" % p0tx_bytes) > > > > def check_ports(self, status=3DTrue): > > """ > > -- > > 1.9.3