[PATCH] nics/net_device: add longer timeout for binding driver

Niklas Söderlund niklas.soderlund at corigine.com
Fri Aug 11 15:09:19 CEST 2023


From: Qin Ke <qin.ke at corigine.com>

It may take a long time whiling binding NIC port to specified
driver, add longer timeout to ensure this operation can execute
successfully and stably for all NIC.

It is required for NFP as it can take a long time to bind

Signed-off-by: Qin Ke <qin.ke at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
---
 nics/net_device.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nics/net_device.py b/nics/net_device.py
index 0f9c1af46a77..ec75d017df50 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -832,7 +832,9 @@ class NetDevice(object):
             "# ",
         )
         self.__send_expect(
-            "echo %s > /sys/bus/pci/drivers/%s/bind" % (nic_pci_num, driver), "# "
+            "echo %s > /sys/bus/pci/drivers/%s/bind" % (nic_pci_num, driver),
+            "# ",
+            timeout=80,
         )
         if driver == self.default_driver:
             itf = self.get_interface_name()
-- 
2.41.0



More information about the dts mailing list