From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 6805AF950 for ; Thu, 12 Jan 2017 09:46:06 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 12 Jan 2017 00:46:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,349,1477983600"; d="scan'208";a="1111480952" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 12 Jan 2017 00:45:52 -0800 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Thu, 12 Jan 2017 16:46:56 +0800 Message-Id: <1484210817-42185-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [patch V2 1/2] add check_tx_bytes function for check testpmd tx_bytes 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 08:46:07 -0000 changlist: 1. add PROTOCOL_PACKET_SIZE value in setting mode 2. add check_tx_bytes function in testpmd output mode Signed-off-by: xu,huilong --- framework/pmd_output.py | 10 ++++++++-- framework/settings.py | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index d982c89..13dcaef 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -31,7 +31,7 @@ import os import re -from settings import TIMEOUT +from settings import TIMEOUT,PROTOCOL_PACKET_SIZE from utils import create_mask @@ -192,7 +192,13 @@ class PmdOutput(): Get the allmulticast mode of port. """ return self.get_detail_from_port_info("Allmulticast mode: ", "\S+", port_id) - + def check_tx_bytes(self, tx_bytes, exp_bytes = 0): + """ + fortville nic will send lldp packet when nic setup with testpmd. + 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'] 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 df2a491..acffa34 100644 --- a/framework/settings.py +++ b/framework/settings.py @@ -161,7 +161,12 @@ HEADER_SIZE = { 'tcp': 20, 'vxlan': 8, } - +""" +dpdk send protocol packet size. +""" +PROTOCOL_PACKET_SIZE = { + 'lldp': 110, +} """ Default session timeout. -- 1.9.3