From: Phanendra Vukkisala <pvukkisala@marvell.com>
To: "dts@dpdk.org" <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
Date: Thu, 3 Jan 2019 12:23:53 +0000 [thread overview]
Message-ID: <1546518179-19493-1-git-send-email-pvukkisala@marvell.com> (raw)
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
next reply other threads:[~2019-01-03 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 12:23 Phanendra Vukkisala [this message]
2019-01-07 8:46 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546518179-19493-1-git-send-email-pvukkisala@marvell.com \
--to=pvukkisala@marvell.com \
--cc=avijay@marvell.com \
--cc=dts@dpdk.org \
--cc=fmasood@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).