From owner-freebsd-infiniband@freebsd.org Thu Nov 10 12:36:49 2016 Return-Path: Delivered-To: freebsd-infiniband@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B57D5C38678 for ; Thu, 10 Nov 2016 12:36:49 +0000 (UTC) (envelope-from menyy@mellanox.com) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0076.outbound.protection.outlook.com [104.47.1.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C65390B for ; Thu, 10 Nov 2016 12:36:48 +0000 (UTC) (envelope-from menyy@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wC5/7OvRUZSDzXFokcCEe8Sdufrkdq1TsS6WR/Eli5M=; b=XFHrVkB0rM3TALewwKQ5AQ8cQYUbi3gBVw61eGK/gC6fbQzGnFhwkQs3UjVrK5Zn+ajxRg5K8rCsSayguNHaTRvfk2d+MTKgYN9I6UeqsDzprTKPO67c72yyWRr66tdQcKC8LxRogDGYqV8ZO+MT0fE+00nxsLtB1s67ajCIQUU= Received: from DB5PR05MB1765.eurprd05.prod.outlook.com (10.165.7.23) by DB5PR05MB1383.eurprd05.prod.outlook.com (10.162.157.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Thu, 10 Nov 2016 12:21:00 +0000 Received: from DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) by DB5PR05MB1765.eurprd05.prod.outlook.com ([10.165.7.23]) with mapi id 15.01.0721.010; Thu, 10 Nov 2016 12:21:00 +0000 From: Meny Yossefi To: "'freebsd-infiniband@freebsd.org'" CC: Mark Bloch , Yuval Bason , "Hans Petter Selasky" Subject: RE: Device hints to put mlx4 on IB mode Thread-Topic: Device hints to put mlx4 on IB mode Thread-Index: AQHSOdz2Pcf6O3BBuEK/HEBs92tmQ6DQjJuWgAGWlvA= Date: Thu, 10 Nov 2016 12:21:00 +0000 Message-ID: References: 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=menyy@mellanox.com; x-originating-ip: [193.47.165.251] x-microsoft-exchange-diagnostics: 1; DB5PR05MB1383; 7:aa1qcNEHSwQe++Q+wASHK33YIeOh8Hmhlhe45648HNqVxoH5n0MtBmdgcZ/2sFcx5tWRCUEOEihKLnYLUytBogK5I25MMVYNTiqP/8FajHoTDv6x744p+kuQD+ldFXPvq7sXruEciApsuhFzFoGaGciuiR38wgDNLH/ga4jac6xGEz3nEPT+57dYbbJ+g6byup7J7/qwheTYdrLkKIlCj93sEAs00DSrZqETV+qBdvCfU97VTjOrFLUCPXdMWPO0rlZtQqD2liCttNXlwt9P2fo36e0rtHCDdvzB2Teu5worD3R84VfS0q/GMwdMr6k2+Nr/TOOH2XB0IuwlR4NPefpliMovJeSGEutW5WWbd6A= x-ms-office365-filtering-correlation-id: 33724786-3836-4865-7519-08d409640850 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR05MB1383; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(75325880899374); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:DB5PR05MB1383; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1383; x-forefront-prvs: 01221E3973 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(189002)(13464003)(51874003)(377454003)(2906002)(81166006)(3846002)(102836003)(106356001)(81156014)(66066001)(9686002)(106116001)(6116002)(8676002)(77096005)(2900100001)(122556002)(97736004)(105586002)(450100001)(7736002)(4326007)(68736007)(305945005)(86362001)(8936002)(76576001)(7846002)(74316002)(54356999)(50986999)(76176999)(586003)(101416001)(107886002)(110136003)(189998001)(4001430100002)(2950100002)(92566002)(87936001)(6916009)(3900700001)(5660300001)(33656002)(229853002)(7696004)(3660700001)(3280700002)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1383; H:DB5PR05MB1765.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:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2016 12:21:00.3590 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1383 X-BeenThere: freebsd-infiniband@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Infiniband on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 12:36:49 -0000 Hi,=20 I'm not familiar of any hints passed from the bootloader. We do have some FW tools to identify number of NIC ports, but I guess that = won't serve your purpose. The only option I can think of at the moment is to force all ports to come = up in IB mode. Try using this as reference:=20 sys/ofed/drivers/net/mlx4/main.c: static struct param_data port_type_array =3D { .dbdf2val =3D { .name =3D "port_type_array param", .num_vals =3D 2, - .def_val =3D {MLX4_PORT_TYPE_NONE, MLX4_PORT_TYPE_NONE}, + .def_val =3D {MLX4_PORT_TYPE_IB, MLX4_PORT_TYPE_IB}, .range =3D {MLX4_PORT_TYPE_IB, MLX4_PORT_TYPE_NA} } }; @@ -759,6 +759,9 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct ml= x4_dev_cap *dev_cap) (dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP) && (dev->caps.flags & MLX4_DEV_CAP_FLAG_SENSE_SUPPORT= )); + /* MY: disablling auto sense for default IB/Eth ports support */ + mlx4_priv(dev)->sense.sense_allowed[i] =3D 0; + /* * If "default_sense" bit is set, we move the port to "AUTO= " mode * and perform sense_port FW command to try and set the cor= rect -Meny -----Original Message----- From: freebsd-commits-tracker=20 Sent: Wednesday, November 09, 2016 1:55 PM To: Mark Bloch ; Meny Yossefi ; Yuv= al Bason Subject: FW: Device hints to put mlx4 on IB mode ________________________________________ From: owner-freebsd-infiniband@freebsd.orgOn Behalf OfVin=EDcius Ferr=E3o Sent: Tuesday, November 8, 2016 4:27:13 PM (UTC+00:00) Monrovia, Reykjavik To: freebsd-infiniband@freebsd.org Subject: Device hints to put mlx4 on IB mode Hello guys, I would like to put my Connect-X3 card in IB mode during boot time using de= vice hints instead of sysctl's. Today we have this dirty workarround on /etc/sysctl.conf: sys.device.mlx4_core0.mlx4_port1=3Dib sys.device.mlx4_core0.mlx4_port2=3Dib It's fine when we use a Connect-X3 card with two Infiniband interfaces, but= if a ConnectX-3 card with only one interface is used an error message is d= umped on the console about failing to set the "sys.device.mlx4_core0.mlx4_p= ort2=3Dib" sysctl. To solve this I would like to use device hints passed from the GRUB2 bootlo= ader, but I was unable to find which hints I should use for the mlx4 driver= s. I don't even know if this is supported. The problem is purely cosmetic, I just want to get rid of the error message= during the boot process. Thanks in advance, V. _______________________________________________ freebsd-infiniband@freebsd.org mailing list https://lists.freebsd.org/mailm= an/listinfo/freebsd-infiniband To unsubscribe, send any mail to "freebsd-infiniband-unsubscribe@freebsd.or= g"