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 8C31DA04F0; Fri, 27 Dec 2019 07:05:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CB9F1BFEE; Fri, 27 Dec 2019 07:05:19 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4D7231BFE9 for ; Fri, 27 Dec 2019 07:05:16 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2019 22:05:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,362,1571727600"; d="scan'208";a="223704640" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 26 Dec 2019 22:05:05 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Dec 2019 22:05:04 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.195]) with mapi id 14.03.0439.000; Fri, 27 Dec 2019 14:05:02 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] test_plans: add ntb test cases Thread-Index: AQHVtzJHRux3UKgcTEKQmR+LwDQBTqfNiLJg Date: Fri, 27 Dec 2019 06:05:02 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8EC3F@SHSMSX101.ccr.corp.intel.com> References: <20191220053244.79055-1-yinan.wang@intel.com> In-Reply-To: <20191220053244.79055-1-yinan.wang@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-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] test_plans: add ntb test cases 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 Yinan > Sent: Friday, December 20, 2019 1:33 PM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] test_plans: add ntb test cases >=20 > From: Wang Yinan >=20 > Add ntb cases in ntb_test_plan.rst >=20 > Signed-off-by: Wang Yinan > --- > test_plans/ntb_test_plan.rst | 257 > +++++++++++++++++++++++++++++++++++ > 1 file changed, 257 insertions(+) > create mode 100644 test_plans/ntb_test_plan.rst >=20 > diff --git a/test_plans/ntb_test_plan.rst b/test_plans/ntb_test_plan.rst = new > file mode 100644 index 0000000..5303174 > --- /dev/null > +++ b/test_plans/ntb_test_plan.rst > @@ -0,0 +1,257 @@ > +.. Copyright (c) <2019>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +NTB test plan > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The ntb sample application shows how to use ntb rawdev driver. > +This sample provides interactive mode to do packet based processing > +between two systems. > + > +This sample supports 4 types of packet forwarding mode. > + > +* ``file-trans``: transmit files between two systems. The sample will > + be polling to receive files from the peer and save the file as > + ``ntb_recv_file[N]``, [N] represents the number of received file. > +* ``rxonly``: NTB receives packets but doesn't transmit them. > +* ``txonly``: NTB generates and transmits packets without receiving any. > +* ``iofwd``: iofwd between NTB device and ethdev. > + > +Command-line Options > +-------------------- > + > +The application supports the following command-line options. > + > +* ``--buf-size=3DN`` > + > + Set the data size of the mbufs used to N bytes, where N < 65536. > + The default value is 2048. > + > +* ``--fwd-mode=3Dmode`` > + > + Set the packet forwarding mode as ``file-trans``, ``txonly``, > + ``rxonly`` or ``iofwd``. > + > +* ``--nb-desc=3DN`` > + > + Set number of descriptors of queue as N, namely queue size, where 64 > + <=3D N <=3D 1024. The default value is 1024. > + > +* ``--txfreet=3DN`` > + > + Set the transmit free threshold of TX rings to N, where 0 <=3D N <=3D > + the value of ``--nb-desc``. The default value is 256. > + > +* ``--burst=3DN`` > + > + Set the number of packets per burst to N, where 1 <=3D N <=3D 32. > + The default value is 32. > + > +* ``--qp=3DN`` > + > + Set the number of queues as N, where qp > 0. > + > +Using the application > +---------------------- > + > +The application is console-driven using the cmdline DPDK interface: > + From this interface the available commands and descriptions of what > +they do as as follows: > + > +* ``send [filepath]``: Send file to the peer host. Need to be in > + file-trans forwarding mode first. > +* ``start``: Start transmission. > +* ``stop``: Stop transmission. > +* ``show/clear port stats``: Show/Clear port stats and throughput. > +* ``set fwd file-trans/rxonly/txonly/iofwd``: Set packet forwarding mode= . > +* ``quit``: Exit program. > + > +Test Case1: NTB test with file-trans fwd mode using igb_uio > +=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=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=3D=3D=3D=3D=3D > + > +1. Insmod kernel module and bind Non-Transparent Bridge to igb_uio drive= r > on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko wc_activate=3D1 > + ./usertools/dpdk-devbind.py -b igb_uio ae:00.0 > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd file-trans > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd file-trans > + > +4. Send file from Machine1:: > + > + >send xxx # [xxx] is srouce absolute path + file > + > +5. Check file can be received on Machine2 fixed path. > + > +Test Case2: NTB test with file-trans fwd mode using vfio-pci > +=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=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=3D=3D=3D=3D=3D=3D > + > +1. Insmod kernel module and bind Non-Transparent Bridge to vfio-pci driv= er > on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko > + insmod vfio-pci > + lspci -vv -s ae:00.0 > + echo "base=3D0x39bfa0000000 size=3D0x400000 type=3Dwrite-combining" = >> > /proc/mtrr > + echo "base=3D0x39bfa0000000 size=3D0x4000000 type=3Dwrite-combining"= >> > /proc/mtrr > + ./usertools/dpdk-devbind.py -b vfio-pci ae:00.0 > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd file-trans > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd file-trans > + > +4. Send file from Machine1:: > + > + >send xxx # [xxx] is srouce absolute path + file > + > +5. Check file can be received on Machine2 fixed path. > + > +Test Case3: NTB test with rxonly/txonly fwd mode using igb_uio > +=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=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=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Insmod kernel module and bind Non-Transparent Bridge to igb_uio drive= r > on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko wc_activate=3D1 > + ./usertools/dpdk-devbind.py -b igb_uio ae:00.0 > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd rxonly > + >start > + >show port stats > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd txonly > + >start > + >show port stats > + > +4. Check throughput with log info on two machines. > + > +Test Case4: NTB test with rxonly/txonly fwd mode using vfio-pci > +=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=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=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Insmod kernel module and bind Non-Transparent Bridge to vfio-pci driv= er > on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko > + insmod vfio-pci > + lspci -vv -s ae:00.0 > + echo "base=3D0x39bfa0000000 size=3D0x400000 type=3Dwrite-combining" = >> > /proc/mtrr > + echo "base=3D0x39bfa0000000 size=3D0x4000000 type=3Dwrite-combining"= >> > /proc/mtrr > + ./usertools/dpdk-devbind.py -b vfio-pci ae:00.0 > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd rxonly > + >start > + >show port stats > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --buf-size=3D65407 > + >set fwd txonly > + >start > + >show port stats > + > +4. Check throughput with log info on two machines. > + > +Test Case5: NTB test with io fwd mode using igb_uio > +=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > +Test flow: TG <-> NIC1 <-> NTB1 <-> NTB2 <-> NIC2 <-> TG > + > +1. Insmod kernel module and bind Non-Transparent Bridge and NIC to > igb_uio driver on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko wc_activate=3D1 > + ./usertools/dpdk-devbind.py -b igb_uio xx:xx.x # xx:xx.x is NTB > + ./usertools/dpdk-devbind.py -b igb_uio xx:xx.x # xx:xx.x is NIC > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --fwd-mode=3Diofwd = -- > burst=3D32 > + >set fwd iofwd > + >start > + >show port stats > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --fwd-mode=3Diofwd = -- > burst=3D32 > + >set fwd iofwd > + >start > + >show port stats > + > +4. Check throughput with log info on two machines. > + > +Test Case6: NTB test with io fwd mode using vfio-pci > +=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=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 > +Test flow: TG <-> NIC1 <-> NTB1 <-> NTB2 <-> NIC2 <-> TG > + > +1. Insmod kernel module and bind Non-Transparent Bridge and NIC to vfio- > pci driver on two host machines separately:: > + > + insmod x86_64-native-linuxapp-gcc/kmod/vfio-pci.ko > + insmod vfio-pci > + lspci -vv -s ae:00.0 > + echo "base=3D0x39bfa0000000 size=3D0x400000 type=3Dwrite-combining" = >> > /proc/mtrr > + echo "base=3D0x39bfa0000000 size=3D0x4000000 type=3Dwrite-combining"= >> > /proc/mtrr > + ./usertools/dpdk-devbind.py -b vfio-pci xx:xx.x # xx:xx.x is NTB > + ./usertools/dpdk-devbind.py -b vfio-pci xx:xx.x # xx:xx.x is NIC > + > +2. Launch ntb_fwd sample on Machine1:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --fwd-mode=3Diofwd = -- > burst=3D32 > + >set fwd iofwd > + >start > + >show port stats > + > +3. Launch ntb_fwd sample on Machine2:: > + > + ./examples/ntb/build/ntb_fwd -l 28-32 -n 6 -- -i --fwd-mode=3Diofwd = -- > burst=3D32 > + >set fwd iofwd > + >start > + >show port stats > + > +4. Check throughput with log info on two machines. > \ No newline at end of file > -- > 2.17.1