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 6916A1BBE for ; Wed, 8 Mar 2017 06:45:00 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2017 21:44:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,262,1486454400"; d="scan'208";a="941863738" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 07 Mar 2017 21:44:57 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 21:44:57 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 21:44:57 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Wed, 8 Mar 2017 13:44:53 +0800 From: "Liu, Yong" To: "Lin, Xueqin" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] add --crc-strip param when starting i40evf driver testpmd Thread-Index: AQHSlyeNQjWZweTKskalJGt+YEG8R6GKI7lA//+VogCAALV+4A== Date: Wed, 8 Mar 2017 05:44:53 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D756C5@SHSMSX103.ccr.corp.intel.com> References: <1488858049-5412-1-git-send-email-xueqin.lin@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D74E16@SHSMSX103.ccr.corp.intel.com> <0D300480287911409D9FF92C1FA2A3355B1B5871@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0D300480287911409D9FF92C1FA2A3355B1B5871@SHSMSX104.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 05:45:01 -0000 Xueqin, I missed that its running on vm_dut. PCI device info has been saved in self= .dut.pci_devices_info. There's no need to load serializer file. Thanks, Marvin > -----Original Message----- > From: Lin, Xueqin > Sent: Wednesday, March 08, 2017 10:52 AM > To: Liu, Yong ; dts@dpdk.org > Subject: RE: [dts] [PATCH] add --crc-strip param when starting i40evf > driver testpmd >=20 > Thanks for review, reply as below. >=20 > Best regards, > Xueqin >=20 >=20 > -----Original Message----- > From: Liu, Yong > 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 > driver testpmd >=20 > Hi Xueqin, > Some comments below. >=20 > > -----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 > > driver testpmd > > > > --- > > framework/pmd_output.py | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/framework/pmd_output.py b/framework/pmd_output.py index > > 13dcaef..7585088 100644 > > --- a/framework/pmd_output.py > > +++ b/framework/pmd_output.py > > @@ -31,9 +31,10 @@ > > > > import os > > import re > > +import settings > > from settings import TIMEOUT,PROTOCOL_PACKET_SIZE from utils import > > create_mask > > - > > +from serializer import Serializer > > > > class PmdOutput(): > > > > @@ -43,6 +44,7 @@ class PmdOutput(): > > > > def __init__(self, dut): > > self.dut =3D dut > > + self.NAME =3D '%s' %dut >=20 > Please check with pep8, should be space after "%". >=20 > > 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 > > > > def start_testpmd(self, cores, param=3D'', eal_param=3D'', socket= =3D0): > > + # 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') >=20 > 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. >=20 > 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. >=20 > Suggest use this logic: >=20 > 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 >=20 > 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 >=20 >=20 > > + 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 > features > > if "--txqflags" not in param: > > param +=3D " --txqflags=3D0" > > -- > > 2.5.5