From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0045.outbound.protection.outlook.com [104.47.2.45]) by dpdk.org (Postfix) with ESMTP id E65C15A0F for ; Mon, 18 Jan 2016 12:18:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t5NEUNXWcQ0uEYGqzBYVznHHjW2RHonb3u6I+0WDIrI=; b=DonUJirdRt47LUhon/BZq2b9CaKm9UNh3vnOX1FPzHy4A1tPYkyvh6w97JOa+dAf+R4td++NRE2AqkYfh1kjJFLNOrb1iJda+tSA8wOVlp4l+UyDOdhAIVeOW0V6hdpGJ3r9a+R9I0F5u0x5AtTnP8tBVMzRmTo+xHI6wbDO9bA= Received: from VI1PR05MB1582.eurprd05.prod.outlook.com (10.164.86.16) by VI1PR05MB1584.eurprd05.prod.outlook.com (10.164.86.18) with Microsoft SMTP Server (TLS) id 15.1.365.19; Mon, 18 Jan 2016 11:18:10 +0000 Received: from VI1PR05MB1582.eurprd05.prod.outlook.com ([10.164.86.16]) by VI1PR05MB1582.eurprd05.prod.outlook.com ([10.164.86.16]) with mapi id 15.01.0365.023; Mon, 18 Jan 2016 11:18:10 +0000 From: Raslan Darawsheh To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device Thread-Index: AQHREH3w843ExTKm50eynoTaC3FvTZ6Bt7TwgABnFDCAAAy30IAABZGAgAARStCAEp8JAIBswMUg Date: Mon, 18 Jan 2016 11:18:09 +0000 Message-ID: References: <1445926076-31279-1-git-send-email-rasland@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [82.213.2.186] x-microsoft-exchange-diagnostics: 1; VI1PR05MB1584; 5:mIKs7iDP20Fna9wvjiZsdyCIST8CWT4LRQpN2y+UHREliuv6M/vh+Ewsuxwg7lSpJIzdFIVbm5IJxWwJt2fXvcybH9wix5Cqtsjdie3B56Hd0yIs0PUMyEKHHpA+GaJZfas7Lj8bs+eBfz/09O93AQ==; 24:BC1MbFM5EGY+KGaN1h81scHkP1gwSmC9RkB4DznGpo2YLrAj5LjgiNBm6WBosAeVpSlagJ5s2OPPc2eke+FAsrFh+oUDDPUZYQJi/r05XLQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1584; x-ms-office365-filtering-correlation-id: 67cc0827-f04a-4c28-075a-08d31ff90c5c x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(34787635062028); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:VI1PR05MB1584; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1584; x-forefront-prvs: 08252193F3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(377454003)(13464003)(122556002)(97736004)(105586002)(5001960100002)(3846002)(189998001)(106356001)(11100500001)(5004730100002)(76576001)(81156007)(74316001)(93886004)(106116001)(2906002)(5003600100002)(4326007)(5002640100001)(5008740100001)(1096002)(19580405001)(5001770100001)(77096005)(586003)(1220700001)(2950100001)(10400500002)(86362001)(19580395003)(101416001)(76176999)(92566002)(33656002)(54356999)(66066001)(50986999)(6116002)(2501003)(40100003)(102836003)(2900100001)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1584; H:VI1PR05MB1582.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2016 11:18:10.2016 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1584 Cc: "rdarawsheh@asaltech.com" Subject: Re: [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pci function to identify mellanox device X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2016 11:18:12 -0000 Hi Xu, HuilongX , This is a remainder of my patches to support Mellanox NICs in DTS. What sh= ould I be done with them ?=20 Kindest regards=20 Raslan Darawsheh -----Original Message----- From: Raslan Darawsheh=20 Sent: Tuesday, November 10, 2015 8:33 AM To: Xu, HuilongX ; dts@dpdk.org Cc: rdarawsheh@asaltech.com Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and chec= k_Mellanox_pci function to identify mellanox device Hi Xu, HuilongX ,=20 When do you think you will apply the patches?=20 Kindest regards=20 Raslan Darawsheh -----Original Message----- From: Xu, HuilongX [mailto:huilongx.xu@intel.com]=20 Sent: Thursday, October 29, 2015 12:10 PM To: Raslan Darawsheh; dts@dpdk.org Cc: rdarawsheh@asaltech.com Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and chec= k_Mellanox_pci function to identify mellanox device Hi Darawsheh, I am very sorry, I am too careless. Your changed in function " pci_devices_information_uncached_linux", so it's= no problem Thanks a lot > -----Original Message----- > From: Raslan Darawsheh [mailto:rasland@mellanox.com] > Sent: Thursday, October 29, 2015 5:58 PM > To: Xu, HuilongX; dts@dpdk.org > Cc: rdarawsheh@asaltech.com > Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and=20 > check_Mellanox_pci function to identify mellanox device >=20 > Hi Xu, HuilongX, >=20 > I think you need to double check the patch, since in this patch it=20 > doesn't change anything to this function. >=20 > Kindest regards > Raslan Darawsheh >=20 > -----Original Message----- > From: Xu, HuilongX [mailto:huilongx.xu@intel.com] > Sent: Thursday, October 29, 2015 10:48 AM > To: Raslan Darawsheh ; dts@dpdk.org > Cc: rdarawsheh@asaltech.com > Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters and=20 > check_Mellanox_pci function to identify mellanox device >=20 > 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 >=20 > > -----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=20 > > 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 ; dts@dpdk.org > > Cc: rdarawsheh@asaltech.com > > Subject: RE: [dts] [PATCH 1/6] framework: crb :add some parameters=20 > > 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=20 > > > 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=20 > > > check_Mellanox_pci function to identify mellanox device > > > > > > From: Raslsn Darawsheh > > > > > > Signed-off-by: Raslsn Darawsheh > > > --- > > > framework/crb.py | 23 ++++++++++++++++++++++- > > > 1 file changed, 22 insertions(+), 1 deletion(-) > > > > > > diff --git a/framework/crb.py b/framework/crb.py index=20 > > > 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 =3D False > > > self.serializer =3D serializer > > > self.ports_info =3D None > > > + self.isMellanox =3D False > > > + self.mellanoxPortCount =3D 0 > > > + self.mellanoxCardType =3D None > > > > > > def send_expect(self, cmds, expected, timeout=3DTIMEOUT, > > > alt_session=3DFalse, verify=3DFalse): > > > @@ -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 =3D self.send_expect("lspci -nn | grep -i " + pci_bus,= =20 > > > + "# > ") > > > + if "Mell" in out: > > > + self.isMellanox =3DTrue > > > + if NICS['ConnectX_4'] in out: > > > + self.mellanoxCardType =3D "cx4" > > > + else: > > > + self.mellanoxCardType =3D "cx3" > > > + > > > def get_session_output(self, timeout=3DTIMEOUT): > > > """ > > > Get session output message before timeout @@ -196,6=20 > > > +212,11 @@ class Crb(object): > > > rexp =3D r"([\da-f]{2}:[\da-f]{2}.\d{1}) .*Eth.*?ernet > > > .*?([\da- f]{4}:[\da-f]{4})" > > > pattern =3D re.compile(rexp) > > > match =3D pattern.findall(out) > > Could you not changed this function? because it not about dts=20 > > feature It only a ssh session function, when you exec "lspci"=20 > > command, freebsd os not support. > > So some case will failed on freebesd. > > > + out =3D self.send_expect( > > > + "lspci -nn ", "# ", alt_session=3DTrue) > > > + rexp =3D r"([\da-f]{2}:[\da-f]{2}.\d{1}) Network .*?([\da- > > > f]{4}:[\da-f]{4})" > > > + pattern =3D re.compile(rexp) > > > + match +=3D pattern.findall(out) > > > self.pci_devices_info =3D [] > > > for i in range(len(match)): > > > self.pci_devices_info.append((match[i][0], > > > match[i][1])) > > > -- > > > 1.8.3.1