test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jiale Song <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Jiale Song <songx.jiale@intel.com>
Subject: [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case
Date: Tue, 18 Apr 2023 11:48:19 +0000	[thread overview]
Message-ID: <20230418114820.168122-2-songx.jiale@intel.com> (raw)
In-Reply-To: <20230418114820.168122-1-songx.jiale@intel.com>

add a case to test pf negative xstats check.

---
 test_plans/stats_checks_test_plan.rst | 139 ++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

v3:
 -modify launch testpmd parameter.

diff --git a/test_plans/stats_checks_test_plan.rst b/test_plans/stats_checks_test_plan.rst
index 1b7d722f..64799814 100644
--- a/test_plans/stats_checks_test_plan.rst
+++ b/test_plans/stats_checks_test_plan.rst
@@ -281,3 +281,142 @@ Test Case: VF xstats Checks
 
 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.
+
+Test Case: PF negative xstats check
+===================================
+1. Blind the PF to vfio-pci::
+
+    ./usertools/dpdk-devbind.py -b vfio-pci {pf_pci}
+
+2. Launch testpmd with default mtu::
+
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -- -i
+    testpmd> set fwd mac
+    testpmd> start
+    testpmd> clear port xstats all
+
+3. Set the mtu for the port where the data packet is sent::
+
+    ifconfig ens7 mtu 5018
+
+4. Send jumbo frames::
+
+    sendp(Ether(dst="00:00:00:00:01:00", src="52:00:00:00:00:00")/IP()/Raw(load="X"*4980), iface="ens7")
+
+5. Check port 0 xstats::
+
+    Check rx port can not receive packet.
+    Check ``rx_errors`` and ``rx_oversize_errors`` increased, but other statistics are 0 for tx port.
+    testpmd> show port xstats 0
+      ###### NIC extended statistics for port 0
+      rx_good_packets: 0
+      tx_good_packets: 0
+      rx_good_bytes: 0
+      tx_good_bytes: 0
+      rx_missed_errors: 0
+      rx_errors: 1
+      tx_errors: 0
+      rx_mbuf_allocation_errors: 0
+      rx_q0_packets: 0
+      rx_q0_bytes: 0
+      rx_q0_errors: 0
+      tx_q0_packets: 0
+      tx_q0_bytes: 0
+      rx_unicast_packets: 0
+      rx_multicast_packets: 0
+      rx_broadcast_packets: 0
+      rx_dropped_packets: 0
+      rx_unknown_protocol_packets: 0
+      tx_unicast_packets: 0
+      tx_multicast_packets: 0
+      tx_broadcast_packets: 0
+      tx_dropped_packets: 0
+      tx_link_down_dropped: 0
+      rx_crc_errors: 0
+      rx_illegal_byte_errors: 0
+      rx_error_bytes: 0
+      mac_local_errors: 0
+      mac_remote_errors: 0
+      rx_len_errors: 0
+      tx_xon_packets: 0
+      rx_xon_packets: 0
+      tx_xoff_packets: 0
+      rx_xoff_packets: 0
+      rx_size_64_packets: 0
+      rx_size_65_to_127_packets: 0
+      rx_size_128_to_255_packets: 0
+      rx_size_256_to_511_packets: 0
+      rx_size_512_to_1023_packets: 0
+      rx_size_1024_to_1522_packets: 0
+      rx_size_1523_to_max_packets: 0
+      rx_undersized_errors: 0
+      rx_oversize_errors: 1
+      rx_mac_short_pkt_dropped: 0
+      rx_fragmented_errors: 0
+      rx_jabber_errors: 0
+      tx_size_64_packets: 0
+      tx_size_65_to_127_packets: 0
+      tx_size_128_to_255_packets: 0
+      tx_size_256_to_511_packets: 0
+      tx_size_512_to_1023_packets: 0
+      tx_size_1024_to_1522_packets: 0
+      tx_size_1523_to_max_packets: 0
+
+6. Check port 1 xstats::
+
+    Check all statistics are 0 for tx port.
+    testpmd> show port xstats 1
+      ###### NIC extended statistics for port 1
+      rx_good_packets: 0
+      tx_good_packets: 0
+      rx_good_bytes: 0
+      tx_good_bytes: 0
+      rx_missed_errors: 0
+      rx_errors: 0
+      tx_errors: 0
+      rx_mbuf_allocation_errors: 0
+      rx_q0_packets: 0
+      rx_q0_bytes: 0
+      rx_q0_errors: 0
+      tx_q0_packets: 0
+      tx_q0_bytes: 0
+      rx_unicast_packets: 0
+      rx_multicast_packets: 0
+      rx_broadcast_packets: 0
+      rx_dropped_packets: 0
+      rx_unknown_protocol_packets: 0
+      tx_unicast_packets: 0
+      tx_multicast_packets: 0
+      tx_broadcast_packets: 0
+      tx_dropped_packets: 0
+      tx_link_down_dropped: 0
+      rx_crc_errors: 0
+      rx_illegal_byte_errors: 0
+      rx_error_bytes: 0
+      mac_local_errors: 0
+      mac_remote_errors: 0
+      rx_len_errors: 0
+      tx_xon_packets: 0
+      rx_xon_packets: 0
+      tx_xoff_packets: 0
+      rx_xoff_packets: 0
+      rx_size_64_packets: 0
+      rx_size_65_to_127_packets: 0
+      rx_size_128_to_255_packets: 0
+      rx_size_256_to_511_packets: 0
+      rx_size_512_to_1023_packets: 0
+      rx_size_1024_to_1522_packets: 0
+      rx_size_1523_to_max_packets: 0
+      rx_undersized_errors: 0
+      rx_oversize_errors: 0
+      rx_mac_short_pkt_dropped: 0
+      rx_fragmented_errors: 0
+      rx_jabber_errors: 0
+      tx_size_64_packets: 0
+      tx_size_65_to_127_packets: 0
+      tx_size_128_to_255_packets: 0
+      tx_size_256_to_511_packets: 0
+      tx_size_512_to_1023_packets: 0
+      tx_size_1024_to_1522_packets: 0
+      tx_size_1523_to_max_packets: 0
+
-- 
2.25.1


  reply	other threads:[~2023-04-18  3:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 11:48 [dts] [PATCH V3 0/2] add a case to test pf negative xstats check Jiale Song
2023-04-18 11:48 ` Jiale Song [this message]
2023-04-18 11:48 ` [dts] [PATCH V3 2/2] tests/stats_checks: add a case Jiale Song
2023-04-18 14:00 [dts] [PATCH V3 0/2] add a case to test pf negative xstats check Jiale Song
2023-04-18 14:00 ` [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case Jiale Song

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=20230418114820.168122-2-songx.jiale@intel.com \
    --to=songx.jiale@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).