[dts] [PATCH 2/8] framework crb: add function to retrieve port information

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


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

Add new function will retrieve port information based on pci address.

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

diff --git a/framework/crb.py b/framework/crb.py
index 9377565..525d6a1 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -689,3 +689,11 @@ class Crb(object):
             perCorelCs = [_ for _ in perSocklCs if _['core'] == coreNum]
 
             return perCorelCs[threadid]['thread']
+
+    def get_port_info(self, pci):
+        """
+        return port info by pci id
+        """
+        for port_info in self.ports_info:
+            if port_info['pci'] == pci:
+                return port_info
-- 
1.9.3



More information about the dts mailing list