From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (unknown [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id A0B7B7F1C for ; Tue, 27 Oct 2015 07:08:13 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from root@r-aa-dragon7.rdmz.labs.mlnx) with ESMTPS (AES256-SHA encrypted); 27 Oct 2015 08:08:00 +0200 Received: from r-aa-dragon7.rdmz.labs.mlnx (r-aa-dragon7.rdmz.labs.mlnx [10.224.14.90]) by filer01.rdmz.labs.mlnx (8.13.8/8.13.8) with ESMTP id t9R67xaI010149; Tue, 27 Oct 2015 08:07:59 +0200 Received: from r-aa-dragon7.rdmz.labs.mlnx (localhost [127.0.0.1]) by r-aa-dragon7.rdmz.labs.mlnx (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t9R67xnR031879; Tue, 27 Oct 2015 08:07:59 +0200 Received: (from root@localhost) by r-aa-dragon7.rdmz.labs.mlnx (8.14.4/8.14.4/Submit) id t9R67xxV031878; Tue, 27 Oct 2015 08:07:59 +0200 From: Raslan Darawsheh To: dts@dpdk.org Date: Tue, 27 Oct 2015 08:07:51 +0200 Message-Id: <1445926076-31279-2-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445926076-31279-1-git-send-email-rasland@mellanox.com> References: <1445926076-31279-1-git-send-email-rasland@mellanox.com> Cc: rdarawsheh@asaltech.com Subject: [dts] [PATCH 2/6] framework:dut : excluding mellanox NICs from beeing binded 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: Tue, 27 Oct 2015 06:08:14 -0000 From: Raslsn Darawsheh Signed-off-by: Raslsn Darawsheh --- framework/dut.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 70bd146..5776270 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -224,7 +224,7 @@ class Dut(Crb): pci_id = port['type'] # get device driver driver = settings.get_nic_driver(pci_id) - if driver is not None: + if driver is not None and self.isMellanox == False: # unbind device driver addr_array = pci_bus.split(':') bus_id = addr_array[0] @@ -241,7 +241,10 @@ class Dut(Crb): itf = port.get_interface_name() self.send_expect("ifconfig %s up" % itf, "# ") else: - self.logger.info("NOT FOUND DRIVER FOR PORT (%s|%s)!!!" % (pci_bus, pci_id)) + if self.isMellanox: + self.logger.info("Mellanox Driver Doesn't support unbinding") + else: + self.logger.info("NOT FOUND DRIVER FOR PORT (%s|%s)!!!" % (pci_bus, pci_id)) def setup_memory(self, hugepages=-1): """ @@ -334,7 +337,10 @@ class Dut(Crb): self.logger.info("Not nic need bind driver: %s" % driver) return - self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ') + if self.isMellanox: + pass + else: + self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ') def unbind_interfaces_linux(self, nics_to_bind=None): """ @@ -358,7 +364,10 @@ class Dut(Crb): self.logger.info("Not nic need unbind driver") return - self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ', 30) + if self.isMellanox: + pass + else: + self.send_expect('tools/dpdk_nic_bind.py %s' % binding_list, '# ', 30) def get_ports(self, nic_type='any', perf=None, socket=None): """ @@ -658,6 +667,9 @@ class Dut(Crb): port = NetDevice(self, bus_id, devfun_id) numa = port.socket # store the port info to port mapping + self.check_Mellanox_pci(pci_bus,pci_id) + if self.isMellanox and self.mellanoxCardType == "cx3": + self.ports_info.append({'port': port,'pci': pci_bus, 'type': pci_id, 'numa': numa}) self.ports_info.append( {'port': port, 'pci': pci_bus, 'type': pci_id, 'numa': numa}) @@ -780,6 +792,8 @@ class Dut(Crb): if key in port_cfg: if key in port and port_cfg[key].lower() != port[key].lower(): self.logger.warning("CONFIGURED %s NOT SAME AS SCANNED!!!" % (key.upper())) + if self.isMellanox : + continue port[key] = port_cfg[key].lower() def map_available_ports(self): -- 1.8.3.1