* [dts] [DTS][PATCH v3] fix pmd driver rx/tx crc strip issue
@ 2015-12-01 6:32 haifeng
2015-12-02 7:53 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: haifeng @ 2015-12-01 6:32 UTC (permalink / raw)
To: dts
Signed-off-by: haifeng <haifengx.tang@intel.com>
---
tests/TestSuite_shutdown_api.py | 39 +++++++++++----------------------------
1 file changed, 11 insertions(+), 28 deletions(-)
diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 23888f4..241e072 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -82,19 +82,19 @@ class TestShutdownApi(TestCase):
stats = output.get_pmd_stats(portid)
return stats
- def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
+ def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False):
if ports is None:
ports = self.ports
if len(ports) == 1:
- self.send_packet(ports[0], ports[0], pktSize, received, vlan, promisc, crcStrip)
+ self.send_packet(ports[0], ports[0], pktSize, received, vlan, promisc)
return
for i in range(len(ports)):
if i % 2 == 0:
- self.send_packet(ports[i], ports[i + 1], pktSize, received, vlan, promisc, crcStrip)
- self.send_packet(ports[i + 1], ports[i], pktSize, received, vlan, promisc, crcStrip)
+ self.send_packet(ports[i], ports[i + 1], pktSize, received, vlan, promisc)
+ self.send_packet(ports[i + 1], ports[i], pktSize, received, vlan, promisc)
- def send_packet(self, txPort, rxPort, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
+ def send_packet(self, txPort, rxPort, pktSize=68, received=True, vlan=False, promisc=False):
"""
Send packages according to parameters.
"""
@@ -146,21 +146,10 @@ class TestShutdownApi(TestCase):
# RRC will always strip rx/tx vlan
rx_bytes_exp -= 4
tx_bytes_exp -= 4
- elif self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "bartonhills"]:
- # some NIC will always strip tx crc
- tx_bytes_exp -= 4
- if vlan is True:
- # vlan strip default is on
- tx_bytes_exp -= 4
- elif self.nic in ["springville", "powerville"]:
- if vlan is True:
- # vlan strip default is on
- tx_bytes_exp -= 4
else:
# some NIC will always include tx crc
- if crcStrip is True:
- rx_bytes_exp -= 4
+ rx_bytes_exp -= 4
+ tx_bytes_exp -= 4
if vlan is True:
# vlan strip default is on
tx_bytes_exp -= 4
@@ -292,7 +281,7 @@ class TestShutdownApi(TestCase):
self.verify(
"CRC stripping enabled" in out, "CRC stripping not enabled properly")
self.dut.send_expect("start", "testpmd> ")
- self.check_forwarding(crcStrip=True)
+ self.check_forwarding()
def test_change_linkspeed(self):
@@ -376,15 +365,9 @@ class TestShutdownApi(TestCase):
self.dut.send_expect("port config all hw-vlan off", "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ", 100)
self.dut.send_expect("start", "testpmd> ")
- if self.nic in ["bartonhills", "powerville", "springville", "hartwell"]:
- jumbo_size = jumbo_size + 4
- self.check_forwarding(pktSize=jumbo_size - 1)
- self.check_forwarding(pktSize=jumbo_size)
- self.check_forwarding(pktSize=jumbo_size + 1, received=False)
- else:
- self.check_forwarding(pktSize=jumbo_size - 1)
- self.check_forwarding(pktSize=jumbo_size)
- self.check_forwarding(pktSize=jumbo_size + 1, received=False)
+ self.check_forwarding(pktSize=jumbo_size - 1)
+ self.check_forwarding(pktSize=jumbo_size)
+ self.check_forwarding(pktSize=jumbo_size + 1, received=False)
def test_enable_disablerss(self):
"""
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [DTS][PATCH v3] fix pmd driver rx/tx crc strip issue
2015-12-01 6:32 [dts] [DTS][PATCH v3] fix pmd driver rx/tx crc strip issue haifeng
@ 2015-12-02 7:53 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2015-12-02 7:53 UTC (permalink / raw)
To: haifeng, dts
Applied with additional git log. Thanks.
On 12/01/2015 02:32 PM, haifeng wrote:
> Signed-off-by: haifeng <haifengx.tang@intel.com>
> ---
> tests/TestSuite_shutdown_api.py | 39 +++++++++++----------------------------
> 1 file changed, 11 insertions(+), 28 deletions(-)
>
> diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
> index 23888f4..241e072 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -82,19 +82,19 @@ class TestShutdownApi(TestCase):
> stats = output.get_pmd_stats(portid)
> return stats
>
> - def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
> + def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False):
> if ports is None:
> ports = self.ports
> if len(ports) == 1:
> - self.send_packet(ports[0], ports[0], pktSize, received, vlan, promisc, crcStrip)
> + self.send_packet(ports[0], ports[0], pktSize, received, vlan, promisc)
> return
>
> for i in range(len(ports)):
> if i % 2 == 0:
> - self.send_packet(ports[i], ports[i + 1], pktSize, received, vlan, promisc, crcStrip)
> - self.send_packet(ports[i + 1], ports[i], pktSize, received, vlan, promisc, crcStrip)
> + self.send_packet(ports[i], ports[i + 1], pktSize, received, vlan, promisc)
> + self.send_packet(ports[i + 1], ports[i], pktSize, received, vlan, promisc)
>
> - def send_packet(self, txPort, rxPort, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
> + def send_packet(self, txPort, rxPort, pktSize=68, received=True, vlan=False, promisc=False):
> """
> Send packages according to parameters.
> """
> @@ -146,21 +146,10 @@ class TestShutdownApi(TestCase):
> # RRC will always strip rx/tx vlan
> rx_bytes_exp -= 4
> tx_bytes_exp -= 4
> - elif self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single", "bartonhills"]:
> - # some NIC will always strip tx crc
> - tx_bytes_exp -= 4
> - if vlan is True:
> - # vlan strip default is on
> - tx_bytes_exp -= 4
> - elif self.nic in ["springville", "powerville"]:
> - if vlan is True:
> - # vlan strip default is on
> - tx_bytes_exp -= 4
> else:
> # some NIC will always include tx crc
> - if crcStrip is True:
> - rx_bytes_exp -= 4
> + rx_bytes_exp -= 4
> + tx_bytes_exp -= 4
> if vlan is True:
> # vlan strip default is on
> tx_bytes_exp -= 4
> @@ -292,7 +281,7 @@ class TestShutdownApi(TestCase):
> self.verify(
> "CRC stripping enabled" in out, "CRC stripping not enabled properly")
> self.dut.send_expect("start", "testpmd> ")
> - self.check_forwarding(crcStrip=True)
> + self.check_forwarding()
>
>
> def test_change_linkspeed(self):
> @@ -376,15 +365,9 @@ class TestShutdownApi(TestCase):
> self.dut.send_expect("port config all hw-vlan off", "testpmd> ")
> self.dut.send_expect("port start all", "testpmd> ", 100)
> self.dut.send_expect("start", "testpmd> ")
> - if self.nic in ["bartonhills", "powerville", "springville", "hartwell"]:
> - jumbo_size = jumbo_size + 4
> - self.check_forwarding(pktSize=jumbo_size - 1)
> - self.check_forwarding(pktSize=jumbo_size)
> - self.check_forwarding(pktSize=jumbo_size + 1, received=False)
> - else:
> - self.check_forwarding(pktSize=jumbo_size - 1)
> - self.check_forwarding(pktSize=jumbo_size)
> - self.check_forwarding(pktSize=jumbo_size + 1, received=False)
> + self.check_forwarding(pktSize=jumbo_size - 1)
> + self.check_forwarding(pktSize=jumbo_size)
> + self.check_forwarding(pktSize=jumbo_size + 1, received=False)
>
> def test_enable_disablerss(self):
> """
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-02 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 6:32 [dts] [DTS][PATCH v3] fix pmd driver rx/tx crc strip issue haifeng
2015-12-02 7:53 ` Liu, Yong
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).