From: "zhao,meijuan" <meijuanx.zhao@intel.com>
To: dts@dpdk.org
Cc: "zhao,meijuan" <meijuanx.zhao@intel.com>
Subject: [dts] [PATCH V1] tests/vf_kernel: change regex about packet statistic
Date: Tue, 9 Jan 2018 15:16:59 +0800 [thread overview]
Message-ID: <1515482219-13527-1-git-send-email-meijuanx.zhao@intel.com> (raw)
for i40evf: ethtool -S ens5
NIC statistics:
rx_bytes: 0
rx_unicast: 0
rx_multicast: 0
rx_broadcast: 0
rx_discards: 0
rx_unknown_protocol: 0
tx_bytes: 140
tx_unicast: 0
tx_multicast: 2
tx_broadcast: 0
tx_discards: 0
tx_errors: 0
tx-0.packets: 5
tx-0.bytes: 702
tx-1.packets: 10
tx-1.bytes: 788
tx-2.packets: 0
tx-2.bytes: 0
tx-3.packets: 0
tx-3.bytes: 0
rx-0.packets: 0
rx-0.bytes: 0
rx-1.packets: 0
rx-1.bytes: 0
rx-2.packets: 5
rx-2.bytes: 1710
rx-3.packets: 0
rx-3.bytes: 0
for ixgbevf: ethtool -S ens5
NIC statistics:
rx_packets: 6
tx_packets: 15
rx_bytes: 2052
tx_bytes: 1490
tx_busy: 0
tx_restart_queue: 0
tx_timeout_count: 0
multicast: 0
rx_csum_offload_errors: 0
tx_queue_0_packets: 3
tx_queue_0_bytes: 498
tx_queue_0_bp_napi_yield: 0
tx_queue_0_bp_misses: 0
tx_queue_0_bp_cleaned: 0
tx_queue_1_packets: 12
tx_queue_1_bytes: 992
tx_queue_1_bp_napi_yield: 0
tx_queue_1_bp_misses: 0
tx_queue_1_bp_cleaned: 0
rx_queue_0_packets: 6
rx_queue_0_bytes: 2052
rx_queue_0_bp_poll_yield: 0
rx_queue_0_bp_misses: 0
rx_queue_0_bp_cleaned: 0
rx_queue_1_packets: 0
rx_queue_1_bytes: 0
rx_queue_1_bp_poll_yield: 0
rx_queue_1_bp_misses: 0
rx_queue_1_bp_cleaned: 0
for old regex, it match rx_packets: 6, but we want queue rx packets
Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
tests/TestSuite_vf_kernel.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py
index 204467d..ed680e2 100644
--- a/tests/TestSuite_vf_kernel.py
+++ b/tests/TestSuite_vf_kernel.py
@@ -447,7 +447,7 @@ class TestVfKernel(TestCase):
"""
time.sleep(10)
out = self.vm0_dut.send_expect("ethtool -S %s" % self.vm0_intf0, "#")
- rx_packets_before = re.findall("\s*rx.*packets:\s*(\d*)", out)
+ rx_packets_before = re.findall("\s*rx.*\d+.*packets:\s*(\d*)", out)
nb_rx_pkts_before = 0
for i in range(len(rx_packets_before)):
nb_rx_pkts_before += int(rx_packets_before[i])
@@ -457,7 +457,7 @@ class TestVfKernel(TestCase):
vm0_vf0_mac, num=10), "VM reveive packet failed")
out = self.vm0_dut.send_expect("ethtool -S %s" % self.vm0_intf0, "#")
- rx_packets_after = re.findall("\s*rx.*packets:\s*(\d*)", out)
+ rx_packets_after = re.findall("\s*rx.*\d+.*packets:\s*(\d*)", out)
nb_rx_pkts_after = 0
for i in range(len(rx_packets_after)):
nb_rx_pkts_after += int(rx_packets_after[i])
--
1.9.3
next reply other threads:[~2018-01-09 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 7:16 zhao,meijuan [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-05 2:38 [dts] [PATCH V1] tests/vf_kernel:change " zhao,meijuan
2018-01-09 13:21 ` Liu, Yong
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=1515482219-13527-1-git-send-email-meijuanx.zhao@intel.com \
--to=meijuanx.zhao@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).