From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0064.outbound.protection.outlook.com [104.47.38.64]) by dpdk.org (Postfix) with ESMTP id D687058F6 for ; Wed, 19 Apr 2017 14:22:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6n92tcz+MeQPHE4Xva46v1GEXOE1dH7j2cgZg73csPM=; b=IbqWu9xEZFQApyOVPYDdfFAiiDg4+pD7n/879+NYdVttllOcTlijcOKYbwWXH2JjV2IcebQRjIzp3vByqQ0oOOY1As8++qMKriNnq3JrEwdTKb0k0xDaaPNlQIWYlr7T16qjoRjb7azsINkZKCs+h/28WurZHEgbvlgLGRyw9Q4= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from angela-H81M-S1.semihalf.local (31.172.191.173) by CO2PR0701MB805.namprd07.prod.outlook.com (10.141.246.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Wed, 19 Apr 2017 12:22:41 +0000 From: Angela Czubak To: dts@dpdk.org Cc: Angela Czubak Date: Wed, 19 Apr 2017 14:21:55 +0200 Message-Id: <1492604540-12114-3-git-send-email-aczubak@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492604540-12114-1-git-send-email-aczubak@caviumnetworks.com> References: <1491501092-14278-1-git-send-email-aczubak@caviumnetworks.com> <1492604540-12114-1-git-send-email-aczubak@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: AM5PR0701CA0064.eurprd07.prod.outlook.com (10.169.145.154) To CO2PR0701MB805.namprd07.prod.outlook.com (10.141.246.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51923502-4dd3-4950-28b1-08d4871ec6e9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CO2PR0701MB805; X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB805; 3:2w+XZ/n9EGoNSEwSQXa+GROZNbGRIS2YnouMVckqrmvV/dk9XlQozx1YdsK0D5RvfcgGGdxoY0dq077EvTeaTm5fXj3Uq2MeBqQJnm+QuVoBCF5QGwsCuTtiB1o+RiuIgESQbEzkDl85IE3c75J7hZZ7a41sAYDbzO6AWphNId6GCW3lYSqmx06HmxRJzrElKO8t79TNDNCT5N5BiEG6V7VIOe3EA1+QwumUNFo5ovwYFp+bK5hz9rcOA6Nogjb9MSw6MWQPsFTOYG1P7uvTVWhDK4CXkC8RxbHHfdf62WPvg72KtPPyPp0VfHveSh+6AKdxuBoe/pvFDnNxzpTW9Q==; 25:ZN91HmOI7JhAZ9YjY3FCpBVL9wgKpYH8MPkJXPHw7N78VDf7kBsvPDDeb0VeWBt1OZ6Wxna88ly/ttCfoogS7QNKPQosusAhLsH2k/bQxqBp9i7O9G4/z5XbHj/oZB02e9HchKQnDaDG/3XABH113HDpkskXSALcz14DsSzxIguBHOa5P9pAwqCdjQPtmzo1LQhr/K2ZZQbNQ2anp5oMmjtT0KhOXzprc33VR9M5RCiaaWBv7aJ/cbt8/Q3K9MJmD7mDj+2K2+HznB95v4gxrhV3XwfcLDhl/0uGRVVmqAfliUxtSL8Klq5Q+wC+nvzfQZRfVPFb81Vq3WnAiGL37zcSSkVK3i7B6sRoitwfkHF0828U1nN1E5n7HwH4w3fLh6y5mLBZ3GEsfd/XiqjCGnvqRyhyOSJzK3x9bB3w6X0LsaNWxT6r+fR5cSQLGAxGpMiJska17uDtj7FHeoLhFA== X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB805; 31:UAKYYIElvDTaQWVB7XP86Y29R42iCr/CPEu+v3I6Qb0wdDUgdMe1twibpTZoDgMtHw8n9cfHXuUF6Uf+TiYHIBkX4091tECc1K1UD4j9688ho7az/597Th7Ym0UKVhZVgkC3ApGO0Vs9jfy40LwY8bhqYuFUWFIGEmiXNnLS5OujQhFX3qBeqSGPCxXJ5dPpETB8lXLREW3SODsfzkrMdtdqGH87bnnA5MRLN7i4hNVY0dnQAYajomZ96NNpBPF9; 20:OcHa3PUClnqFMOcctLtwVzLRosXFQCKXRh/INc3TJxNxWkYJ6m2yvxB8q8IhfPRoBq1W9GqfC/NL8KXRCJB5mUoJTE8qRNkqMiZTIdZmSV32cgnxtJMHfhoAM9PWuFa5ejJACKLiqTgxeru+DQsFtb023buEMHsq0iXMNE6547srttTRvI3ZCpGHkztGaSw2NX+41vVrLQFcUSMv9mUHruJzgfUu1AFIweoPjPSpCbW/HWGqXijze+ZZ4Ci1btMQAU7joKpFd88tcxs95r0vMJacEH3eAU4Xg1HTI72gDkPAI4JCvfPh8aIS96Vv5iijFNPkrLFPc4HeFO1f0Jkt1JpcOJA3bYnx1WNxVTmY0/SDYrYqRNZpTToSRFNZPS8mXkaF017W1XqOVxoWbgC4jjM3s88qJNfZPsDz9yjzKxUu9E1G71NUbcR67zQ2uszmUCOi1tG0zJKqyplDC9+bqPxGA37rIcuc6Z5eBMwkaH/afpXmLz5cQ1dh64ZUKusrg230NTO1WX9G/yZKyuHyPMtaZJjoPc8pwGaEg9XGfBVvjPs8/crAuCXk5zebS0yIVWBbdgA5dkq+nXEaIsiB2jZ1Uz5DeBv6oiQCtIirxoM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(127540120423786); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:CO2PR0701MB805; BCL:0; PCL:0; RULEID:; SRVR:CO2PR0701MB805; X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB805; 4:IhAi/MxFo4moik5fgZPAZLy+Rdi9EFAPND/EtOVyNrcgixiQkpFXHfx2FBNs5JADeZHWmC/wK4xK9deYnJIPKWbthPsh+S4pM/S+GzlBhjaMAqxuiwIRbiEEDCgAGY1P9/wMkQymdFeTe3nFjuU6wb1neXe1L1cAP0TGdS52fWBwv3Bjp5HRg7m2O5BurZQVQYp0j9aM38jF8YBs/hMWqBIyw1DUG2D/iJvG7Dx6K4DvkjMv+KGy4+q4ulN3pU5UGHlDCbGJn9Z6LnzaSoJPO7ZmeK/5sw04R4rgV8ep5e37VATva3FmMuGshFQRO+YzdBjl/LzEyug79uLVjQmZQinCNRJqH1lloFep5WkVm4REvQBridV8kq4ikA1fOp4U52WVjsJO4bBlhHlnjsNvDn2wBBsXVnMin2/yye8lpv8++kc4rmSroZnOiZ/f3+x4BiqWkyy8ZJW22a4reXPtRFAHjpg8NsILiWx2Jsds0AsUqsgbF2HMZPRPFJIp9kbeStC0PrgWGA1jQh0iz7dqHisKVBoYL3C2Tzm4ww8g8+k7Gj6mk/c01RSWrAlpqhlVCg9J4G+aKn4CU/Vs7os1cdCd9dii0vF5Ri1mdkkoPa4um8O0JRDdRu9eSRrXW7I5jxllEJNPwmULTeGy9tLNgsqLg7LupBq4felBeCqiq+lAsb/hGFqzUTBgEFI3aB5eWXF5fzLMccCMTOe7oa8cCrjxQTVRUFG8p9h9xqvh/Bkt9dAXt7orajhciTMLSIQ+ X-Forefront-PRVS: 028256169F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39850400002)(39400400002)(39840400002)(39450400003)(6486002)(5660300001)(38730400002)(6506006)(7736002)(6512007)(66066001)(305945005)(47776003)(53936002)(42882006)(110136004)(6916009)(2906002)(8676002)(4326008)(2950100002)(50226002)(81166006)(25786009)(107886003)(6666003)(36756003)(5003940100001)(42186005)(33646002)(3846002)(575784001)(6116002)(2351001)(2361001)(189998001)(76176999)(50986999)(48376002)(50466002)(357404004); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR0701MB805; H:angela-H81M-S1.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR0701MB805; 23:fVRC8kCvbIIRNrrwabqrcpjlhqBX9ceq42p/9JeN?= =?us-ascii?Q?cRNRxx3p9DI/H1tqO4bwitW3Cr1eFG/mGCGafO+YKX2+5iAXejm3yWj+7zv1?= =?us-ascii?Q?2B1kH7BpOSueFmyvpDjcFI4ZhaZOCIBusuXhbE+G6dWP12u+yiDpSUXRvMCQ?= =?us-ascii?Q?K+HLwroWiyqEMa6MFVLwbm1+VodiadtxL6CivPzOziyNjBFm0GqYVC/1UZNs?= =?us-ascii?Q?+HRFRL2pxndWiGiDQAvPBmzi1upe57tWwnyhDNKx/EdfbOm4t9sQ5iMWMf8N?= =?us-ascii?Q?IqO5u/Q/swjenMSVudfcfDf4Rx11TSa0Z17fL8FqPDn6dYCZocTekPJk8I4/?= =?us-ascii?Q?0TObL5zorjcvSU/Zu/a9BWo3sa256BfY++nxG1nkpQVbQlGYVz9RAcpxK77m?= =?us-ascii?Q?dv0TUstiLYwWKQ7Wu9p8WxIwTYPIQe+hZRy19V7nZsTIo5Be3b/k9zYucjKX?= =?us-ascii?Q?hy0D0tnbdJUG4XyPqrZHDM8hDfztQ6sI47V49RkDFF6SqtJD1uTMDb72IQ/L?= =?us-ascii?Q?YfDFphtq35f71qwDZ01iOpoS/lnWsOzNtyKPJ1MOLsPVBDvY5uV5dUpTK4Lj?= =?us-ascii?Q?yIMyiJeWI4kP07olq0c+ouOMGbkkn5UimKThIqP6OMfiqvExAz/+CJttZP4r?= =?us-ascii?Q?dXriTyXNryCTUbceTKjM1Sqqtrf6j+9KSy3+rTT1QR+0RFqk6HNTvUGyPQjr?= =?us-ascii?Q?HLggFmucj0NL8ObC2Ty+A57bwqERbsxsfp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VGH5JeK+CzUTaEEiBnx7mOZtkLAdItxel+y9Wx4f4JizvaVgGKCy6Y0+0w8YG1lUOuLuwN3G8Q==; 24:74NNzGR/e9eOGtXT7dCirho5XbIpNoym3EoB4Wqzdqm3pxrLIwvvHb9n4g5qCiIZTHi9CS4QVzDx9zQHAnHe0X/5HxoOJRYsa1H0pGFn/Ic= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB805; 7:++wAQjbp2FLAleryz/IDUOYvjTryRLVnjVWdco1P2mcVbYDS1vMKm0zATqdKCvXc0MJjIYAzgZDb2XDf3I9u4g3CRY/U0S1vCjJFy7QjpEEVLSfXZK6xOERfaZldnBwq3CPWsp6dZ6hu5uZsHHkYBkulbSu48se05u73t1vaIKrzwlHv96jHaTTLSML2yxfbl4YFHWMa1HEs6U06tH8XnTfQUKqlDEzkbvisqi5eksiMUwyrFAkD9RMLBBvSbWPfq3VjcCVewDG+fYDX2eDVRKMwY82CVwLurMy1QK2uxrtyhUxD8sahrn7PXJERKTxmS3T6weReW7jbpEZMcgBPeg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2017 12:22:41.4784 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR0701MB805 Subject: [dts] [PATCH v3 02/27] framework dut and project_dpdk: using correct available binding scripts 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: , X-List-Received-Date: Wed, 19 Apr 2017 12:22:44 -0000 Below patch makes scripts look for correct DPDK binding script, checking whether 'usertools' or 'tools' directory is present and which script exist in 'tools' directory ('dpdk-devbind.py' or 'dpdk_nic_bind.py'). Looking for correct pathc is done in get_dpdk_bind_script method. Signed-off-by: Angela Czubak --- framework/dut.py | 19 ++++++++++++++++--- framework/project_dpdk.py | 6 ++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 9cbdaf7..deffa1d 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -356,6 +356,18 @@ class Dut(Crb): else: return False + def get_dpdk_bind_script(self): + op = self.send_command("ls") + if "usertools" in op: + res = 'usertools/dpdk-devbind.py' + else: + op = self.send_command("ls tools") + if "dpdk_nic_bind.py" in op: + res = 'tools/dpdk_nic_bind.py' + else: + res = 'tools/dpdk-devbind.py' + return res + def bind_interfaces_linux(self, driver='igb_uio', nics_to_bind=None): """ Bind the interfaces to the selected driver. nics_to_bind can be None @@ -377,8 +389,8 @@ class Dut(Crb): if current_nic == 0: self.logger.info("Not nic need bind driver: %s" % driver) return - - self.send_expect('usertools/dpdk-devbind.py %s' % binding_list, '# ') + bind_script_path = self.get_dpdk_bind_script() + self.send_expect('%s --force %s' % (bind_script_path, binding_list), '# ') def unbind_interfaces_linux(self, nics_to_bind=None): """ @@ -402,7 +414,8 @@ class Dut(Crb): self.logger.info("Not nic need unbind driver") return - self.send_expect('usertools/dpdk-devbind.py %s' % binding_list, '# ', 30) + bind_script_path = self.get_dpdk_bind_script() + self.send_expect('%s --force %s' % (bind_script_path, binding_list), '# ') def get_ports(self, nic_type='any', perf=None, socket=None): """ diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index a0cb4c2..4dc6a8c 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -314,7 +314,8 @@ class DPDKdut(Dut): binding_list += '%s ' % (port_info['pci']) current_nic += 1 - self.send_expect('usertools/dpdk-devbind.py %s' % binding_list, '# ') + bind_script_path = self.get_dpdk_bind_script() + self.send_expect('%s --force %s' % (bind_script_path, binding_list), '# ') def unbind_interfaces_linux(self, nics_to_bind=None): """ @@ -329,7 +330,8 @@ class DPDKdut(Dut): binding_list += '%s ' % (port_info['pci']) current_nic += 1 - self.send_expect('usertools/dpdk-devbind.py %s' % binding_list, '# ', 30) + bind_script_path = self.get_dpdk_bind_script() + self.send_expect('%s --force %s' % (bind_script_path, binding_list), '# ') def build_dpdk_apps(self, folder, extra_options=''): """ -- 2.7.4