* [dts] [PATCH V3 0/2] add a case to test pf negative xstats check
@ 2023-04-18 11:48 Jiale Song
2023-04-18 11:48 ` [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case Jiale Song
2023-04-18 11:48 ` [dts] [PATCH V3 2/2] tests/stats_checks: " Jiale Song
0 siblings, 2 replies; 6+ messages in thread
From: Jiale Song @ 2023-04-18 11:48 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add a case to test pf negative xstats check
Jiale Song (2):
test_plans/stats_checks: add a case
tests/stats_checks: add a case
test_plans/stats_checks_test_plan.rst | 139 ++++++++++++++++++++++++++
tests/TestSuite_stats_checks.py | 47 +++++++++
2 files changed, 186 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case
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
2023-04-18 11:48 ` [dts] [PATCH V3 2/2] tests/stats_checks: " Jiale Song
1 sibling, 0 replies; 6+ messages in thread
From: Jiale Song @ 2023-04-18 11:48 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V3 2/2] tests/stats_checks: add a case
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 ` [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case Jiale Song
@ 2023-04-18 11:48 ` Jiale Song
1 sibling, 0 replies; 6+ messages in thread
From: Jiale Song @ 2023-04-18 11:48 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add a case to test pf negative xstats check.
---
tests/TestSuite_stats_checks.py | 47 +++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/tests/TestSuite_stats_checks.py b/tests/TestSuite_stats_checks.py
index 6ab5dd19..a9c6e040 100644
--- a/tests/TestSuite_stats_checks.py
+++ b/tests/TestSuite_stats_checks.py
@@ -28,6 +28,8 @@ prefix_list = [
"tx_good_packets",
"rx_good_bytes",
"tx_good_bytes",
+ "rx_errors",
+ "rx_unicast_packets",
"tx_size_64_packets",
"tx_size_65_to_127_packets",
"tx_size_128_to_255_packets",
@@ -42,6 +44,7 @@ prefix_list = [
"rx_size_512_to_1023_packets",
"rx_size_1024_to_1522_packets",
"rx_size_1523_to_max_packets",
+ "rx_oversize_errors",
"rx_size_1024_to_max_packets", # ixgbe
"tx_size_1024_to_max_packets", # ixgbe
]
@@ -384,6 +387,7 @@ class TestStatsChecks(TestCase):
"""
self.netobj_0.enable_jumbo(framesize=1518)
self.netobj_1.enable_jumbo(framesize=1518)
+ self.pmdout.quit()
self.dut.kill_all()
if self._suite_result.test_case == "test_xstats_check_vf":
self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0])
@@ -442,3 +446,46 @@ class TestStatsChecks(TestCase):
dcf_flag=self.dcf_mode, param="--txq=4 --rxq=4 --max-pkt-len=9000"
)
self.xstats_check(0, 0, if_vf=True)
+
+ def test_negative_xstats_check_pf(self):
+ """
+ Test Case: PF negative xstats check
+ """
+ self.pmdout.start_testpmd("default")
+ self.pmdout.execute_cmd("set fwd mac")
+ self.pmdout.execute_cmd("start")
+ self.netobj_0.enable_jumbo(framesize=5018)
+ self.pmdout.wait_link_status_up("all")
+ self.pmdout.execute_cmd("clear port xstats all")
+ self.pmdout.execute_cmd("show port xstats all")
+ # send jumbo frames
+ self.send_scapy_packet(
+ self.rx_port,
+ f'Ether(dst=dutmac, src="52:00:00:00:00:00")/IP()/Raw(load="X"*4980)',
+ )
+ # get all port xstats
+ all_xstats = self.get_xstats([self.rx_port, self.tx_port])
+ rx_xstats = all_xstats[self.rx_port]
+ # check rx port can not receive packet and rx_errors increased
+ for key, value in rx_xstats.items():
+ if key in ["rx_errors", "rx_oversize_errors"]:
+ self.verify(
+ value == 1,
+ "the expected value of %s is 1, but the actual value is %s!!!"
+ % (key, value),
+ )
+ else:
+ self.verify(
+ value == 0,
+ "the expected value of %s is 0, but the actual value is %s!!!"
+ % (key, value),
+ )
+ # check all statistics are 0 for tx port.
+ tx_xstats = all_xstats[self.tx_port]
+ for key, value in tx_xstats.items():
+ self.verify(
+ value == 0,
+ "the expected value of %s is 0, but the actual value is %s!!!"
+ % (key, value),
+ )
+ self.pmdout.execute_cmd("stop")
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V3 2/2] tests/stats_checks: add a case
2023-04-18 14:00 ` [dts] [PATCH V3 2/2] tests/stats_checks: add a case Jiale Song
2023-04-18 8:48 ` Peng, Yuan
@ 2023-04-26 2:50 ` lijuan.tu
1 sibling, 0 replies; 6+ messages in thread
From: lijuan.tu @ 2023-04-26 2:50 UTC (permalink / raw)
To: dts, Jiale Song; +Cc: Jiale Song
On Tue, 18 Apr 2023 14:00:10 +0000, Jiale Song <songx.jiale@intel.com> wrote:
> add a case to test pf negative xstats check.
>
> Signed-off-by: Jiale Song <songx.jiale@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V3 2/2] tests/stats_checks: add a case
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 ` Jiale Song
2023-04-18 8:48 ` Peng, Yuan
2023-04-26 2:50 ` lijuan.tu
0 siblings, 2 replies; 6+ messages in thread
From: Jiale Song @ 2023-04-18 14:00 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add a case to test pf negative xstats check.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_stats_checks.py | 47 +++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/tests/TestSuite_stats_checks.py b/tests/TestSuite_stats_checks.py
index 6ab5dd19..a9c6e040 100644
--- a/tests/TestSuite_stats_checks.py
+++ b/tests/TestSuite_stats_checks.py
@@ -28,6 +28,8 @@ prefix_list = [
"tx_good_packets",
"rx_good_bytes",
"tx_good_bytes",
+ "rx_errors",
+ "rx_unicast_packets",
"tx_size_64_packets",
"tx_size_65_to_127_packets",
"tx_size_128_to_255_packets",
@@ -42,6 +44,7 @@ prefix_list = [
"rx_size_512_to_1023_packets",
"rx_size_1024_to_1522_packets",
"rx_size_1523_to_max_packets",
+ "rx_oversize_errors",
"rx_size_1024_to_max_packets", # ixgbe
"tx_size_1024_to_max_packets", # ixgbe
]
@@ -384,6 +387,7 @@ class TestStatsChecks(TestCase):
"""
self.netobj_0.enable_jumbo(framesize=1518)
self.netobj_1.enable_jumbo(framesize=1518)
+ self.pmdout.quit()
self.dut.kill_all()
if self._suite_result.test_case == "test_xstats_check_vf":
self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0])
@@ -442,3 +446,46 @@ class TestStatsChecks(TestCase):
dcf_flag=self.dcf_mode, param="--txq=4 --rxq=4 --max-pkt-len=9000"
)
self.xstats_check(0, 0, if_vf=True)
+
+ def test_negative_xstats_check_pf(self):
+ """
+ Test Case: PF negative xstats check
+ """
+ self.pmdout.start_testpmd("default")
+ self.pmdout.execute_cmd("set fwd mac")
+ self.pmdout.execute_cmd("start")
+ self.netobj_0.enable_jumbo(framesize=5018)
+ self.pmdout.wait_link_status_up("all")
+ self.pmdout.execute_cmd("clear port xstats all")
+ self.pmdout.execute_cmd("show port xstats all")
+ # send jumbo frames
+ self.send_scapy_packet(
+ self.rx_port,
+ f'Ether(dst=dutmac, src="52:00:00:00:00:00")/IP()/Raw(load="X"*4980)',
+ )
+ # get all port xstats
+ all_xstats = self.get_xstats([self.rx_port, self.tx_port])
+ rx_xstats = all_xstats[self.rx_port]
+ # check rx port can not receive packet and rx_errors increased
+ for key, value in rx_xstats.items():
+ if key in ["rx_errors", "rx_oversize_errors"]:
+ self.verify(
+ value == 1,
+ "the expected value of %s is 1, but the actual value is %s!!!"
+ % (key, value),
+ )
+ else:
+ self.verify(
+ value == 0,
+ "the expected value of %s is 0, but the actual value is %s!!!"
+ % (key, value),
+ )
+ # check all statistics are 0 for tx port.
+ tx_xstats = all_xstats[self.tx_port]
+ for key, value in tx_xstats.items():
+ self.verify(
+ value == 0,
+ "the expected value of %s is 0, but the actual value is %s!!!"
+ % (key, value),
+ )
+ self.pmdout.execute_cmd("stop")
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [dts] [PATCH V3 2/2] tests/stats_checks: add a case
2023-04-18 14:00 ` [dts] [PATCH V3 2/2] tests/stats_checks: add a case Jiale Song
@ 2023-04-18 8:48 ` Peng, Yuan
2023-04-26 2:50 ` lijuan.tu
1 sibling, 0 replies; 6+ messages in thread
From: Peng, Yuan @ 2023-04-18 8:48 UTC (permalink / raw)
To: Jiale, SongX, dts; +Cc: Jiale, SongX
> -----Original Message-----
> From: Jiale Song <songx.jiale@intel.com>
> Sent: Tuesday, April 18, 2023 10:00 PM
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATCH V3 2/2] tests/stats_checks: add a case
>
> add a case to test pf negative xstats check.
>
> Signed-off-by: Jiale Song <songx.jiale@intel.com>
> ---
Acked-by: Yuan Peng <yuan.peng@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-26 2:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dts] [PATCH V3 1/2] test_plans/stats_checks: add a case Jiale Song
2023-04-18 11:48 ` [dts] [PATCH V3 2/2] tests/stats_checks: " 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 2/2] tests/stats_checks: add a case Jiale Song
2023-04-18 8:48 ` Peng, Yuan
2023-04-26 2:50 ` lijuan.tu
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).