From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2FC4A0520; Mon, 20 Jan 2020 05:22:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66ED51DBA; Mon, 20 Jan 2020 05:22:44 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B3CD211A4 for ; Mon, 20 Jan 2020 05:22:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2020 20:22:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,340,1574150400"; d="scan'208";a="215125045" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by orsmga007.jf.intel.com with ESMTP; 19 Jan 2020 20:22:40 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Mon, 20 Jan 2020 04:55:30 +0800 Message-Id: <1579467330-29533-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] tests/userspace_ethtool: fix issue about ethtool X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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