test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu.
@ 2019-10-17 15:44 Peng Zhihong
  2019-10-21  1:16 ` Ma, LihongX
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Zhihong @ 2019-10-17 15:44 UTC (permalink / raw)
  To: dts; +Cc: Peng Zhihong

Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 116fd3a..bdbbea3 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -546,6 +546,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
         mtus = [1519, 2048]
         mtu_threshold = 2022
         offset = 0
+        ice_eth_overhead = 8
         if self.nic in ['powerville', 'springville']:
             mtu_threshold = 2026
             offset = 4
@@ -561,10 +562,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
                 if mtu > mtu_threshold:
                     if self.nic in ['powerville', 'springville']:
                         mtu = mtu_threshold
-                    self.dut.send_expect("stop %s" % index, "EthApp>")
-                    self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
-                    self.dut.send_expect("open %s" % index, "EthApp>")
+                self.dut.send_expect("stop %s" % index, "EthApp>")
                 self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
+                self.dut.send_expect("open %s" % index, "EthApp>")
+                self.dut.send_expect("portstats %d" % (index), "EthApp>")
                 time.sleep(5)
                 ori_rx_pkts, _ = self.strip_portstats(index)
                 pkt_size = mtu + HEADER_SIZE['eth'] + offset
@@ -572,7 +573,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
                 pkt.send_pkt(self.tester, tx_port=intf, count=4)
                 rx_pkts, _ = self.strip_portstats(index)
                 self.verify(rx_pkts == ori_rx_pkts + 4, "Packet match mtu not forwarded as expected")
-                pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset)
+                if self.nic in ['columbiaville_25g', 'columbiaville_100g']:
+                    pkt = Packet(pkt_type='UDP', pkt_len=mtu + ice_eth_overhead + 1 + HEADER_SIZE['eth'] + offset)
+                else:
+                    pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset)
                 pkt.send_pkt(self.tester, tx_port=intf, count=4)
                 rx_pkts_over, _ = self.strip_portstats(index)
                 self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be forwarded")
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu.
  2019-10-17 15:44 [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu Peng Zhihong
@ 2019-10-21  1:16 ` Ma, LihongX
  0 siblings, 0 replies; 2+ messages in thread
From: Ma, LihongX @ 2019-10-21  1:16 UTC (permalink / raw)
  To: Peng, ZhihongX, dts; +Cc: Peng, ZhihongX

Hi, zhihong
I think you can use the value 'offset' instead of you 'ice_eth_overhead',  reset the offset value like ['powerville', 'springville'], 
Then you does not need to judge nic type when create Packet. And I think you can write the jira bug id in the file.

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Zhihong
Sent: Thursday, October 17, 2019 11:44 PM
To: dts@dpdk.org
Cc: Peng, ZhihongX <zhihongx.peng@intel.com>
Subject: [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu.

Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 116fd3a..bdbbea3 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -546,6 +546,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
         mtus = [1519, 2048]
         mtu_threshold = 2022
         offset = 0
+        ice_eth_overhead = 8
         if self.nic in ['powerville', 'springville']:
             mtu_threshold = 2026
             offset = 4
@@ -561,10 +562,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
                 if mtu > mtu_threshold:
                     if self.nic in ['powerville', 'springville']:
                         mtu = mtu_threshold
-                    self.dut.send_expect("stop %s" % index, "EthApp>")
-                    self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
-                    self.dut.send_expect("open %s" % index, "EthApp>")
+                self.dut.send_expect("stop %s" % index, "EthApp>")
                 self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
+                self.dut.send_expect("open %s" % index, "EthApp>")
+                self.dut.send_expect("portstats %d" % (index), 
+ "EthApp>")
                 time.sleep(5)
                 ori_rx_pkts, _ = self.strip_portstats(index)
                 pkt_size = mtu + HEADER_SIZE['eth'] + offset @@ -572,7 +573,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
                 pkt.send_pkt(self.tester, tx_port=intf, count=4)
                 rx_pkts, _ = self.strip_portstats(index)
                 self.verify(rx_pkts == ori_rx_pkts + 4, "Packet match mtu not forwarded as expected")
-                pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset)
+                if self.nic in ['columbiaville_25g', 'columbiaville_100g']:
+                    pkt = Packet(pkt_type='UDP', pkt_len=mtu + ice_eth_overhead + 1 + HEADER_SIZE['eth'] + offset)
+                else:
+                    pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + 
+ HEADER_SIZE['eth'] + offset)
                 pkt.send_pkt(self.tester, tx_port=intf, count=4)
                 rx_pkts_over, _ = self.strip_portstats(index)
                 self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be forwarded")
--
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-21  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 15:44 [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu Peng Zhihong
2019-10-21  1:16 ` Ma, LihongX

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).