From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E2F092C16 for ; Tue, 23 May 2017 08:29:42 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 23:29:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,380,1491289200"; d="scan'208";a="1173064212" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 22 May 2017 23:29:40 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Tue, 23 May 2017 14:31:02 +0800 Message-Id: <1495521063-58639-2-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1495521063-58639-1-git-send-email-huilongx.xu@intel.com> References: <1495521063-58639-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] PATCH V4] 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: Tue, 23 May 2017 06:29:43 -0000 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 | 7 ++++++- framework/settings.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index ca361a7..260f42c 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -203,7 +203,12 @@ 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'] + # error_flage is true means tx_bytes different with expect bytes + error_flage = 1 + for size in PROTOCOL_PACKET_SIZE['lldp']: + error_flage = error_flage and (tx_bytes - exp_bytes) % size + + return not error_flage def get_port_vlan_offload(self, port_id): """ diff --git a/framework/settings.py b/framework/settings.py index 342314d..f0f3c8f 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