From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45670A04C1; Fri, 22 Nov 2019 06:53:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E0762C28; Fri, 22 Nov 2019 06:53:02 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0A0392C23 for ; Fri, 22 Nov 2019 06:52:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 21:52:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,228,1571727600"; d="scan'208";a="205386524" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 21 Nov 2019 21:52:59 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 21:52:58 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 21:52:58 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.248]) with mapi id 14.03.0439.000; Fri, 22 Nov 2019 13:52:57 +0800 From: "Tu, Lijuan" To: "Mei, JianweiX" , "dts@dpdk.org" CC: "Mei, JianweiX" Thread-Topic: [dts] [PATCH V1] doc/dts_gsg/usage_of_create_eal_and_start_testpmd Thread-Index: AQHVlEhxSPM19vgYK0CJikInl80N+qeWyY+w Date: Fri, 22 Nov 2019 05:52:56 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB677FE@SHSMSX101.ccr.corp.intel.com> References: <1573006615-324978-1-git-send-email-jianweix.mei@intel.com> In-Reply-To: <1573006615-324978-1-git-send-email-jianweix.mei@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.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTAxMzAwZGEtZjAyZi00ZTdkLWJiOWItNGQwMDAyNTczZGRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieSszcVI0N0dqcTVcL0dXQWJCaHkzTHdrazVVYnpuaTh2cHR4OWcrSmV6RW03U3FKOU9VRTBZcDdzWjZNUjdhM0QifQ== 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 V1] doc/dts_gsg/usage_of_create_eal_and_start_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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei > Sent: Wednesday, November 6, 2019 10:17 AM > To: dts@dpdk.org > Cc: Mei, JianweiX > Subject: [dts] [PATCH V1] > doc/dts_gsg/usage_of_create_eal_and_start_testpmd >=20 > usage of create eal parameters and start testpmd functions. >=20 > Signed-off-by: Jianwei Mei > --- > .../usage_of_create_eal_and_start_testpmd.rst | 103 > +++++++++++++++++++++ > 1 file changed, 103 insertions(+) > create mode 100644 > doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst >=20 > diff --git a/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst > b/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst > new file mode 100644 > index 0000000..e1d077d > --- /dev/null > +++ b/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst > @@ -0,0 +1,103 @@ > +How create_eal_parameters and start_testpmd methods use in DPDK Test > +Suite =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +create_eal_parameters > +---------------------------- > + > +This method used to create EAL parameters character string in DPDK Test > Suite. > +for example: -l 1,2 -w 0000:88:00.0 -w 0000:88:00.1 --file- > prefix=3Ddpdk_1112_20190809143420. > + > +.. code-block:: console > + > + define: create_eal_parameters(self, fixed_prefix=3DFalse, socket=3D-1= , > + **config) > + > + usage and example: > + no user parameters: > + param =3D self.dut.create_eal_parameters() > + output: > + param =3D '-l 1,2 -n 4 -w 0000:1a:00.0 -w 0000:1a:00.1 -= -file- > prefix=3Ddpdk_397938_20191105143309' > + > + user parameters: > + 1. usage for port and port options, there are two methods fo= r them. > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > ports=3D[0,1], port_options=3D{0: "proto_xtr=3Dvlan"}) > + or > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > ports=3D['0000:1a:00.0', '0000:1a:00.1'], port_options=3D{'0000:1a:00.0': > "proto_xtr=3Dvlan"}) > + output: > + param =3D '-l 1,2,3,4 -n 4 -w 0000:1a:00.0,proto_xtr= =3Dvlan -w > 0000:1a:00.1 --file-prefix=3Ddpdk_399214_20191105155446' > + > + 2. usage for b_ports. > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > b_ports=3D[0]) > + or > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > b_ports=3D['0000:1a:00.0']) > + output: > + param =3D '-l 1,2,3,4 -n 4 -b 0000:1a:00.0 --file- > prefix=3Ddpdk_399214_20191105155446' > + > + 3. usage for no-pci. > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > no_pci=3DTrue) > + output: > + param =3D '-l 1,2,3,4 -n 4 --file- > prefix=3Ddpdk_399214_20191105155446 --no-pci' > + > + 4. usage for prefix, if fixed_prefix =3D True, the file-pref= ix will use the > value of prefix, or the value is dpdk_pid_timestamp. > + param =3D self.dut.create_eal_parameters(cores=3D'1S/4C/= 1T', > ports=3D[0, 1], port_options=3D{0: "proto_xtr=3Dvlan"}, fixed_prefix=3DTr= ue, > prefix=3D'user_defined') > + output: > + param =3D '-l 1,2,3,4 -n 4 -w 0000:1a:00.0,proto_xtr= =3Dvlan -w > 0000:1a:00.1 --file-prefix=3Duser_defined' > + > + 5. usege for vdevs. > + param_vdev =3D self.dut.create_eal_parameters(cores=3D'1= S/4C/1T', > no_pci=3DTrue, vdevs=3D[r"net_virtio_user0,mac=3D%s,path=3D./vhost- > net,queues=3D1"]) > + output: > + param =3D '-l 1,2,3,4 -n 4 --file- > prefix=3Ddpdk_399214_20191105155446 --no-pci --vdev > net_virtio_user0,mac=3D%s,path=3D./vhost-net,queues=3D1' > + > + > +create_eal_parameters function supports the following parameters: > + > +.. table:: > + > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | parameter | description = | Default Value > | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | fixed_prefix | Indicate use default prefix or user de= fine prefix | > False | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | socket | socket of system = | -1 | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | cores | set core list = | 1S/2C/1T | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | ports | PCI list or PCI ID list = | | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | port_options | other port options = | | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | b_ports | PCI device in black list = | | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | no_pci | Disable PCI bug = | | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | prefix | Use a different shared data file prefi= x for a | > | > + | | DPDK process = | | > + +---------------------------+---------------------------------------= ------------+------------- > -----+ > + | vdevs | Add a virtual device = | | > + > + +---------------------------+----------------------------------------- > + ----------+------------------+ > + > + > +start_testpmd > +---------------------------- > + > +The method use to start testpmd application. > + > +.. code-block:: console > + > + define: start_testpmd(self, cores=3D'default', param=3D'', eal_param= =3D'', > + socket=3D0, fixed_prefix=3DFalse, **config) > + > + usage and example: > + no user parameters: > + out =3D self.pmdout.start_testpmd() > + user parameters: > + 1. Those two parameters param and eal_param are used for cur= rent > test suites. > + for example: > + In current test suite TestSuite_runtime_vf_queue_num= ber, the > eal parameters are wrote as a line string as below. > + eal_param =3D '-w %s,queue-num-per-vf=3D%d --fil= e-prefix=3Dtest1 -- > socket-mem 1024,1024' % (self.pf_pci, invalid_qn) > + then you can call start_testpmd like this. > + out =3D > + self.pmdout.start_testpmd(self.pmdout.default_cores, param=3D'', > + eal_param=3Deal_param) > + > + Another usage in current test suite like below: > + self.pmdout.start_testpmd("Default", > + "--portmask=3D%s " %(self.portMask) + " --enable-rx-cksum " + > + "--port-topology=3Dloop", socket=3Dself.ports_socket) > + > + 2. If you will write a new test suite and need to call start= _testpmd > method, > + The usage of other parameters such as cores, socket, fix= ed_prefix > and **config are the same as create_eal_parameters. > \ No newline at end of file > -- > 1.8.3.1