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 9D822A00C4; Mon, 18 Apr 2022 12:28:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 920AF4069D; Mon, 18 Apr 2022 12:28:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 5125C4014F for ; Mon, 18 Apr 2022 12:28:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650277737; x=1681813737; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pKYPsNA8z2d1d7oM+Qt4/7yY6vuoRKSj7lNCpi2sFuE=; b=milqTXFZo8OghQdxmJtd6NQqbT9xhUnQH9a7M0ywdUMBq5R0oLkUvb3t eDP8EvZdG36gESTKRt7gh0+82GNxVfcXfiHb491LXnlDpZ4OcmOP1lDtB 1T0NyFH2M5sB/3+vjQaufZ4DehLz26RHcVhWSIyeQahE5DV8ggA2Jqehs C4cox+TJARbPZxHYItsOOk1tosE+ClTTNku6C2LYatatz6Mn6HGqQS3Ec MKXtXWXMvywK7ljFN3Q25vzy8RTU70TSyWuJfQ4ruQkiUMqfT3WLoiPR+ F+BXjTYQm830GsuO6HH+hmzPCjprVZQiBpBev1dlTHjppUES9WmidPxMv A==; X-IronPort-AV: E=McAfee;i="6400,9594,10320"; a="262352301" X-IronPort-AV: E=Sophos;i="5.90,269,1643702400"; d="scan'208";a="262352301" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 03:28:56 -0700 X-IronPort-AV: E=Sophos;i="5.90,269,1643702400"; d="scan'208";a="701774271" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 03:28:54 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/pvp_share_lib_test_plan: modify testplan with new format Date: Mon, 18 Apr 2022 18:28:47 +0800 Message-Id: <20220418102847.512586-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 testplan with new format. Signed-off-by: Wei Ling --- test_plans/pvp_share_lib_test_plan.rst | 89 +++++++++++++++++++++----- 1 file changed, 73 insertions(+), 16 deletions(-) diff --git a/test_plans/pvp_share_lib_test_plan.rst b/test_plans/pvp_share_lib_test_plan.rst index c5a3c9b8..53d85c03 100644 --- a/test_plans/pvp_share_lib_test_plan.rst +++ b/test_plans/pvp_share_lib_test_plan.rst @@ -37,46 +37,103 @@ Vhost/virtio-user pvp share lib test plan Description =========== -The feature need compile dpdk as shared libraries, then application should use option ``-d`` to load the dynamic pmd that are built as shared libraries. +The feature need compile dpdk as shared libraries, then application should use option ``-d`` +to load the dynamic pmd that are built as shared libraries. + +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 +============= + +Topology +-------- +Test flow: TG-->Vhost-user-->Virtio-user-->Vhost-user-->TG + +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 + # ./usertools/dpdk-devbind.py -b vfio-pci + + For example, bind 1 NIC port to vfio-pci:: + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:04.0 Test Case1: Vhost/virtio-user pvp share lib test with niantic -============================================================= +------------------------------------------------------------- +This case use testpmd with ``-d librte_net_ixgbe.so`` option to load the dynamic pmd when launch vhost-user to test with niantic. 1. Enable the shared lib in DPDK configure file:: - CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dc_args='-DRTE_BUILD_SHARED_LIB=1' --default-library=shared x86_64-native-linuxapp-gcc + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dc_args='-DRTE_BUILD_SHARED_LIB=1' --default-library=shared x86_64-native-linuxapp-gcc 2. Recompile dpdk code:: - ninja -C x86_64-native-linuxapp-gcc -j 55 + # ninja -C x86_64-native-linuxapp-gcc -j 55 3. Export shared lib files into host environment:: - export LD_LIBRARY_PATH=/root/dpdk/x86_64-native-linuxapp-gcc/drivers:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=/root/dpdk/x86_64-native-linuxapp-gcc/drivers:$LD_LIBRARY_PATH 4. Bind niantic port with vfio-pci, use option ``-d`` to load the dynamic pmd when launch vhost:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x03 -n 4 -d librte_net_vhost.so.21.0 -d librte_net_i40e.so.21.0 -d librte_mempool_ring.so.21.0 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x03 -n 4 -d librte_net_vhost.so.21.0 -d librte_net_ixgbe.so.21.0 -d librte_mempool_ring.so.21.0 \ + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i + testpmd> start 5. Launch virtio-user:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x0c -n 4 -d librte_net_virtio.so.21.0 -d librte_mempool_ring.so.21.0 \ - --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net -- -i - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x0c -n 4 -d librte_net_virtio.so.21.0 -d librte_mempool_ring.so.21.0 \ + --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net -- -i + testpmd> start 6. Send traffic by packet generator, check the throughput with below command:: - testpmd>show port stats all + testpmd> show port stats all Test Case2: Vhost/virtio-user pvp share lib test with fortville -=============================================================== +--------------------------------------------------------------- +This case use testpmd with ``-d librte_net_i40e.so`` option to load the dynamic pmd when launch vhost-user to test with fortville_eagle|fortville_spirit|fortville_25g. Similar as Test Case1, all steps are similar except step 4: 4. Bind fortville port with vfio-pci, use option ``-d`` to load the dynamic pmd when launch vhost:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x03 -n 4 -d librte_net_vhost.so -d librte_net_i40e.so -d librte_mempool_ring.so \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i - testpmd>start + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x03 -n 4 -d librte_net_vhost.so -d librte_net_i40e.so -d librte_mempool_ring.so \ + --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i + testpmd> start -- 2.25.1