* [dts] [PATCH v1] framework crb: add function for get pci address
@ 2017-07-26 2:31 Marvin Liu
2017-07-26 3:25 ` [dts] [PATCH v2] framework crb: add new function for getting pci address by port index Marvin Liu
0 siblings, 1 reply; 2+ messages in thread
From: Marvin Liu @ 2017-07-26 2:31 UTC (permalink / raw)
To: dts; +Cc: Marvin Liu
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/crb.py b/framework/crb.py
index 8fbd5b3..e0267dc 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -723,6 +723,12 @@ class Crb(object):
if port_info['pci'] == pci:
return port_info
+ def get_port_pci(self, port_id):
+ try:
+ return self.ports_info[port_id]['pci']
+ except:
+ return ""
+
def enable_promisc(self, intf):
if intf != 'N/A':
self.send_expect("ifconfig %s promisc" % intf, "# ", alt_session=True)
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dts] [PATCH v2] framework crb: add new function for getting pci address by port index
2017-07-26 2:31 [dts] [PATCH v1] framework crb: add function for get pci address Marvin Liu
@ 2017-07-26 3:25 ` Marvin Liu
0 siblings, 0 replies; 2+ messages in thread
From: Marvin Liu @ 2017-07-26 3:25 UTC (permalink / raw)
To: dts; +Cc: Marvin Liu
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/crb.py b/framework/crb.py
index 8fbd5b3..bf07345 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -723,6 +723,12 @@ class Crb(object):
if port_info['pci'] == pci:
return port_info
+ def get_port_pci(self, port_id):
+ """
+ return port pci address by port index
+ """
+ return self.ports_info[port_id]['pci']
+
def enable_promisc(self, intf):
if intf != 'N/A':
self.send_expect("ifconfig %s promisc" % intf, "# ", alt_session=True)
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-26 3:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 2:31 [dts] [PATCH v1] framework crb: add function for get pci address Marvin Liu
2017-07-26 3:25 ` [dts] [PATCH v2] framework crb: add new function for getting pci address by port index Marvin Liu
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).