From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2A1871C00 for ; Thu, 11 May 2017 09:36:25 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2017 00:36:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,323,1491289200"; d="scan'208";a="85465911" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 11 May 2017 00:36:23 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Thu, 11 May 2017 15:37:36 +0800 Message-Id: <1494488267-42592-2-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1494488267-42592-1-git-send-email-huilongx.xu@intel.com> References: <1494488267-42592-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [PATCH 01/12] 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: Thu, 11 May 2017 07:36:25 -0000 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 + 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], } """ -- 1.9.3