[dts] [PATCH 8/8] framework project_dpdk: add extra setup after bind driver

Yong Liu yong.liu at intel.com
Sun Dec 13 05:57:44 CET 2015


From: Marvin Liu <yong.liu at intel.com>

Some nics like RRC required extra setup after bind to igb_uio.
Those setup functions will be realized in nic modules.

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 1c2f095..538a3b7 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -78,6 +78,7 @@ class DPDKdut(Dut):
 
         if bind_dev and self.get_os_type() == 'linux':
             self.bind_interfaces_linux(dts.drivername)
+        self.extra_nic_setup()
 
     def setup_modules(self, target):
         """
@@ -255,6 +256,14 @@ class DPDKdut(Dut):
         self.prepare_package(pkgName, patch)
         self.dut_prerequisites()
 
+    def extra_nic_setup(self):
+        """
+        Some nic like RRC required additional setup after module installed
+        """
+        for port_info in self.ports_info:
+            netdev = port_info['port']
+            netdev.setup()
+
     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
-- 
1.9.3



More information about the dts mailing list