[V1,1/3] test_plans/vf_queue_start_stop: add new vf test_plan

Message ID 20230331060909.43701-1-linglix.chen@intel.com (mailing list archive)
State Superseded
Headers
Series [V1,1/3] test_plans/vf_queue_start_stop: add new vf test_plan |

Commit Message

Lingli Chen March 31, 2023, 6:09 a.m. UTC
  1. add vf_queue_start_stop_test_plan
2. queue_start_stop: optimize test_plans to remove re-compile dpdk test step

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 test_plans/index.rst                         |  1 +
 test_plans/queue_start_stop_test_plan.rst    | 14 ++--
 test_plans/vf_queue_start_stop_test_plan.rst | 74 ++++++++++++++++++++
 3 files changed, 80 insertions(+), 9 deletions(-)
 create mode 100644 test_plans/vf_queue_start_stop_test_plan.rst
  

Patch

diff --git a/test_plans/index.rst b/test_plans/index.rst
index d65bf0e5..d11854fe 100644
--- a/test_plans/index.rst
+++ b/test_plans/index.rst
@@ -191,6 +191,7 @@  The following are the test plans for the DPDK DTS automated test system.
     vf_packet_rxtx_test_plan
     vf_pf_reset_test_plan
     vf_port_start_stop_test_plan
+    vf_queue_start_stop_test_plan
     vf_rss_test_plan
     vf_single_core_perf_test_plan
     vf_smoke_test_plan
diff --git a/test_plans/queue_start_stop_test_plan.rst b/test_plans/queue_start_stop_test_plan.rst
index aecdb095..fe8ecea0 100644
--- a/test_plans/queue_start_stop_test_plan.rst
+++ b/test_plans/queue_start_stop_test_plan.rst
@@ -29,15 +29,12 @@  To run the testpmd application in linuxapp environment with 4 lcores,
 Test Case: queue start/stop
 ---------------------------
 
-This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82599), VF (Intel® Ethernet 700 Series, 82599)
+This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82599)
 
-#. Update testpmd source code. Add the following C code in ./app/test-pmd/fwdmac.c::
-
-      printf("ports %u queue %u received %u packages\n", fs->rx_port, fs->rx_queue, nb_rx);
-
-#. Compile testpmd again, then run testpmd::
+#. Launch testpmd::
     x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -l 1-2 -n 4 -a 0000:af:00.0 -- -i --portmask=0x1 --port-topology=loop
 
+#. Run "set verbose 1" to set verbose
 #. Run "set fwd mac" to set fwd type
 #. Run "start" to start fwd package
 
@@ -55,9 +52,8 @@  This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82
 #. Run "port 0 rxq 0 start" to start rxq 0 in port 0
 #. Run "port 0 txq 0 stop" to stop txq 0 in port 0
 #. Start packet generator to transmit and check tester port not receive packets
-   and in testpmd it not has "ports 0 queue 0 received 1 packages" print
+   and in testpmd it not has "port 0/queue 0: received 1 packets" print
 
 #. Run "port 0 txq 0 start" to start txq 0 in port 0
 #. Start packet generator to transmit and check tester port receive packets
-   and in testpmd it has "ports 0 queue 0 received 1 packages" print
-#. Test it again with VF
+   and in testpmd it has "port 0/queue 0: received 1 packets" print
diff --git a/test_plans/vf_queue_start_stop_test_plan.rst b/test_plans/vf_queue_start_stop_test_plan.rst
new file mode 100644
index 00000000..291d8362
--- /dev/null
+++ b/test_plans/vf_queue_start_stop_test_plan.rst
@@ -0,0 +1,74 @@ 
+.. SPDX-License-Identifier: BSD-3-Clause
+   Copyright(c) 2023 Intel Corporation
+
+===========================
+VF Shutdown API Queue Tests
+===========================
+
+This tests for Shutdown API feature can be run on linux userspace. It
+will check if NIC vf port can be stopped and restarted without exiting the
+application process. Furthermore, it will check if it can reconfigure
+new configurations for a port after the port is stopped, and if it is
+able to restart with those new configurations. It is based on testpmd
+application.
+
+The test is performed by running the testpmd application and using a
+traffic generator. Port/queue configurations can be set interactively,
+and still be set at the command line when launching the application in
+order to be compatible with previous test framework.
+
+Prerequisites
+-------------
+
+Assume port A and B are connected to the remote ports, e.g. packet generator.
+Get the pci device id of DUT, for example::
+
+    ./usertools/dpdk-devbind.py -s
+
+    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' if=enp175s0f0 drv=i40e unused=vfio-pci
+
+Generate 1 VF on PF::
+
+    echo 1 > /sys/bus/pci/devices/0000:af:00.0/sriov_numvfs
+
+Bind VFs to dpdk driver::
+
+    modprobe vfio-pci
+    ./usertools/dpdk-devbind.py -b vfio-pci 0000:af:01.0
+
+To run the testpmd application in linuxapp environment with 4 lcores,
+4 channels with other default parameters in interactive mode::
+
+        $ ./<build_target>/app/dpdk-testpmd -c 0xf -n 4 -- -i
+
+Test Case: vf queue start/stop
+------------------------------
+
+This case support VF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series)
+
+#. Launch testpmd::
+    x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -l 1-2 -n 4 -a 0000:af:01.0 -- -i --portmask=0x1 --port-topology=loop
+
+#. Run "set verbose 1" to set verbose
+#. Run "set fwd mac" to set fwd type
+#. Run "start" to start fwd package
+
+#. Start a packet capture on the tester in the background::
+    tcpdump -i ens7  'ether[12:2] != 0x88cc'  -Q in -w /tmp/tester/sniff_ens7.pcap
+
+#. Start packet generator to transmit packets::
+    sendp([Ether(dst='3c:fd:fe:c1:0f:4c', src='00:00:20:00:00:00')/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXXXXXX')],iface="ens7",count=4,inter=0,verbose=False)
+
+#. Quit tcpdump and check tester port receive packets
+
+#. Run "port 0 rxq 0 stop" to stop rxq 0 in port 0
+#. Start packet generator to transmit and check tester port not receive packets
+
+#. Run "port 0 rxq 0 start" to start rxq 0 in port 0
+#. Run "port 0 txq 0 stop" to stop txq 0 in port 0
+#. Start packet generator to transmit and check tester port not receive packets
+   and in testpmd it not has "port 0/queue 0: received 1 packets" print
+
+#. Run "port 0 txq 0 start" to start txq 0 in port 0
+#. Start packet generator to transmit and check tester port receive packets
+   and in testpmd it has "port 0/queue 0: received 1 packets" print
\ No newline at end of file