From: Xie wei <weix.xie@intel.com>
To: dts@dpdk.org
Cc: Xie wei <weix.xie@intel.com>
Subject: [dts] [PATCH V2 1/2] tests/TestSuite_vf_jumboframe:Rx packet size need add 4 bytes
Date: Mon, 11 Jan 2021 18:26:29 +0800 [thread overview]
Message-ID: <20210111102630.28937-2-weix.xie@intel.com> (raw)
In-Reply-To: <20210111102630.28937-1-weix.xie@intel.com>
DTS framework has switched i40evf to iavf, so align with it.
After testing, found that:
when send a packet which length is 1513 bytes.
for net_iavf driver; the statistic from "show port stats 0" is: RX-bytes: 1513
for net_i40e_vf driver; the statistic from "show port stats 0" is: RX-bytes: 1517
Signed-off-by: Xie wei <weix.xie@intel.com>
---
tests/TestSuite_vf_jumboframe.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index 6da2c5e5..cb77cf31 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -192,6 +192,11 @@ class TestVfJumboFrame(TestCase):
else:
return None
+ def check_vf_driver(self):
+ output = self.vm_testpmd.execute_cmd("show port info 0")
+ vf0_driver = re.findall("Driver\s*name:\s*(\w+)", output)
+ return vf0_driver[0]
+
def jumboframes_send_packet(self, pktsize, received=True):
"""
Send 1 packet to portid
@@ -216,13 +221,19 @@ class TestVfJumboFrame(TestCase):
rx_bytes -= rx_bytes_ori
rx_err -= rx_err_ori
+ vf_driver = self.check_vf_driver()
+
if received:
self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert error")
if self.kdriver == "ixgbe" or self.kdriver == 'ice':
self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4")
else:
- self.verify(rx_bytes == pktsize, "Rx packet size should be equal to packet size")
+ if self.kdriver == "i40e":
+ if vf_driver == "net_iavf":
+ self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4")
+ else:
+ self.verify(rx_bytes == pktsize, "Rx packet size should be equal to packet size")
if self.kdriver == "igb":
self.verify(tx_bytes == pktsize, "Tx packet size should be packet size")
--
2.17.1
next prev parent reply other threads:[~2021-01-11 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 10:26 [dts] [PATCH V2 0/2] switch i40evf to iavf Xie wei
2021-01-11 10:26 ` Xie, WeiX
2021-01-11 10:26 ` Xie wei [this message]
2021-01-11 10:26 ` [dts] [PATCH V2 2/2] tests/TestSuite_veb_switch:vf1 RX-bytes need add 4 bytes Xie wei
2021-01-13 8:24 ` [dts] [PATCH V2 0/2] switch i40evf to iavf Tu, Lijuan
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=20210111102630.28937-2-weix.xie@intel.com \
--to=weix.xie@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).