Received: by 10.213.65.68 with SMTP id h4csp749069imn; Sun, 18 Mar 2018 00:31:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELtw0vfJxZrAmQzBzfzGVFppzoIYLXDk4O4tjL9wAZiQck8J+yAv8YD959PlZhk0VhlHuT9I X-Received: by 10.98.4.196 with SMTP id 187mr1813962pfe.203.1521358317352; Sun, 18 Mar 2018 00:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521358317; cv=none; d=google.com; s=arc-20160816; b=XYeqBhZolixHgzRlo1CuOKaeWJMJnuZK+LDaAY5xtBEsEBBiY4Wr7m6UvWKGXPzsdh bTJJJX5EJddCKVvZwUms4+iV/2cyjOpicqfn8YMuO6cve3UMVgKXq4TTXLwolG49hMGc FBgxLkg82qS0wamLveq7wjJ8S8USI2MIg+PmfZiliTbc36Tqr69mV3sZXX4zQCcyhkG+ aHe1LmB3LB7ZHy4VFDvV8RwnekDsnuPzLLooLC5lNKVrePczVeStLNS7eb5dfnSUzR1+ f9M6yDsubbXnN9MyWddpwmOqO4h6ThSH3g3/ahpzlHCDIvx9HqLePkIGstZnhricyKwB K+6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=bW976p4OugNevBqnQFXOLkdpsYSH8rNpz2IG4AmtG94=; b=OqeQhslyMPHv+VCDtw91Diwz7NTyUm2OKEevHiup9Ad8xdOczT2zpneWD5PJuSChdl uwztfJXNmhk6PxSne+ezKWMkt+k42/XaknYOnmLBQXlgy3x4pNlotXbLCziNjdL6AAJX xKiLmJawSotWxpuJD87/NMYUEuDvprZwIdpy+PJkjIEekIdRoThLpinmwKbyl/6q1r1Q 2VepIrhGauOOeLUB757kMNtsIFNDDG2y2iVSK7nMl5Vr/JopOoEI1BLixfFx0vgEBfrg SIiGWN2jSD8X3I+45cPiDdvyzuoIcWNKihgFA4lcYkgXhoLhNpDVHPpr3Cbt/5hes0y9 HFZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=GFVQ+i+s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13-v6si2194042pll.416.2018.03.18.00.31.03; Sun, 18 Mar 2018 00:31:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=GFVQ+i+s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753079AbeCRH2k (ORCPT + 99 others); Sun, 18 Mar 2018 03:28:40 -0400 Received: from mail-ve1eur01on0063.outbound.protection.outlook.com ([104.47.1.63]:30976 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751003AbeCRH2h (ORCPT ); Sun, 18 Mar 2018 03:28:37 -0400 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=bW976p4OugNevBqnQFXOLkdpsYSH8rNpz2IG4AmtG94=; b=GFVQ+i+snCvgD6FMjUUc9K7eZLRVpi4xUruBMoHYXhG6LSR8crjw0orfeLYnfb53dGpMneFUQ/r+CKcOWOMXYSF8/YDy98MBnsTc4PWlyemDGpP5ALB1XtBYfFnwZPkdpiUEvAgicGCM0rMqtyafg6qJZ1yI42+kTQA3RJVkpMg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=noaos@mellanox.com; Received: from [10.8.2.85] (193.47.165.251) by AM2PR05MB1060.eurprd05.prod.outlook.com (2a01:111:e400:8438::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14; Sun, 18 Mar 2018 07:28:32 +0000 Subject: Re: [PATCH] IB/mlx5: Set the default active rate and width to QDR and 4X To: Hal Rosenstock , Honggang LI , dledford@redhat.com, jgg@ziepe.ca, matanb@mellanox.com, leonro@mellanox.com, linux-rdma@vger.kernel.org References: <20180316023713.30323-1-honli@redhat.com> Cc: linux-kernel@vger.kernel.org From: Noa Osherovich Message-ID: Date: Sun, 18 Mar 2018 09:28:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: CWLP265CA0033.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:11::21) To AM2PR05MB1060.eurprd05.prod.outlook.com (2a01:111:e400:8438::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d3ddf837-4cba-4af8-d65e-08d58ca1dad4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM2PR05MB1060; X-Microsoft-Exchange-Diagnostics: 1;AM2PR05MB1060;3:7zYNphBsVK6A8+DwRkBioq/APYYSMc6PWfL9CiecxVFP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VzBcvT9AJDegzu1qX//EHFo4ZFjbtmyGM8lSIBbfKLWKIXGN/ucOuGqbty3yECzISgssJZND5vTLY8t+dg+sbZ8gGPqSD3k8g6hMhSI0zI2rTSKGIHi70RNk/MoYOdq8FK8Ysv1zRTDJd0echrjJupHutno4fbf0NLc9d7Dr/848ycZcGqFCaPbyC/lBkVLslfu5kr6U42isJwGO0hvetmTIFjKngAbDNJjQNY9DryPTp1XubrRe8QPUz3Yjxazcce1YNqnuN2FSymMa9+vTyrr6EikUHBHEDt8hBgoLnjoB;4:rU+8punLfuKdBcQPexIONLtEgDr5Dz9JOpguTbIB0BE5mKo6yt3gsQA1b5ACmLQHMr3A59IR5JQ65Cb6y9CN2y1i5aESJdU2PJyCnugZF9rIZlphcGoirs0N/AxGBnnksQM9WLyYTNKBDBRGhYs0XlMhDwIL5W62a3yJzEPSP0NiauJM9H8KgMOdXn+S26Wdp3oFPXcUI1l4LiLro64FJenAYCQeyk38b2ITr6Qj/9JKgGkjdWYAS3xTHGux/ju01drwzoiusxuYeQ3LK5bRKw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:AM2PR05MB1060;BCL:0;PCL:0;RULEID:;SRVR:AM2PR05MB1060; X-Forefront-PRVS: 06157D541C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(396003)(366004)(39860400002)(39380400002)(346002)(376002)(189003)(199004)(8936002)(26005)(81166006)(8676002)(2486003)(52146003)(76176011)(52116002)(31686004)(77096007)(23676004)(6486002)(230700001)(6666003)(97736004)(4326008)(2950100002)(229853002)(478600001)(81156014)(25786009)(105586002)(53546011)(106356001)(186003)(53936002)(6246003)(68736007)(65826007)(7736002)(16576012)(2906002)(3846002)(36756003)(316002)(6116002)(110136005)(47776003)(65956001)(86362001)(66066001)(65806001)(31696002)(5660300001)(305945005)(16526019)(58126008)(50466002)(386003)(64126003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR05MB1060;H:[10.8.2.85];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) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTJQUjA1TUIxMDYwOzIzOmQ4ekh6dUs0TEgyQ20zSkFNT2pmSmNEM3J5?= =?utf-8?B?cmdpSVBhcldvQjJSZGsyaFZhV3kxNUZ4SjRCTGFTTlJpT3hmYnNiSG5IZTJj?= =?utf-8?B?VGNrVGREWHphcStNM2RmV2pkTkh5MFZJc01sZ3FzOTJjbU00bFNDNEd0THgy?= =?utf-8?B?M2hwTmNhRFJEOE1kVGJZa1RMMk5ZUUhPSnRhUzJOSEtSaW94S3NqS3BVbzc4?= =?utf-8?B?QkRWOGpwOWZoazY4dlRKQ21YdUVnWkxiT200UUM0NnlLM1NwN254RkxrZXJp?= =?utf-8?B?MS9wbnNQNC84eFcxdnJERWxzWHV2RkZtKzZiWElRNzVyTll5cGlMMW9xcmcv?= =?utf-8?B?NGRQTG8zbHVsOEl0c1k0eDVtOEJ4eDJ5K0JsakF5S1dRMXV1eXRVNG5PUTVt?= =?utf-8?B?MjkrS1gzWHZGNGZsZ3Z5citZanR5YVEvQzdIOVVDa0ZiNUErcjJXS2ZUL0hl?= =?utf-8?B?c0dqZE9OMjU5SEJweTZRbUp6c3MvWkQ3TDM3aktFMFIyd3FuYVF6eFlES2lI?= =?utf-8?B?eGJqZXNWSGtraER2ZTZXaHpCUFFXMHhENWFaRnorcjROWkV6ZUtWaVFTZFNl?= =?utf-8?B?YXJFa2lOK3hGSDJLeW44bWFHZUI5VHdPYStUdWxUa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k7bVjq875OgD9JGnGNxsVkOKpYw4CSrNjGv2ubYOYbmtlxqzQFvcdiqx2n3084i+X2lFEVRv0+8pX6Vs=;24:iNbstCZaN8lqrkBpyugpn4zV7oSbvoNjcVEzQFDBz8IkdfsK5tcHyWOxrbjpEK8JC7LCmCDoOeMjH+mKTp4XqL7qffMfMrQTX4ExaOSDImw=;7:aLXAQL8iXPxbzdL/q+Wv9jXSe6oAe/PfmV1BWzC9KU/JF373321WsDDHtzqA/vJTkFj/vG8WLpOPxBbJWn4zx4CbMs+resLI7M7yxuP0X3uvdRiCl8jkEvGUp+nGHywLPiJDMFfvLVPvMwE2Az5ADkZZBj7dzsg0syRM+V7vPm/ajY/VgbM07IIbGNDW9Bsd5ifCP389Jeev1/sCMr5DlKt7Rb5U1Mdk1vuz9f6BthSh19L1oodOl1o4Ndh3RnC4 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2018 07:28:32.3829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3ddf837-4cba-4af8-d65e-08d58ca1dad4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR05MB1060 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/16/2018 4:59 PM, Hal Rosenstock wrote: > On 3/15/2018 10:37 PM, Honggang LI wrote: >> From: Honggang Li >> >> commit f1b65df5a232 ("IB/mlx5: Add support for active_width and >> active_speed in RoCE"). Before this patch applied, the mlx5_ib >> driver set default active_width and active_speed to IB_WIDTH_4X >> and IB_SPEED_QDR. >> >> When the RoCE port is down, the RoCE port did not negotiate the >> active width with remote side. The active width is zero. If run >> ibstat to require the port status, ibstat will panic as it read >> invalid width from sys file. >> >> This patch restores the original behavior. >> >> Fixes: f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"). >> Signed-off-by: Honggang Li > Reviewed-by: Hal Rosenstock Reviewed-by: Noa Osherovich > >> --- >> drivers/infiniband/hw/mlx5/main.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c >> index 033b6af90de9..a48e9730fab8 100644 >> --- a/drivers/infiniband/hw/mlx5/main.c >> +++ b/drivers/infiniband/hw/mlx5/main.c >> @@ -388,6 +388,9 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, >> if (err) >> goto out; >> >> + props->active_width = IB_WIDTH_4X; >> + props->active_speed = IB_SPEED_QDR; >> + >> translate_eth_proto_oper(eth_prot_oper, &props->active_speed, >> &props->active_width); >> >>