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 5C63BA0527; Fri, 27 Nov 2020 04:22:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AB7EBCAA7; Fri, 27 Nov 2020 04:22:04 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D264FCAA1 for ; Fri, 27 Nov 2020 04:22:02 +0100 (CET) IronPort-SDR: GgmySMYq+Nk2vaqZDXetCY3Qvp00KOrVrjxnUnO8nWOkkQ/L4NQvL8AazRYB9AVPOo2LdT7td+ fX2dNqMnB+7A== X-IronPort-AV: E=McAfee;i="6000,8403,9817"; a="151602072" X-IronPort-AV: E=Sophos;i="5.78,373,1599548400"; d="scan'208";a="151602072" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 19:22:00 -0800 IronPort-SDR: VhyIOYiI98topLCPmkbMAjhfkPn0dewhuNBwBzOUMk8yAl8nsrJWZvAM+kqlvUxwrrM8MnotRb tsyhfudd014g== X-IronPort-AV: E=Sophos;i="5.78,373,1599548400"; d="scan'208";a="479547418" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 19:21:59 -0800 From: Zhimin Huang To: dts@dpdk.org Cc: qi.fu@intel.com, Zhimin Huang Date: Fri, 27 Nov 2020 11:14:27 +0800 Message-Id: <1606446868-1725-3-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1606446868-1725-1-git-send-email-zhiminx.huang@intel.com> References: <1606446868-1725-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 2/3] tests/flexible_common:add flexible rxid 22 common 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" *.add rxid 22 case flexible common. Signed-off-by: Zhimin Huang --- tests/flexible_common.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/flexible_common.py b/tests/flexible_common.py index fa3c64d..9df62ca 100644 --- a/tests/flexible_common.py +++ b/tests/flexible_common.py @@ -32,6 +32,7 @@ import time from packet import Packet from pmd_output import PmdOutput +import re class FlexibleRxdBase(object): @@ -159,6 +160,21 @@ class FlexibleRxdBase(object): expected_strs self.verify(all([e in out for e in _expected_strs]), msg) + def replace_pkg(self, pkg='comms'): + ice_pkg_path = ''.join([self.ddp_dir, "ice.pkg"]) + if pkg == 'os_default': + self.dut.send_expect("cp {} {}".format(self.os_default_pkg, ice_pkg_path), "# ") + if pkg == 'comms': + self.dut.send_expect("cp {} {}".format(self.comms_pkg, ice_pkg_path), "# ") + self.dut.send_expect("echo {0} > /sys/bus/pci/devices/{0}/driver/unbind".format(self.pci), "# ", 60) + self.dut.send_expect("echo {} > /sys/bus/pci/drivers/ice/bind".format(self.pci), "# ", 60) + self.dut.send_expect("./usertools/dpdk-devbind.py --force --bind=vfio-pci {}".format(self.pci), "# ", 60) + dmesg_out = self.dut.send_expect('dmesg | grep Package | tail -1', '#') + package_version = re.search('version (.*)', dmesg_out).group(1) + self.logger.info("package version:{}".format(package_version)) + self.verify(package_version in self.os_default_pkg if pkg == 'os_default' else self.comms_pkg, + 'replace package failed') + def check_single_VLAN_fields_in_RXD_8021Q(self): """ Check single VLAN fields in RXD (802.1Q) @@ -481,3 +497,11 @@ class FlexibleRxdBase(object): ['Ether(src="{src_mac}", dst="{dst_mac}",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()', 'ip_offset=42']] self.__verify_common(pkts_list) + + def check_effect_replace_pkg_RXID_22_to_RXID_16(self): + self.logger.info("replace ice-1.3.7.0.pkg with RXID 16") + self.replace_pkg('os_default') + out = self.__pmdout.start_testpmd(cores="1S/4C/1T", param='--rxq=64 --txq=64', eal_param=f"-w {self.__pci}") + self.verify("Fail to start port 0" in out, "RXID #16 not support start testpmd") + self.__pmdout.execute_cmd("quit", "# ") + self.replace_pkg('comms') -- 1.8.3.1