From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30A93A0510; Fri, 15 Apr 2022 11:04:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AD1A40687; Fri, 15 Apr 2022 11:04:36 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 05E2E4067C for ; Fri, 15 Apr 2022 11:04:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650013474; x=1681549474; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qr9+lRl0jP+7V9fgsA6aHTWGITU3H0xX1umVLRsv6tk=; b=VKvfHmWZUj+ekBH+LSMoRSGzDP+eePSHLIcRnJ15/viyM7E1mqgl+znN rfPOFALKR5OZILfVKmnpjWb+7ybVMGffDXZVcBhpNsZxfDLFuZHK0nX0y 8phxyguUjggR6qslikBTZN4g83FS1uRt7erndgK1+EZbMZerhndId1MlV 1/CxNyfifRM57F51CfEulXhYMkX8CYGbmxaqeBHLninP10RCxSF+tsJn0 uvHQmwn39SxCaYV/BynapsGqdzUyb+WhJgYfwQsIaiDl4x+T6kyvT/es8 5hmiofJPCn9ayLPJUs9oXmBh17jsXU43lzYJYixFEnjTXB2glL5yW/7gm w==; X-IronPort-AV: E=McAfee;i="6400,9594,10317"; a="263301277" X-IronPort-AV: E=Sophos;i="5.90,262,1643702400"; d="scan'208";a="263301277" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2022 02:04:32 -0700 X-IronPort-AV: E=Sophos;i="5.90,262,1643702400"; d="scan'208";a="700995252" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2022 02:04:31 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/4] test_plans/pvp_virtio_user_4k_pages_test_plan: modify testplan format Date: Fri, 15 Apr 2022 17:04:27 +0800 Message-Id: <20220415090427.261176-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 Modify test_plans/pvp_virtio_user_4k_pages_test_plan with new format. Signed-off-by: Wei Ling --- .../pvp_virtio_user_4k_pages_test_plan.rst | 108 +++++++++++++----- 1 file changed, 80 insertions(+), 28 deletions(-) diff --git a/test_plans/pvp_virtio_user_4k_pages_test_plan.rst b/test_plans/pvp_virtio_user_4k_pages_test_plan.rst index a34a4422..6fed10b1 100644 --- a/test_plans/pvp_virtio_user_4k_pages_test_plan.rst +++ b/test_plans/pvp_virtio_user_4k_pages_test_plan.rst @@ -34,60 +34,112 @@ vhost/virtio-user pvp with 4K-pages test plan ============================================= -Dpdk 19.02 add support for using virtio-user without hugepages. The --no-huge mode was augmented to use memfd-backed memory (on systems that support memfd), to allow using virtio-user-based NICs without hugepages. +Dpdk 19.02 add support for using virtio-user without hugepages. +The --no-huge mode was augmented to use memfd-backed memory (on systems that support memfd), +to allow using virtio-user-based NICs without hugepages. + +For more about dpdk-testpmd sample, please refer to the DPDK docments: +https://doc.dpdk.org/guides/testpmd_app_ug/run_app.html + +For virtio-user vdev parameter, you can refer to the DPDK docments: +https://doc.dpdk.org/guides/nics/virtio.html#virtio-paths-selection-and-usage. + Prerequisites -------------- -Turn off transparent hugepage in grub by adding GRUB_CMDLINE_LINUX="transparent_hugepage=never" +============= + +Topology +-------- +Test flow: Vhost-user-->Virtio-user + +Hardware +-------- +Supportted NICs: ALL + +Software +-------- +Trex:http://trex-tgn.cisco.com/trex/release/v2.26.tar.gz + +General set up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library= + # ninja -C -j 110 + +2. Get the PCI device ID and DMA device ID of DUT, for example, 0000:18:00.0 is PCI device ID, 0000:00:04.0, 0000:00:04.1 is DMA device ID:: + + # ./usertools/dpdk-devbind.py -s + + Network devices using kernel driver + =================================== + 0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci + + DMA devices using kernel driver + =============================== + 0000:00:04.0 'Sky Lake-E CBDMA Registers 2021' drv=ioatdma unused=vfio-pci + 0000:00:04.1 'Sky Lake-E CBDMA Registers 2021' drv=ioatdma unused=vfio-pci + +Test case +========= + +Common steps +------------ +1. Bind 1 NIC port and CBDMA channels to vfio-pci:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 1 NIC port :: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:af:00.0 Test Case1: Basic test vhost/virtio-user split ring with 4K-pages -================================================================= +----------------------------------------------------------------- +This case uses testpmd to test split ring path with 4K-pages forward packets. -1. Bind one port to vfio-pci, launch vhost:: +1. Bind 1 NIC port to vfio-pci, launch vhost:: - modprobe vfio-pci - ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost \ - --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1' -- -i --no-numa --socket-num=0 - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1' -- -i --no-numa --socket-num=0 + testpmd> start 2. Prepare tmpfs with 4K-pages:: - mkdir /mnt/tmpfs_yinan - mount tmpfs /mnt/tmpfs_yinan -t tmpfs -o size=4G + mkdir /mnt/tmpfs_yinan + mount tmpfs /mnt/tmpfs_yinan -t tmpfs -o size=4G 3. Launch virtio-user with 4K-pages:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ - --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1 -- -i - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=1 -- -i + testpmd> set fwd mac + testpmd> start 4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: - testpmd>show port stats all + testpmd> show port stats all Test Case2: Basic test vhost/virtio-user packed ring with 4K-pages -================================================================== +------------------------------------------------------------------ +This case uses testpmd to test packed ring path with 4K-pages forward packets. 1. Bind one port to vfio-pci, launch vhost:: - modprobe vfio-pci - ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost \ - --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1' -- -i --no-numa --socket-num=0 - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 3-4 -n 4 -m 1024 --no-huge --file-prefix=vhost \ + --vdev 'net_vhost0,iface=/tmp/vhost-net,queues=1' -- -i --no-numa --socket-num=0 + testpmd> start 2. Prepare tmpfs with 4K-pages:: - mkdir /mnt/tmpfs_yinan - mount tmpfs /mnt/tmpfs_yinan -t tmpfs -o size=4G + mkdir /mnt/tmpfs_yinan + mount tmpfs /mnt/tmpfs_yinan -t tmpfs -o size=4G 3. Launch virtio-user with 4K-pages:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ - --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,packed_vq=1,queues=1 -- -i - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-6 -n 4 --no-huge -m 1024 --file-prefix=virtio-user \ + --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,packed_vq=1,queues=1 -- -i + testpmd> set fwd mac + testpmd> start 4. Send packet with packet generator with different packet size,includes [64, 128, 256, 512, 1024, 1518], check the throughput with below command:: - testpmd>show port stats all \ No newline at end of file + testpmd> show port stats all -- 2.25.1