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 CD4DBA09E5; Mon, 7 Dec 2020 10:59:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35D3DC8CC; Mon, 7 Dec 2020 10:59:31 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8FE62F72 for ; Mon, 7 Dec 2020 10:59:29 +0100 (CET) IronPort-SDR: tTb6L4jXgn4Q4sRwO2kxtmZ+D1r3/sVJLHhUij8jCcEH78/GXpzDflNe2cLxwcdh8e3w8IwAAf iVRBrgGDApfw== X-IronPort-AV: E=McAfee;i="6000,8403,9827"; a="173783178" X-IronPort-AV: E=Sophos;i="5.78,399,1599548400"; d="scan'208";a="173783178" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2020 01:59:27 -0800 IronPort-SDR: AtrmEHsVvE6D0lxsG3+8NIv949ChfaeH+WZ8n/Wk8q+7Ep15TR9dw6sj82jg59fCyT+t7a8XFg 9iq3moCFyxVw== X-IronPort-AV: E=Sophos;i="5.78,399,1599548400"; d="scan'208";a="541448206" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2020 01:59:26 -0800 From: Haiyang Zhao To: lijuan.tu@intel.com, dts@dpdk.org Cc: Haiyang Zhao Date: Mon, 7 Dec 2020 17:53:01 +0800 Message-Id: <20201207095302.2133-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201207095302.2133-1-haiyangx.zhao@intel.com> References: <20201207095302.2133-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 1/2] framework/dut: add -a support in create_eal_parameters 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" eal parameter -w is deprecated since dpdk 20.11.0-rc3 and should use -a instead. For dpdk LTS test and avoid modify the -w option in suites, keep the -w support. Signed-off-by: Haiyang Zhao --- framework/dut.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index f3ef8c6..dcf833b 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -116,7 +116,8 @@ class Dut(Crb): """ generate eal parameters character string :param config: - :return: eal_str eg:'-c 0xf -w 0000:88:00.0 -w 0000:88:00.1 --file-prefix=dpdk_1112_20190809143420' + :return: eal_str eg:'-c 0xf -a 0000:88:00.0 -a 0000:88:00.1 --file-prefix=dpdk_1112_20190809143420', + if dpdk version < 20.11-rc4, eal_str eg: '-c 0xf -w 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420', """ default_cores = '1S/2C/1T' blank = ' ' @@ -137,19 +138,20 @@ class Dut(Crb): # deal with ports w_pci_list = [] if 'ports' in config and len(config['ports']) != 0: + allow_option = '-a' if self.dpdk_version > '20.11.0-rc3' or self.dpdk_version == '20.11.0' else '-w' for port in config['ports']: if type(port) == int: if 'port_options' in config and port in list(config['port_options'].keys()): port_option = config['port_options'][port] - w_pci_list.append('-w %s,%s' % (self.ports_info[port]['pci'], port_option)) + w_pci_list.append('%s %s,%s' % (allow_option, self.ports_info[port]['pci'], port_option)) else: - w_pci_list.append('-w %s' % self.ports_info[port]['pci']) + w_pci_list.append('%s %s' % (allow_option, self.ports_info[port]['pci'])) else: if 'port_options' in config and port in list(config['port_options'].keys()): port_option = config['port_options'][port] - w_pci_list.append('-w %s,%s' % (port, port_option)) + w_pci_list.append('%s %s,%s' % (allow_option, port, port_option)) else: - w_pci_list.append('-w %s' % port) + w_pci_list.append('%s %s' % (allow_option, port)) w_pci_str = ' '.join(w_pci_list) # deal with black ports -- 2.17.1