From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0056.outbound.protection.outlook.com [157.56.112.56]) by dpdk.org (Postfix) with ESMTP id EBA498D90 for ; Tue, 19 Jan 2016 10:26:56 +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=ImLr2CZC0kdH0rOJvMueZSRVR0Cti6xUSWAVOSogNXc=; b=ElAkfSBj7upg+KqYwHT7C1mbtClW9MoxdZLVEk6muI5MIZhElLVWFRtg3PBMED4hhOnEbTqBnYGnHlZQtB/CX2sWL6XO3JYHxgx6A412M3SectKNimLVYMB15IPFchQCzH6xZaWF7arf6dqWYHCJbQKFLlhQfLfraTZcHGCQwUo= Received: from VI1PR05MB1582.eurprd05.prod.outlook.com (10.164.86.16) by VI1PR05MB1664.eurprd05.prod.outlook.com (10.165.235.150) with Microsoft SMTP Server (TLS) id 15.1.365.19; Tue, 19 Jan 2016 09:26:55 +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; Tue, 19 Jan 2016 09:26:55 +0000 From: Raslan Darawsheh To: "Liu, Yong" , "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: AQHRUn9rGL7gHN4mZUmnswDdi4zY+58CjsFQ Date: Tue, 19 Jan 2016 09:26:54 +0000 Message-ID: References: <1445926076-31279-1-git-send-email-rasland@mellanox.com> <86228AFD5BCD8E4EBFD2B90117B5E81E13B1073F@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E13B1073F@SHSMSX103.ccr.corp.intel.com> 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; VI1PR05MB1664; 5:BWZ4LbzatNTB6/EvfCKboHP4pXT8BWZDML4TJp1oPqAp6j5h+CCxowUiQOjvmkFf4CG4UwBpryhfuP2O3+6JO8rNiALg0u7nFmNQN2wfpAkFUIEwQtnSvwZbYr0kO8b1fjwGyCJfpXetAIsb6limlw==; 24:6+Hse9oK2xdtM7pvsB49vOu7irqJ5zb08hjIfgG1dt7HbRlso3YZGHKDsyZsM5aB7cwYRnh9RSMrCxxjgX5VVhgHX6xbo/vHc8yduaqFWZo= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1664; x-ms-office365-filtering-correlation-id: 9e108e28-6744-4b51-77ff-08d320b2ac0e x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(34787635062028); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001); SRVR:VI1PR05MB1664; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1664; x-forefront-prvs: 0826B2F01B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(377454003)(13464003)(199003)(86362001)(2906002)(1220700001)(11100500001)(102836003)(4326007)(101416001)(586003)(3846002)(5008740100001)(76576001)(2501003)(10400500002)(107886002)(33656002)(6116002)(1096002)(2950100001)(4001430100002)(50986999)(54356999)(74316001)(5003600100002)(93886004)(92566002)(87936001)(5002640100001)(66066001)(19580395003)(40100003)(2900100001)(77096005)(106116001)(81156007)(105586002)(106356001)(189998001)(76176999)(97736004)(19580405001)(122556002)(5001960100002)(5004730100002)(5001770100001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1664; H:VI1PR05MB1582.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) 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: 19 Jan 2016 09:26:55.0081 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1664 Cc: "FHamad@asaltech.com" , Olga Shern , "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: Tue, 19 Jan 2016 09:26:57 -0000 Hi,=20 The following is a list of incompatibilities of dts:=20 1- when getting the device information - in our CX3 NIC it doesn't have Eth= ernet in it. -- pci_devices_information_uncached_linux function.=20 2- Mellanox NIC's don't support NIC binding -- bind_interfaces_linux=20 3- For the CX3 NIC it has the same PCI address for the two ports . which sh= ould change the way of how interface names being retrievrd.=20 4- Mellanox PMD is not enabled by default so I needed to enable it when ins= talling DPDK.=20 I also added Mellanox in the list of supported NICS. So I have 6 patches := =20 [dts] [PATCH 1/6] framework: crb :add some parameters and check_Mellanox_pc= i function to identify mellanox device =20 [dts] [PATCH 2/6] framework:dut : excluding mellanox NICs from beeing binde= d =20 [dts] [PATCH 3/6] framework:settings :adding new defines for ConnectX_3_Pro= and ConnectX_4 and there drivers [dts] [PATCH 4/6] framewark:project_dpdk : Enable MLX4 and MLX5 PMD's befor= e compiling and disable binding =20 [dts] [PATCH 5/6] framework:net_device : adding function get_interface_name= _Mellanox to get the ConnectX_3_Pro interfaces =20 [dts] [PATCH 6/6] framework:tester: adding ConnectX_3_Pro second port to th= e list of ports =20 Kindest regards=20 Raslan Darawsheh=20 -----Original Message----- From: Liu, Yong [mailto:yong.liu@intel.com]=20 Sent: Tuesday, January 19, 2016 8:05 AM To: Raslan Darawsheh ; 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 Darawsheh, We have some questions about your patches. In your patch, crb module will c= heck whether Mellanox nic on board. Crb module focus on board operations in dts design and we do not want to in= volve any NIC concept. For those special NICs, we have created one folder named "nics" for place s= pecial nic modules. Could you please list what's the incompatibilities of dts, we hope to merge= in your patch without change framework design. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Raslan Darawsheh > Sent: Monday, January 18, 2016 7:18 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 > This is a remainder of my patches to support Mellanox NICs in DTS.=20 > What should I be done with them ? >=20 > Kindest regards > Raslan Darawsheh >=20 > -----Original Message----- > From: Raslan Darawsheh > 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=20 > check_Mellanox_pci function to identify mellanox device >=20 > Hi Xu, HuilongX , >=20 > When do you think you will apply the patches? >=20 > Kindest regards > Raslan Darawsheh >=20 >=20 > -----Original Message----- > From: Xu, HuilongX [mailto:huilongx.xu@intel.com] > 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=20 > check_Mellanox_pci function to identify mellanox device >=20 > Hi Darawsheh, > I am very sorry, I am too careless. > Your changed in function " pci_devices_information_uncached_linux", so=20 > 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=20 > > and check_Mellanox_pci function to identify mellanox device > > > > Hi Xu, HuilongX, > > > > I think you need to double check the patch, since in this patch it=20 > > 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 ; 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, > > 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=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 O= S. > > > 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=20 > > > > and 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 differentl= y > > > > + """ > > > > + out =3D self.send_expect("lspci -nn | grep -i " +=20 > > > > + pci_bus, "# > > ") > > > > + 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 > > > > +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" > > > 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=20 > > > > + .*?([\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