From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 34D6F952 for ; Wed, 8 Mar 2017 03:52:04 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 07 Mar 2017 18:52:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,261,1486454400"; d="scan'208";a="65314152" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 07 Mar 2017 18:52:03 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 18:52:03 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 18:52:03 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Wed, 8 Mar 2017 10:51:31 +0800 From: "Lin, Xueqin" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] add --crc-strip param when starting i40evf driver testpmd Thread-Index: AQHSl6wIjaEOWZie2Eyoj18VSQjn2qGKPLNw Date: Wed, 8 Mar 2017 02:51:30 +0000 Message-ID: <0D300480287911409D9FF92C1FA2A3355B1B5871@SHSMSX104.ccr.corp.intel.com> References: <1488858049-5412-1-git-send-email-xueqin.lin@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D74E16@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D74E16@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] add --crc-strip param when starting i40evf driver testpmd 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: Wed, 08 Mar 2017 02:52:05 -0000 Thanks for review, reply as below. Best regards, Xueqin -----Original Message----- From: Liu, Yong=20 Sent: Wednesday, March 8, 2017 9:34 AM To: Lin, Xueqin ; dts@dpdk.org Cc: Lin, Xueqin Subject: RE: [dts] [PATCH] add --crc-strip param when starting i40evf drive= r testpmd Hi Xueqin, Some comments below. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xueqin Lin > Sent: Tuesday, March 07, 2017 11:41 AM > To: dts@dpdk.org > Cc: Lin, Xueqin > Subject: [dts] [PATCH] add --crc-strip param when starting i40evf=20 > driver testpmd >=20 > --- > framework/pmd_output.py | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/pmd_output.py b/framework/pmd_output.py index=20 > 13dcaef..7585088 100644 > --- a/framework/pmd_output.py > +++ b/framework/pmd_output.py > @@ -31,9 +31,10 @@ >=20 > import os > import re > +import settings > from settings import TIMEOUT,PROTOCOL_PACKET_SIZE from utils import=20 > create_mask > - > +from serializer import Serializer >=20 > class PmdOutput(): >=20 > @@ -43,6 +44,7 @@ class PmdOutput(): >=20 > def __init__(self, dut): > self.dut =3D dut > + self.NAME =3D '%s' %dut Please check with pep8, should be space after "%". > self.dut.testpmd =3D self > self.rx_pkts_prefix =3D "RX-packets:" > self.rx_missed_prefix =3D "RX-missed:" > @@ -100,6 +102,16 @@ class PmdOutput(): > return self.command >=20 > def start_testpmd(self, cores, param=3D'', eal_param=3D'', socket=3D= 0): > + # add --crc-strip param to start testpmd for i40evf driver in VM > + if "virt_dut" in self.NAME: > + serializer =3D Serializer() > + ports_info =3D serializer.load('dut_port_info') Can't load dut port info without set serialize filename. And cached info in dut_port_info is only scanned dut PF devices, VF devices= won't be in it. I have verified these codes, could load dut port info successfully. cached info in dut_port_info not only scan dut PF devices, if starting qemu= , it caches VF devices info instead. Suggest use this logic: If white list option in eal command: Get devices list Else: Get list of Ethernet devices which bound to self.drivername ls --file-type --color=3Dnever -a /sys/module/igb_uio/drivers/pci\:igb_uio= / |grep -v module | grep @ if black list in eal param remove blacked device from the list for device in device list: get default driver by GetNicObj(domain_id, bus_id, devfun_id) if 'i40evf' is the default driver: add crc-strip option > + for port in ports_info: > + pci_id =3D port['type'] > + driver =3D settings.get_nic_driver(pci_id) > + if driver =3D=3D "i40evf": > + if "--crc-strip" not in param: > + param +=3D " --crc-strip" > # in dpdk2.0 need used --txqflags param to open hardware feature= s > if "--txqflags" not in param: > param +=3D " --txqflags=3D0" > -- > 2.5.5