From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9A2963B5 for ; Mon, 15 May 2017 05:07:01 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2017 20:07:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,342,1491289200"; d="scan'208";a="1147765877" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2017 20:06:59 -0700 Message-ID: <5919185F.1010102@intel.com> Date: Mon, 15 May 2017 10:54:23 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,huilong" , dts@dpdk.org References: <1494575072-44798-1-git-send-email-huilongx.xu@intel.com> <1494575072-44798-4-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1494575072-44798-4-git-send-email-huilongx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH] fix check packet failure by lldp have different packet size 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: Mon, 15 May 2017 03:07:02 -0000 Huilong, some comments below. On 05/12/2017 03:44 PM, xu,huilong wrote: > fortville will send different size lldp packet, so should update chcek function. > now we know lldp size is 110 or 100 in dpdk17.05 by debug. > > Signed-off-by: xu,huilong > --- > framework/pmd_output.py | 5 ++++- > framework/settings.py | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/framework/pmd_output.py b/framework/pmd_output.py > index ca361a7..8fdf4c9 100644 > --- a/framework/pmd_output.py > +++ b/framework/pmd_output.py > @@ -203,8 +203,11 @@ class PmdOutput(): > so should used (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp'] > for check tx_bytes count right > """ > - return not (tx_bytes - exp_bytes) % PROTOCOL_PACKET_SIZE['lldp'] > + flage = 1 > + for size in PROTOCOL_PACKET_SIZE['lldp']: > + flage = flage and (tx_bytes - exp_bytes) % size > Not sure the meaning of flage, please change it to more meaningful name like error_flag. > + return not flage > def get_port_vlan_offload(self, port_id): > """ > Function: get the port vlan settting info. > diff --git a/framework/settings.py b/framework/settings.py > index 342314d..3839859 100644 > --- a/framework/settings.py > +++ b/framework/settings.py > @@ -173,7 +173,7 @@ HEADER_SIZE = { > dpdk send protocol packet size. > """ > PROTOCOL_PACKET_SIZE = { > - 'lldp': 110, > + 'lldp': [110,100], Add space between two numbers. > } > > """