[V1,2/3] test_plans/igc_tx_timestamp: igc enable tx timestamp offloading

Message ID 20230716140054.3222247-3-yaqi.tang@intel.com (mailing list archive)
State New
Headers
Series IGC Enable Tx Timestamp Offloading |

Commit Message

Yaqi Tang July 16, 2023, 2 p.m. UTC
  IGC Enable Tx timestamp offloading by leveraging I225 NIC's "Launch Time".

Signed-off-by: Yaqi Tang <yaqi.tang@intel.com>
---
 test_plans/igc_tx_timestamp_test_plan.rst | 161 ++++++++++++++++++++++
 1 file changed, 161 insertions(+)
 create mode 100644 test_plans/igc_tx_timestamp_test_plan.rst
  

Patch

diff --git a/test_plans/igc_tx_timestamp_test_plan.rst b/test_plans/igc_tx_timestamp_test_plan.rst
new file mode 100644
index 00000000..727e73be
--- /dev/null
+++ b/test_plans/igc_tx_timestamp_test_plan.rst
@@ -0,0 +1,161 @@ 
+.. SPDX-License-Identifier: BSD-3-Clause
+   Copyright(c) 2023 Intel Corporation
+
+==================================
+IGC Enable Tx Timestamp Offloading
+==================================
+
+Description
+===========
+IGC Enable Tx timestamp offloading by leveraging I225 NIC's "Launch Time".
+Measure time interval for Rx timestamp when setting Tx interval between packets in one burst and MAX/MIN error.
+Currently, the minimum time interval for Rx timestamp when setting Tx interval implemented by 2.5G IGC NIC is 300ns.
+
+.. note::
+   testpmd> set txtimes (inter),(intra)
+   inter is the delay between the bursts in the device clock units.
+   intra is the delay between the packets within the burst specified in the device clock units. 
+   Due to the time difference in the software, the inter value should be as large as possible to avoid conflicts, 
+   so the inter value in this plan is set to 30000000.
+
+Prerequisites
+=============
+
+Topology
+--------
+The connection is as below table::
+   +-----------------------------+
+   |     DUT     |     TESTER    |
+   +=============================+
+   |            2.5G             |
+   | IGC-NIC-1  ----  IGC-NIC-2  |
+   +-----------------------------+
+
+Hardware
+--------
+Supported NICs: IGC-I225_LM/IGC-I226_LM
+
+Software
+--------
+dpdk: http://dpdk.org/git/dpdk
+runtime command: https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html
+
+General Set Up
+--------------
+1. Compile DPDK::
+
+    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static <dpdk build dir>
+    # ninja -C <dpdk build dir> -j 110
+
+2. Get the pci device id and interface of DUT and tester.
+   For example, 0000:18:00.0 and 0000:86:00.0 is pci device id,
+   ens785 and ens803 is interface::
+
+    <dpdk dir># ./usertools/dpdk-devbind.py -s
+
+    0000:18:00.0 'Device 125b' if=ens785 drv=igc unused=vfio-pci
+    0000:86:00.0 'Device 125b' if=ens803 drv=igc unused=vfio-pci
+    
+3. Bind the DUT port to dpdk::
+
+    <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>
+
+4. Tester compile test-timestamp app::
+
+   # gcc /root/pkt_rx_tx.c -o test-timestamp -lpthread
+
+5. Tester Launch test-timestamp app::
+
+   # ./test-timestamp -i <Tester port interface> -t
+
+Test Case
+=========
+Test Case 1: Enable tx timestamp, check time interval of rx timestamp
+---------------------------------------------------------------------
+Launch testpmd enable tx timestamp offloading, set different txtimes intra and measure time interval of Rx timestamp between packets in one burst and MAX/MIN error.
+When the set txtimes intra more than 300ns, the time interval for Rx timestamp is the set intra. When it's less than 300ns, the time interval for Rx timestamp is 300ns.
+
+Subcase 1: set txtimes intra 2000ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Test Steps
+~~~~~~~~~~
+1. Launch testpmd enable tx timestamp::
+
+   ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:18:00.0 -- -i --tx-offloads=0x200000
+
+2. Set txtimes intra::
+
+   set fwd txonly
+   set txtimes 30000000,2000
+   start
+
+3. Check the time interval of Rx timestamp is 2000ns and measure MAX/MIN error.
+
+Subcase 2: set txtimes intra 1000ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,1000
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 1000ns and measure MAX/MIN error.
+
+Subcase 3: set txtimes intra 400ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,400
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 400ns and measure MAX/MIN error.
+
+Subcase 4: set txtimes intra 300ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,300
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 300ns and measure MAX/MIN error.
+
+Subcase 5: set txtimes intra 200ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,200
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 300ns and measure MAX/MIN error.
+
+Test Case 2: Without tx timestamp, check time interval of rx timestamp
+----------------------------------------------------------------------
+Launch testpmd without tx timestamp offloading, set different txtimes intra and measure time interval for Rx timestamp between packets in one burst and MAX/MIN error.
+Regardless of the value of txtimes intra, the time interval for Rx timestamp is 300ns.
+
+Subcase 1: set txtimes intra 2000ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Test Steps
+~~~~~~~~~~
+1. Launch testpmd enable tx timestamp::
+
+   ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:18:00.0 -- -i
+
+2. Set txtimes intra::
+
+   set fwd txonly
+   set txtimes 30000000,2000
+   start
+
+3. Check the time interval of Rx timestamp is 300ns and measure MAX/MIN error.
+
+Subcase 2: set txtimes intra 1000ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,1000
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 300ns and measure MAX/MIN error.
+
+Subcase 3: set txtimes intra 400ns
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1. Modify subcase 1 test step 2 to::
+
+    set txtimes 30000000,400
+
+2. Execute subcase 1 test steps to check the time interval of Rx timestamp is 300ns and measure MAX/MIN error.