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 DCCABA04B5; Tue, 27 Oct 2020 05:28:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6F3A2BD3; Tue, 27 Oct 2020 05:28:42 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 92F082B9D for ; Tue, 27 Oct 2020 05:28:40 +0100 (CET) IronPort-SDR: /ftAE10g5nMy3qo75CxEp97Tz37iinT4Oz7Qjq369Ni8h8ir0NxvRr7gM8qZ951rDDoGaMLlnH R9AiJsvYPwEg== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="229661869" X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="229661869" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 21:28:38 -0700 IronPort-SDR: L3f9pE6Ody4ia6VB4qwLWYhok21ezIoRiDu2YC120kgP9YCf+DA+Il9CTWyHzzMoF/W1y8+Jy8 qXgl/F98MSsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="535634528" Received: from npg_dpdk_nic_yuanpeng_tester62.sh.intel.com ([10.67.119.113]) by orsmga005.jf.intel.com with ESMTP; 26 Oct 2020 21:28:37 -0700 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Tue, 27 Oct 2020 11:31:30 +0000 Message-Id: <1603798290-133363-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH v1]test_plans: add xstats check on PF and VF 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 show port xstats rx-queue and tx-queue check on PF and VF pmd. Signed-off-by: Peng Yuan diff --git a/test_plans/stats_checks_test_plan.rst b/test_plans/stats_checks_test_plan.rst index b661ecf1..e571cb34 100644 --- a/test_plans/stats_checks_test_plan.rst +++ b/test_plans/stats_checks_test_plan.rst @@ -116,4 +116,167 @@ Send a packet with size 50 bytes (Single example port show) :: ############################################################################ -Verify that the increase in RX-bytes and RX-packets is as-expected, and no other information changed. +Functional Tests of xstats Checks +================================== + +Testing the support of xstatus Checks in Poll Mode Drivers consists of +configuring the gathering the initial status of a port, sending some +packets to that port, and checking the xstatus of the port. +This case will compare the initial xstatus and the new xstatus, +and compare the xstats and stats result. +The fields checked are RX-packets and TX-packets of each queue stats, +RX-packets, RX-bytes, TX-packets and TX-bytes of each port stats, +rx_good_packets and rx_good_bytes of each port xstats, +tx_good_packets and tx_good_bytes of each port xstats, +rx_qx_packets, rx_qx_bytes, tx_qx_packets and tx_qx_bytes of each port xstats. + +Test Case: PF xstatus Checks +============================ +1. Bind two PF ports to pmd driver:: + + ./usertools/dpdk-devbind.py -b vfio-pci device_bus_id0 device_bus_id1 + +2. Launch testpmd and enable rss:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -- -i --rxq=4 --txq=4 + testpmd> port config all rss all + testpmd> set fwd mac + +3. show the xstats before packet forwarding, all the value are 0. +4. Start forward and send 100 packets with random src IP address, + then stop forward. + +5. Check stats and xstats:: + + testpmd> stop + Telling cores to stop... + Waiting for lcores to finish... + + ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 ------- + RX-packets: 29 TX-packets: 29 TX-dropped: 0 + + ------- Forward Stats for RX Port= 0/Queue= 1 -> TX Port= 1/Queue= 1 ------- + RX-packets: 21 TX-packets: 21 TX-dropped: 0 + + ------- Forward Stats for RX Port= 0/Queue= 2 -> TX Port= 1/Queue= 2 ------- + RX-packets: 24 TX-packets: 24 TX-dropped: 0 + + ------- Forward Stats for RX Port= 0/Queue= 3 -> TX Port= 1/Queue= 3 ------- + RX-packets: 26 TX-packets: 26 TX-dropped: 0 + + ---------------------- Forward statistics for port 0 ---------------------- + RX-packets: 100 RX-dropped: 0 RX-total: 100 + TX-packets: 0 TX-dropped: 0 TX-total: 0 + ---------------------------------------------------------------------------- + + ---------------------- Forward statistics for port 1 ---------------------- + RX-packets: 0 RX-dropped: 0 RX-total: 0 + TX-packets: 100 TX-dropped: 0 TX-total: 100 + ---------------------------------------------------------------------------- + + +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ + RX-packets: 100 RX-dropped: 0 RX-total: 100 + TX-packets: 100 TX-dropped: 0 TX-total: 100 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + testpmd> show port stats all + + ######################## NIC statistics for port 0 ######################## + RX-packets: 100 RX-missed: 0 RX-bytes: 6000 + RX-errors: 0 + RX-nombuf: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + + Throughput (since last show) + Rx-pps: 0 Rx-bps: 0 + Tx-pps: 0 Tx-bps: 0 + ############################################################################ + + ######################## NIC statistics for port 1 ######################## + RX-packets: 0 RX-missed: 0 RX-bytes: 0 + RX-errors: 0 + RX-nombuf: 0 + TX-packets: 100 TX-errors: 0 TX-bytes: 6000 + + Throughput (since last show) + Rx-pps: 0 Rx-bps: 0 + Tx-pps: 0 Tx-bps: 0 + ############################################################################ + + testpmd> show port xstats all + ###### NIC extended statistics for port 0 + rx_good_packets: 100 + tx_good_packets: 0 + rx_good_bytes: 6000 + tx_good_bytes: 0 + ...... + rx_q0_packets: 29 + rx_q0_bytes: 1740 + rx_q0_errors: 0 + rx_q1_packets: 21 + rx_q1_bytes: 1260 + rx_q1_errors: 0 + rx_q2_packets: 24 + rx_q2_bytes: 1440 + rx_q2_errors: 0 + rx_q3_packets: 26 + rx_q3_bytes: 1560 + rx_q3_errors: 0 + tx_q0_packets: 0 + tx_q0_bytes: 0 + tx_q1_packets: 0 + tx_q1_bytes: 0 + tx_q2_packets: 0 + tx_q2_bytes: 0 + tx_q3_packets: 0 + tx_q3_bytes: 0 + ...... + ###### NIC extended statistics for port 1 + rx_good_packets: 0 + tx_good_packets: 100 + rx_good_bytes: 0 + tx_good_bytes: 6000 + rx_q0_packets: 0 + rx_q0_bytes: 0 + rx_q0_errors: 0 + rx_q1_packets: 0 + rx_q1_bytes: 0 + rx_q1_errors: 0 + rx_q2_packets: 0 + rx_q2_bytes: 0 + rx_q2_errors: 0 + rx_q3_packets: 0 + rx_q3_bytes: 0 + rx_q3_errors: 0 + tx_q0_packets: 29 + tx_q0_bytes: 1740 + tx_q1_packets: 21 + tx_q1_bytes: 1260 + tx_q2_packets: 24 + tx_q2_bytes: 1440 + tx_q3_packets: 26 + tx_q3_bytes: 1560 + +verify rx_good_packets, RX-packets of port 0 and tx_good_packets, TX-packets of port 1 are both 100. +rx_good_bytes, RX-bytes of port 0 and tx_good_bytes, TX-bytes of port 1 are the same. +RX-packets of each queue of port 0 are equal to rx_qx_packets of each queue of port 0. +TX-packets of each queue of port 1 are equal to tx_qx_packets of each queue of port 1. +The sum of rx_qx_bytes of each queue of port 0 is equal to the rx_good_packets of port 0. +The sum of tx_qx_bytes of each queue of port 1 is equal to the tx_good_packets of port 1. + +Test Case: VF xstats Checks +============================ +1. Create one VF port on a kernel PF, then bind the VF to pmd driver:: + + echo 1 > /sys/bus/pci/devices/device_bus_id/sriov_numvfs + ./usertools/dpdk-devbind.py -s + ./usertools/dpdk-devbind.py -b vfio-pci vf_bus_id + +2. Launch testpmd on the VF and enable RSS:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -- -i --rxq=4 --txq=4 + testpmd> port config all rss all + testpmd> set fwd mac + +3. Then run the same steps of PF xstats Checks, get same result. +note: because one port forwarding packets, so check rx and tx both in port 0. -- 2.17.1