From: Raslan Darawsheh <rasland@mellanox.com>
To: "Xu, HuilongX" <huilongx.xu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "rdarawsheh@asaltech.com" <rdarawsheh@asaltech.com>
Subject: Re: [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device
Date: Thu, 29 Oct 2015 09:58:09 +0000 [thread overview]
Message-ID: <VI1PR05MB158282B86AC62D6FD26F192EC2200@VI1PR05MB1582.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <DF2A19295B96364286FEB7F3DDA27A4637A94CD3@SHSMSX101.ccr.corp.intel.com>
Hi Xu, HuilongX,
I think you need to double check the patch, since in this patch it doesn't change anything to this function.
Kindest regards
Raslan Darawsheh
-----Original Message-----
From: Xu, HuilongX [mailto:huilongx.xu@intel.com]
Sent: Thursday, October 29, 2015 10:48 AM
To: Raslan Darawsheh <rasland@mellanox.com>; dts@dpdk.org
Cc: rdarawsheh@asaltech.com
Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device
Hi Darawsheh,
Your changed can't work on FreeBSD OS, but function "get_session_output" in crb.py need work on FreeBSD os.
Thanks a lot
> -----Original Message-----
> From: Raslan Darawsheh [mailto:rasland@mellanox.com]
> Sent: Thursday, October 29, 2015 4:05 PM
> To: Xu, HuilongX; dts@dpdk.org
> Cc: rdarawsheh@asaltech.com
> Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and
> check_Mellanox_pci function to identify mellanox device
>
> Hi Xu, HuilongX ,
>
> From what I changed it seems that it's only executed over the linux OS.
> And there are an already "lspci" command executed inside the function.
> Can you explain more ?
> Kindest regards
> Raslan Darawsheh
>
> -----Original Message-----
> From: Xu, HuilongX [mailto:huilongx.xu@intel.com]
> Sent: Thursday, October 29, 2015 4:01 AM
> To: Raslan Darawsheh <rasland@mellanox.com>; dts@dpdk.org
> Cc: rdarawsheh@asaltech.com
> Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and
> check_Mellanox_pci function to identify mellanox device
>
>
> Hi darawsheh,
> Pls see my comments as below., thanks a lot
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Raslan
> > Darawsheh
> > Sent: Tuesday, October 27, 2015 2:08 PM
> > To: dts@dpdk.org
> > Cc: rdarawsheh@asaltech.com
> > Subject: [dts] [PATCH 1/6] framework: crb :add some parameters and
> > check_Mellanox_pci function to identify mellanox device
> >
> > From: Raslsn Darawsheh <rdarawsheh@asaltech.com>
> >
> > Signed-off-by: Raslsn Darawsheh <rdarawsheh@asaltech.com>
> > ---
> > framework/crb.py | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/framework/crb.py b/framework/crb.py index
> > fcbd7d9..0acec3b 100644
> > --- a/framework/crb.py
> > +++ b/framework/crb.py
> > @@ -33,7 +33,7 @@ import time
> > import dts
> > import re
> > import os
> > -from settings import TIMEOUT, IXIA
> > +from settings import TIMEOUT, IXIA, NICS
> >
> > """
> > CRB (customer reference board) basic functions and handlers @@
> > -54,6
> > +54,9 @@ class Crb(object):
> > self.skip_setup = False
> > self.serializer = serializer
> > self.ports_info = None
> > + self.isMellanox = False
> > + self.mellanoxPortCount = 0
> > + self.mellanoxCardType = None
> >
> > def send_expect(self, cmds, expected, timeout=TIMEOUT,
> > alt_session=False, verify=False):
> > @@ -79,6 +82,19 @@ class Crb(object):
> >
> > return self.session.send_command(cmds, timeout)
> >
> > + def check_Mellanox_pci(self,pci_bus,pci_id):
> > + """
> > + check if the PCI is Mellanox device or not
> > + its used to set a flag to handle Mellanox ports differently
> > + """
> > + out = self.send_expect("lspci -nn | grep -i " + pci_bus, "# ")
> > + if "Mell" in out:
> > + self.isMellanox =True
> > + if NICS['ConnectX_4'] in out:
> > + self.mellanoxCardType = "cx4"
> > + else:
> > + self.mellanoxCardType = "cx3"
> > +
> > def get_session_output(self, timeout=TIMEOUT):
> > """
> > Get session output message before timeout @@ -196,6 +212,11
> > @@ class Crb(object):
> > rexp = r"([\da-f]{2}:[\da-f]{2}.\d{1}) .*Eth.*?ernet
> > .*?([\da- f]{4}:[\da-f]{4})"
> > pattern = re.compile(rexp)
> > match = pattern.findall(out)
> Could you not changed this function? because it not about dts feature
> It only a ssh session function, when you exec "lspci" command, freebsd
> os not support.
> So some case will failed on freebesd.
> > + out = self.send_expect(
> > + "lspci -nn ", "# ", alt_session=True)
> > + rexp = r"([\da-f]{2}:[\da-f]{2}.\d{1}) Network .*?([\da-
> > f]{4}:[\da-f]{4})"
> > + pattern = re.compile(rexp)
> > + match += pattern.findall(out)
> > self.pci_devices_info = []
> > for i in range(len(match)):
> > self.pci_devices_info.append((match[i][0],
> > match[i][1]))
> > --
> > 1.8.3.1
next prev parent reply other threads:[~2015-10-29 9:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 6:07 Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH 2/6] framework:dut : excluding mellanox NICs from beeing binded Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH 3/6] framework:settings :adding new defines for ConnectX_3_Pro and ConnectX_4 and there drivers Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH 4/6] framewark:project_dpdk : Enable MLX4 and MLX5 PMD's before compiling and disable binding Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH 5/6] framework:net_device : adding function get_interface_name_Mellanox to get the ConnectX_3_Pro interfaces Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH 6/6] framework:tester: adding ConnectX_3_Pro second port to the list of ports Raslan Darawsheh
2015-10-27 6:07 ` [dts] [PATCH] fix queue start/stop case failed Raslan Darawsheh
2015-10-29 2:00 ` [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Xu, HuilongX
2015-10-29 8:04 ` Raslan Darawsheh
2015-10-29 8:48 ` Xu, HuilongX
2015-10-29 9:58 ` Raslan Darawsheh [this message]
2015-10-29 10:10 ` Xu, HuilongX
2015-11-10 6:32 ` Raslan Darawsheh
2015-11-10 8:12 ` Liu, Yong
2016-01-18 11:18 ` Raslan Darawsheh
2016-01-19 6:05 ` Liu, Yong
2016-01-19 9:26 ` Raslan Darawsheh
2016-01-20 9:24 ` Liu, Yong
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=VI1PR05MB158282B86AC62D6FD26F192EC2200@VI1PR05MB1582.eurprd05.prod.outlook.com \
--to=rasland@mellanox.com \
--cc=dts@dpdk.org \
--cc=huilongx.xu@intel.com \
--cc=rdarawsheh@asaltech.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).