From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B40F1A00E6 for ; Mon, 15 Apr 2019 20:00:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 659EB1B3B3; Mon, 15 Apr 2019 20:00:57 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E762C1B3AA for ; Mon, 15 Apr 2019 20:00:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 11:00:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="142945508" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 15 Apr 2019 11:00:53 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 11:00:53 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 11:00:52 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.92]) with mapi id 14.03.0415.000; Tue, 16 Apr 2019 02:00:51 +0800 From: "Tu, Lijuan" To: "Mei, JianweiX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V4] tests/etag: add vf driver vfio-pci Thread-Index: AQHU8NWc1a4bZxd1GEiJ+m6LuyvUHqY4uVhggAM5HYCAAY5N8A== Date: Mon, 15 Apr 2019 18:00:50 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA61A39@SHSMSX101.ccr.corp.intel.com> References: <1555035536-20289-1-git-send-email-jianweix.mei@intel.com> <8CE3E05A3F976642AAB0F4675D0AD20E0BA60C51@SHSMSX101.ccr.corp.intel.com> <8492B1A1F60DBB41A65FD160BBB3DA8BF859DF@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <8492B1A1F60DBB41A65FD160BBB3DA8BF859DF@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2RlZDZmODItZmIwZi00YTE0LWJhOWUtY2QyY2RlMzk2NmE1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieGZ5anVYZHBkZERxdDFhaFVTbHVOVUxOQnNoTzVSdzBUOWFpMEhlMWhETTh6TG5UN0lzeUJEZlNaSndQb0JmRCJ9 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 V4] tests/etag: add vf driver vfio-pci 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Sorry, I can't list all questions at once. I am not a full-time maintainer,= I can't stare at mail all the time. But I am managing to do bi-weekly revi= ew, and trying to do weekly review. DTS is an open source project, anyone could review your patch and raise his= /her concern. Also welcome you to review other's patches. As an submitter, = you should convince the reviewers, not all comments from reviewers are rea= sonable, you could challenge them. It's good idea to have a standard, do you have any suggestion for the stand= ard, what it should contain? Could you provide an draft, or maybe an abstr= act, I think if we have come items, we could discuss them and get more comm= ents from community. Here are what we do to review a patch: 1, read your comments, if the comment is not align with your changes, the p= atch will be rejected. 2, read the difference, and try to understand why you do these changes. 3, more consideration about the third party, your code maybe break other's = tests, or can't run at the party platform, such as arm. 4, code styles, pep8 style, we prefer to flexibility with readable, it's mo= re important for a code readable than pep8 style. 5, static analysis, based on my knowledge. 6, typos, and anything else I found. > -----Original Message----- > From: Mei, JianweiX > Sent: Sunday, April 14, 2019 6:47 PM > To: Tu, Lijuan ; dts@dpdk.org > Subject: RE: [dts] [PATCH V4] tests/etag: add vf driver vfio-pci >=20 > Hi, Lijuan >=20 > Could you list all questions at once? I suggest there should provide a > standard for a modifying patch or a new patch. Thanks for your patience. >=20 > -----Original Message----- > From: Tu, Lijuan > Sent: Saturday, April 13, 2019 12:44 AM > To: Mei, JianweiX ; dts@dpdk.org > Cc: Mei, JianweiX > Subject: RE: [dts] [PATCH V4] tests/etag: add vf driver vfio-pci >=20 >=20 >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei > > Sent: Thursday, April 11, 2019 7:19 PM > > To: dts@dpdk.org > > Cc: Mei, JianweiX > > Subject: [dts] [PATCH V4] tests/etag: add vf driver vfio-pci > > > > add vf driver vfio-pci > > > > Signed-off-by: Jianwei Mei > > --- > > tests/TestSuite_etag.py | 45 > > ++++++++++++++++++++++++++++------------- > > 1 file changed, 31 insertions(+), 14 deletions(-) > > > > diff --git a/tests/TestSuite_etag.py b/tests/TestSuite_etag.py index > > 7cf93eb..fd855de 100644 > > --- a/tests/TestSuite_etag.py > > +++ b/tests/TestSuite_etag.py > > @@ -33,27 +33,24 @@ > > DPDK Test suite. > > > > ''' > > - > > import re > > import time > > import sys > > - > > import utils > > from qemu_kvm import QEMUKvm > > from test_case import TestCase > > from pmd_output import PmdOutput > > from exception import VerifyFailure > > - > > from scapy.utils import rdpcap > > - > > from packet import Packet > > > > VM_CORES_MASK =3D 'all' > > > > class TestEtag(TestCase): > > + supported_vf_driver =3D ['pci-stub', 'vfio-pci'] > > def set_up_all(self): > > self.dut_ports =3D self.dut.get_ports(self.nic) > > - self.verify(self.nic in ['sagepond'], '802.1BR only support by= sagepond') > > + self.verify(self.nic in ['sagepond','sageville'], '802.1BR > > + only support by sagepond and sageville') > > self.verify(len(self.dut_ports) >=3D 1, 'Insufficient ports') > > self.src_intf =3D self.tester.get_interface(self.tester.get_lo= cal_port(0)) > > self.src_mac =3D > > self.tester.get_mac(self.tester.get_local_port(0)) > > @@ -78,25 +75,45 @@ class TestEtag(TestCase): > > self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 2, > > driver=3Ddriver) > > self.sriov_vfs_port_0 =3D > > self.dut.ports_info[self.used_dut_port_0]['vfs_port'] > > > > + # set vf assign method and vf driver > > + self.vf_driver =3D self.get_suite_cfg()['vf_driver'] > > + if self.vf_driver is None: > > + self.vf_driver =3D 'pci-stub' > > + self.verify(self.vf_driver in self.supported_vf_driver, > > + "Unspported vf > > driver") > > + if self.vf_driver =3D=3D 'pci-stub': > > + self.vf_assign_method =3D 'pci-assign' > > + else: > > + self.vf_assign_method =3D 'vfio-pci' > > + self.dut.send_expect('modprobe vfio-pci', '#') > > + > > try: > > for port in self.sriov_vfs_port_0: > > - port.bind_driver('pci-stub') > > + port.bind_driver(self.vf_driver) > > > > time.sleep(1) > > vf0_prop =3D {'opt_host': self.sriov_vfs_port_0[0].pci} > > vf1_prop =3D {'opt_host': self.sriov_vfs_port_0[1].pci} > > > > - # start testpmd without the two VFs on the host > [Lijuan] this interpretation should be kept here. > > - self.host_testpmd =3D PmdOutput(self.dut) > > - eal_param =3D '-b %(vf0)s -b %(vf1)s' % {'vf0': > > self.sriov_vfs_port_0[0].pci, > [Lijuan] Same code in if and else, should be put out of conditions > > + if driver =3D=3D 'igb_uio': > > + # start testpmd without the two VFs on the host > > + self.host_testpmd =3D PmdOutput(self.dut) > > + eal_param =3D '-b %(vf0)s -b %(vf1)s' % {'vf0': > > self.sriov_vfs_port_0[0].pci, > > + 'vf1': self.sri= ov_vfs_port_0[1].pci} > > + if (self.nic in ["niantic", "sageville", "sagepond"]): > > + self.host_testpmd.start_testpmd("1S/2C/2T", > > + "--txq=3D4 --rxq=3D4 ", > > eal_param=3Deal_param) > [Lijuan] Not all platform has 2 thread, so please examine it could get en= ough > cores and could meet your requirement. > > + else: > > + self.host_testpmd.start_testpmd("1S/2C/2T", "", > > eal_param=3Deal_param) > > + else: > > + # start testpmd without the two VFs on the host > > + self.host_testpmd =3D PmdOutput(self.dut) > > + eal_param =3D '-b %(vf0)s -b %(vf1)s' % {'vf0': > > + self.sriov_vfs_port_0[0].pci, > > 'vf1': > > self.sriov_vfs_port_0[1].pci} > > - > > - self.preset_host_testpmd('1S/2C/2T', eal_param) > > + self.preset_host_testpmd('1S/2C/2T', eal_param) > > > > # set up VM0 ENV > > self.vm0 =3D QEMUKvm(self.dut, 'vm0', 'vf_etag') > > - self.vm0.set_vm_device(driver=3D'pci-assign', **vf0_prop) > > - self.vm0.set_vm_device(driver=3D'pci-assign', **vf1_prop) > > + self.vm0.set_vm_device(driver=3Dself.vf_assign_method, **v= f0_prop) > > + self.vm0.set_vm_device(driver=3Dself.vf_assign_method, > > + **vf1_prop) > > self.vm_dut_0 =3D self.vm0.start() > > if self.vm_dut_0 is None: > > raise Exception('Set up VM0 ENV failed!') @@ -290,7 > > +307,7 @@ class TestEtag(TestCase): > > else: > > # Same E-tag forwarding to VF0, Send 802.1BR packet > > with broadcast mac and > > # check packet only received on VF0 or VF1 > > - host_cmds =3D [['E-tag set filter add e-tag-id 1000 ds= t-pool %d port > > 0'%test_type[-1:]], > > + host_cmds =3D [['E-tag set filter add e-tag-id 1000 > > + dst-pool %d port 0'% int(test_type[-1:])], > > ['set fwd rxonly'], > > ['set verbose 1'], > > ['start']] > > -- > > 2.17.2