[dts] [PATCH V1] tests/userspace_ethtool: fix issue about ethtool
lihong
lihongx.ma at intel.com
Sun Jan 19 21:55:30 CET 2020
1. skip the step of link status check in case test_port_config because of
kernel driver issue
2. according to ICE_ETH_OVERHEAD length to set the pkt size
Signed-off-by: lihong <lihongx.ma at intel.com>
---
tests/TestSuite_userspace_ethtool.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 44135cd..8f87ac2 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -512,7 +512,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
# send and sniff packet
inst = self.tester.tcpdump_sniff_packets(intf)
pkt.send_pkt(self.tester, tx_port=intf, count=4)
- pkts = self.tester.load_tcpdump_sniff_packets(inst)
+ pkts = self.tester.load_tcpdump_sniff_packets(inst, timeout=3)
self.verify(len(pkts) == 4, "Packet not forwarded as expected")
src_mac = pkts.strip_layer_element("layer2", "src", p_index=0)
self.verify(src_mac == valid_mac, "Forwarded packet not match default mac")
@@ -540,7 +540,11 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
time.sleep(10)
# stop port
self.dut.send_expect("stop %d" % index, "EthApp>")
- self.verify(self.ethapp_check_link_status(index, 'Down') == True,
+ # about columbiaville_25g(8086:1593),there have a kernel driver link status issue
+ # about Sageville(8086:1563),driver do not write register to set link-down
+ # so skip this step of verify status
+ if self.nic not in ['columbiaville_25g', 'sageville']:
+ self.verify(self.ethapp_check_link_status(index, 'Down') == True,
'Fail to stop port{}'.format(index))
# check packet not forwarded when port is stop
pkt = Packet(pkt_type='UDP')
@@ -573,6 +577,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
if self.nic in ['powerville', 'springville']:
mtu_threshold = 2026
offset = 4
+ # RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE * 2
+ if self.nic in ["columbiaville_25g"]:
+ offset = 8
for index in range(len(self.ports)):
port = self.ports[index]
# change mtu
@@ -581,6 +588,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
ori_mtu = self.strip_mtu(intf)
self.tester.send_expect("ifconfig %s mtu 9000" % (intf), "# ")
for mtu in mtus:
+ # cvl should stop port before set mtu
+ if self.nic in ["columbiaville_25g"]:
+ self.dut.send_expect("stop %s" % index, "EthApp>")
+
# The mtu threshold is 2022,When it is greater than 2022, the open/stop port is required.
if mtu > mtu_threshold:
if self.nic in ['powerville', 'springville']:
@@ -589,6 +600,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
self.dut.send_expect("open %s" % index, "EthApp>")
self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
+
+ if self.nic in ["columbiaville_25g"]:
+ self.dut.send_expect("open %s" % index, "EthApp>")
+
time.sleep(5)
ori_rx_pkts, _ = self.strip_portstats(index)
pkt_size = mtu + HEADER_SIZE['eth'] + offset
--
2.7.4
More information about the dts
mailing list