test suite reviews and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: dts@dpdk.org
Cc: rdarawsheh@asaltech.com
Subject: [dts] [PATCH 2/6] framework:dut : excluding mellanox NICs from beeing binded
Date: Tue, 27 Oct 2015 08:07:51 +0200	[thread overview]
Message-ID: <1445926076-31279-2-git-send-email-rasland@mellanox.com> (raw)
In-Reply-To: <1445926076-31279-1-git-send-email-rasland@mellanox.com>

From: Raslsn Darawsheh <rdarawsheh@asaltech.com>

Signed-off-by: Raslsn Darawsheh <rdarawsheh@asaltech.com>
---
 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

  reply	other threads:[~2015-10-27  6:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27  6:07 [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Raslan Darawsheh
2015-10-27  6:07 ` Raslan Darawsheh [this message]
2015-10-27  6:07 ` [dts] [PATCH 3/6] framework:settings :adding new defines for ConnectX_3_Pro and ConnectX_4 and there drivers Raslan Darawsheh
2015-10-27  6:07 ` [dts] [PATCH 4/6] framewark:project_dpdk : Enable MLX4 and MLX5 PMD's before compiling and disable binding Raslan Darawsheh
2015-10-27  6:07 ` [dts] [PATCH 5/6] framework:net_device : adding function get_interface_name_Mellanox to get the ConnectX_3_Pro interfaces Raslan Darawsheh
2015-10-27  6:07 ` [dts] [PATCH 6/6] framework:tester: adding ConnectX_3_Pro second port to the list of ports Raslan Darawsheh
2015-10-27  6:07 ` [dts] [PATCH] fix queue start/stop case failed Raslan Darawsheh
2015-10-29  2:00 ` [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Xu, HuilongX
2015-10-29  8:04   ` Raslan Darawsheh
2015-10-29  8:48     ` Xu, HuilongX
2015-10-29  9:58       ` Raslan Darawsheh
2015-10-29 10:10         ` Xu, HuilongX
2015-11-10  6:32           ` Raslan Darawsheh
2015-11-10  8:12             ` Liu, Yong
2016-01-18 11:18             ` Raslan Darawsheh
2016-01-19  6:05               ` Liu, Yong
2016-01-19  9:26                 ` Raslan Darawsheh
2016-01-20  9:24                   ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445926076-31279-2-git-send-email-rasland@mellanox.com \
    --to=rasland@mellanox.com \
    --cc=dts@dpdk.org \
    --cc=rdarawsheh@asaltech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).