test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 2/3] test_plans/runtime_vf_queue_number_maxinum: update test plan
Date: Sat, 12 Oct 2019 17:57:20 +0800	[thread overview]
Message-ID: <1570874241-92780-2-git-send-email-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <1570874241-92780-1-git-send-email-haiyangx.zhao@intel.com>

*.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 <haiyangx.zhao@intel.com>
---
 .../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


  reply	other threads:[~2019-10-12  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12  9:57 [dts] [PATCH V1 1/3] framework/pmd_output:fix a bug in execute_cmd Haiyang Zhao
2019-10-12  9:57 ` Haiyang Zhao [this message]
2019-10-12  9:57 ` [dts] [PATCH V1 3/3] tests: add runtime_vf_queue_number_maxinum Haiyang Zhao
2019-10-21  2:23 ` [dts] [PATCH V1 1/3] framework/pmd_output:fix a bug in execute_cmd Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1570874241-92780-2-git-send-email-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).