[dts] [PATCH] framework/crb: Corrected logic to identify cavium devices

Tu, Lijuan lijuan.tu at intel.com
Mon Jan 7 09:46:12 CET 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Phanendra Vukkisala
> Sent: Thursday, January 3, 2019 8:24 PM
> To: dts at dpdk.org
> Cc: Vijaya Bhaskar Annayyolla <avijay at marvell.com>; Faisal Masood
> <fmasood at marvell.com>; Phanendra Vukkisala <pvukkisala at marvell.com>
> Subject: [dts] [PATCH] framework/crb: Corrected logic to identify cavium
> devices
> 
> From: pvukkisala <pvukkisala at marvell.com>
> 
> Modified function used to get pci device speed, to improve execution speed.
> Corrected comparision string
> 
> Signed-off-by: phanendra,vukkisala <pvukkisala at 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



More information about the dts mailing list