* [dts] [PATCH] framework/crb: Corrected logic to identify cavium devices
@ 2019-01-03 12:23 Phanendra Vukkisala
2019-01-07 8:46 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: Phanendra Vukkisala @ 2019-01-03 12:23 UTC (permalink / raw)
To: dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood, Phanendra Vukkisala
From: pvukkisala <pvukkisala@marvell.com>
Modified function used to get pci device speed, to improve execution
speed. Corrected comparision string
Signed-off-by: phanendra,vukkisala <pvukkisala@marvell.com>
---
framework/crb.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/framework/crb.py b/framework/crb.py
index 97bebfe..a6eb69e 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -282,8 +282,8 @@ class Crb(object):
#check if device is cavium and check its linkspeed, append only if it is 10G
if "177d:" in match[i][1]:
linkspeed = "10000"
- nic_linkspeed = self.send_command("cat /sys/bus/pci/devices/%s/net/*/speed" % match[i][0])
- if nic_linkspeed == linkspeed:
+ nic_linkspeed = self.send_expect("cat /sys/bus/pci/devices/%s/net/*/speed" % match[i][0], "# ", alt_session=True)
+ if nic_linkspeed.split()[0] == linkspeed:
self.pci_devices_info.append((match[i][0], match[i][1]))
else:
self.pci_devices_info.append((match[i][0], match[i][1]))
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] framework/crb: Corrected logic to identify cavium devices
2019-01-03 12:23 [dts] [PATCH] framework/crb: Corrected logic to identify cavium devices Phanendra Vukkisala
@ 2019-01-07 8:46 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-01-07 8:46 UTC (permalink / raw)
To: Phanendra Vukkisala, dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Phanendra Vukkisala
> Sent: Thursday, January 3, 2019 8:24 PM
> To: dts@dpdk.org
> Cc: Vijaya Bhaskar Annayyolla <avijay@marvell.com>; Faisal Masood
> <fmasood@marvell.com>; Phanendra Vukkisala <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] framework/crb: Corrected logic to identify cavium
> devices
>
> From: pvukkisala <pvukkisala@marvell.com>
>
> Modified function used to get pci device speed, to improve execution speed.
> Corrected comparision string
>
> Signed-off-by: phanendra,vukkisala <pvukkisala@marvell.com>
> ---
> framework/crb.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/framework/crb.py b/framework/crb.py index 97bebfe..a6eb69e
> 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -282,8 +282,8 @@ class Crb(object):
> #check if device is cavium and check its linkspeed, append
> only if it is 10G
> if "177d:" in match[i][1]:
> linkspeed = "10000"
> - nic_linkspeed = self.send_command("cat
> /sys/bus/pci/devices/%s/net/*/speed" % match[i][0])
> - if nic_linkspeed == linkspeed:
> + nic_linkspeed = self.send_expect("cat
> /sys/bus/pci/devices/%s/net/*/speed" % match[i][0], "# ", alt_session=True)
> + if nic_linkspeed.split()[0] == linkspeed:
> self.pci_devices_info.append((match[i][0],
> match[i][1]))
> else:
> self.pci_devices_info.append((match[i][0], match[i][1]))
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-07 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03 12:23 [dts] [PATCH] framework/crb: Corrected logic to identify cavium devices Phanendra Vukkisala
2019-01-07 8:46 ` Tu, Lijuan
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).