dpdk_setup_ports: fix Mellanox
authorYaroslav Brustinov <[email protected]>
Mon, 6 Mar 2017 00:09:11 +0000 (02:09 +0200)
committerYaroslav Brustinov <[email protected]>
Mon, 6 Mar 2017 00:09:11 +0000 (02:09 +0200)
Change-Id: Ibdc0089c323f94221130fa0c80e5fc3d12ffab10
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/dpdk_setup_ports.py

index 8e5a23b..de73fea 100755 (executable)
@@ -630,7 +630,7 @@ Other network devices
                 to_bind_list.append(key)
 
         if to_bind_list:
-            if Mellanox_cnt > 0:
+            if Mellanox_cnt:
                 ret = self.do_bind_all('mlx5_core', to_bind_list)
                 if ret:
                     raise DpdkSetup('Unable to bind interfaces to driver mlx5_core.')
@@ -657,7 +657,8 @@ Other network devices
                 ret = self.do_bind_all('igb_uio', to_bind_list)
                 if ret:
                     raise DpdkSetup('Unable to bind interfaces to driver igb_uio.')
-
+        elif Mellanox_cnt:
+            return MLX_EXIT_CODE
 
     def do_return_to_linux(self):
         if not self.m_devices: