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 3837CA3160 for ; Sat, 12 Oct 2019 11:52:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29DC81E9FA; Sat, 12 Oct 2019 11:52:19 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1B7C31E9C5 for ; Sat, 12 Oct 2019 11:52:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2019 02:52:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,287,1566889200"; d="scan'208";a="224586072" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 12 Oct 2019 02:52:14 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Sat, 12 Oct 2019 17:57:20 +0800 Message-Id: <1570874241-92780-2-git-send-email-haiyangx.zhao@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1570874241-92780-1-git-send-email-haiyangx.zhao@intel.com> References: <1570874241-92780-1-git-send-email-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 2/3] test_plans/runtime_vf_queue_number_maxinum: update test plan 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" *.add description of related noun. *.split a new test case from the old case. *.modified the old case, and add more description. Signed-off-by: Haiyang Zhao --- .../runtime_vf_queue_number_maxinum_test_plan.rst | 103 ++++++++++++++------- 1 file changed, 68 insertions(+), 35 deletions(-) diff --git a/test_plans/runtime_vf_queue_number_maxinum_test_plan.rst b/test_plans/runtime_vf_queue_number_maxinum_test_plan.rst index 212cff3..1e287e4 100644 --- a/test_plans/runtime_vf_queue_number_maxinum_test_plan.rst +++ b/test_plans/runtime_vf_queue_number_maxinum_test_plan.rst @@ -43,6 +43,34 @@ Feature Description see runtime_vf_queue_number_test_plan.rst +- Hardware maximum queues + The datasheet xl710-10-40-controller-datasheet2017.pdf described in page 10: + "The 710 series supports up to 1536 LQPs that can be assigned to PFs or VFs as needed". + + For four ports Fortville NIC, each port has 384 queues, + the total queues number is 384 * 4 = 1536. + For two ports Fortville NIC, each port has 768 queues, + the total queues number is 768 * 2 = 1536. + +- Queues PF used + According to the i40e driver source code, it will alloc 1 queue for FDIR function, + and alloc 64 queues for PF(each PF support up to 64 queues) at the initialization period. + So PF will use 64 + 1 = 65 queues. + +- Reserved queues per VF + The firmware will reserve 4 queues for each vf as default, when requested queues exceed 4, + it need to realloc queues in the left queues, the reserved queues generally can't be reused. + +- Max Reserved queues per VF + The reserved queues can be modified by testpmd parameter "queue-num-per-vf". + VF queue number must be power of 2 and equal or less than 16. + + Four ports NIC can create 32 vfs per PF, max reserved queues per VF = (384 - 65) / 32 = 9.96875, + so max value can been set is queue-num-per-vf=8. + Two ports NIC can create 64 vfs per PF, max reserved queues per VF = (768- 65) / 64 = 10.984375, + so max value can been set is queue-num-per-vf=8. + + Prerequisites ============= @@ -58,8 +86,8 @@ Prerequisites 3. Scenario: DPDK PF + DPDK VF -Test case 1: set VF max queue number with max VFs on one PF port -================================================================ +Set up scenario +=============== 1. Set up max VFs from one PF with DPDK driver Create 32 vfs on four ports fortville NIC:: @@ -74,60 +102,65 @@ Test case 1: set VF max queue number with max VFs on one PF port ./usertools/dpdk-devbind.py -b vfio-pci 05:02.0 05:05.7 -2. Set VF max queue number to 16:: - - ./testpmd -c f -n 4 -w 05:00.0,queue-num-per-vf=16 \ - --file-prefix=test1 --socket-mem 1024,1024 -- -i - PF port failed to started with "i40e_pf_parameter_init(): - Failed to allocate 577 queues, which exceeds the hardware maximum 384" - If create 64 vfs, the maximum is 768. -3. Set VF max queue number to 8:: +Test case 1: VF consume max queue number on one PF port +================================================================ +1. Start the PF testpmd:: - ./testpmd -c f -n 4 -w 05:00.0,queue-num-per-vf=8 \ - --file-prefix=test1 --socket-mem 1024,1024 -- -i + ./testpmd -c f -n 4 -w 05:00.0 --file-prefix=test1 \ + --socket-mem 1024,1024 -- -i -4. Start the two VFs testpmd with "--rxq=8 --txq=8" and "--rxq=6 --txq=6":: +2. Start the two testpmd to consume maximum queues:: + Set '--rxq=16 --txq=16' for the first testpmd, + So four ports NIC can start (384 - 65 - 32 * 4)/16 = int(11.9375) = 11 VFs on one PF, + the left queues are 384 - 65 - 32 * 4 - 11 * 16 = 15. + two ports NIC can start (768 - 65 - 64 * 4)/16 = int(27.9375) = 27 VFS on one PF, + the left queues are 768 - 65 - 64 * 4 - 27 * 16 = 15. + The driver will alloc queues as power of 2, and queue must be equal or less than 16, + so the second VF testpmd can only start '--rxq=8 --txq=8':: - ./testpmd -c 0xf0 -n 4 -w 05:02.0 --file-prefix=test2 \ - --socket-mem 1024,1024 -- -i --rxq=8 --txq=8 + ./testpmd -c 0xf0 -n 4 -w 05:02.0 -w 05:02.1 -w 05:02.2 -w... --file-prefix=test2 \ + --socket-mem 1024,1024 -- -i --rxq=16 --txq=16 ./testpmd -c 0xf00 -n 4 -w 05:05.7 --file-prefix=test3 \ - --socket-mem 1024,1024 -- -i --rxq=6 --txq=6 + --socket-mem 1024,1024 -- -i --rxq=8 --txq=8 - Check the Max possible RX queues and TX queues of the two VFs are both 8:: + Check the Max possible RX queues and TX queues of the two VFs are both 16:: testpmd> show port info all - Max possible RX queues: 8 - Max possible TX queues: 8 + Max possible RX queues: 16 + Max possible TX queues: 16 Start forwarding, you can see the actual queue number VF0:: testpmd> start - RX queues=8 - RX desc=128 - RX free threshold=32 - TX queues=8 - TX desc=512 - TX free threshold=32 + RX queues=16 - RX desc=128 - RX free threshold=32 + TX queues=16 - TX desc=512 - TX free threshold=32 VF1:: testpmd> start - RX queues=6 - RX desc=128 - RX free threshold=32 - TX queues=6 - TX desc=512 - TX free threshold=32 + RX queues=8 - RX desc=128 - RX free threshold=32 + TX queues=8 - TX desc=512 - TX free threshold=32 - Modify the queue number of VF1:: +3. Send 256 packets to VF0 and VF1, make sure packets can be distributed + to all the queues. - testpmd> stop - testpmd> port stop all - testpmd> port config all rxq 8 - testpmd> port config all txq 7 - testpmd> port start all +Test case 2: set max queue number per vf on one pf port +================================================================ +1. Start the PF testpmd with VF max queue number 16:: + As the feature description describe, the max value of queue-num-per-vf is 8 + for Both two and four ports Fortville NIC:: - Start forwarding, you can see the VF1 actual queue number is 8 and 7:: + ./testpmd -c f -n 4 -w 05:00.0,queue-num-per-vf=16 --file-prefix=test1 \ + --socket-mem 1024,1024 -- -i - testpmd> start - RX queues=8 - RX desc=128 - RX free threshold=32 - TX queues=7 - TX desc=512 - TX free threshold=32 + PF port failed to started with "i40e_pf_parameter_init(): + Failed to allocate 577 queues, which exceeds the hardware maximum 384" + If create 64 vfs, the maximum is 768. + + + The testpmd should not crash. -5. Send 256 packets to VF0 and VF1, make sure packets can be distributed - to all the queues. -- 1.8.3.1