From patchwork Tue Mar 24 21:52:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C6B4C10DCE for ; Tue, 24 Mar 2020 21:53:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53A1020836 for ; Tue, 24 Mar 2020 21:53:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="oydI8/DD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728343AbgCXVx0 (ORCPT ); Tue, 24 Mar 2020 17:53:26 -0400 Received: from mail-vi1eur05on2072.outbound.protection.outlook.com ([40.107.21.72]:6069 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728207AbgCXVxZ (ORCPT ); Tue, 24 Mar 2020 17:53:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yhwd8W4oilGv3sD299YztDIjxgun6kS9MkMKQT4PUneWDXEFoZ9T+Iw5L/3qdS18t9h7a5WprSNnXD2NSwZ9G5gKgL6mVYgV3lhgyN0GaRewUGAzVKmqp1icqtq18+zpGmEWJkPAQ5V37PgfenhAKGNb9RtV/8he8ghxVnVV5w6X8kSEiCSGqWF1fMar+D7KxL+jXJbsY7JpO9HdumQK30t8PP9wvziVD6YSzfJgHONN1TZ1oFEfAUNIH9Clx4AOebta9bI3WKXjMFWdzDfg+AskDsCYbdMrv086rEU8p5tCsaV7Z5X27zgBB/hYK4eYM8J7Rzupfd4rCN791cNVtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o8OoDl9mMuu9xHp1xrhbqk/3auaTqCKUadzXMfflskQ=; b=HWlz0cnUHiOsRy5YZwE22KxIA83He3SYhaCs/7h0FWOlKli+5SzVLiYfdAmUAP0zbxu9WReA3p2i8XiEQKpznp2SeRh5HKnzLmdAywNbrue/hTSdYZcfjyEeOqJCWbZfo2GIeu7+NPyz4Ep7PDq1zqGInCZ2Yc7qVbIAZoqB87aMc6Q6OmYcx5g6nyI4iuhWjXoT8tn1YzLhV6xYuVnS59qbLmrpfZCUY4oMrKvzO82sJ2OsuTlP2MCXsW3UImbUvB/lXXJk0CK9fQqTb3Gg4jSCtC+ATufC9fsle96MCdU2a4uzwwNpqfMPKN1skd/rdSwXnxokcAms3RdPdMP6wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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:X-MS-Exchange-SenderADCheck; bh=o8OoDl9mMuu9xHp1xrhbqk/3auaTqCKUadzXMfflskQ=; b=oydI8/DDiB3CZ7eVq0fFfscwRhbsCHPP3vlu35Txcha2AsryPjqOI38AvRWhLvLLGpHVVzZrLAxX7C2C5JeJp4UGv91pQKQfumQ7xRRovde4MoxYr80PXxLEpxwRgjCuJxbD+cgd6eX07ci05Z8qnkKAfF3sVeSESqT9nzMaYCo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (20.177.51.151) by VI1PR05MB4973.eurprd05.prod.outlook.com (20.177.52.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Tue, 24 Mar 2020 21:53:22 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2%7]) with mapi id 15.20.2835.023; Tue, 24 Mar 2020 21:53:22 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, kuba@kernel.org, Leon Romanovsky , Saeed Mahameed Subject: [net 1/5] net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure Date: Tue, 24 Mar 2020 14:52:53 -0700 Message-Id: <20200324215257.150911-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324215257.150911-1-saeedm@mellanox.com> References: <20200324215257.150911-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Tue, 24 Mar 2020 21:53:20 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f2a4e49b-ea60-4460-314a-08d7d03dc548 X-MS-TrafficTypeDiagnostic: VI1PR05MB4973:|VI1PR05MB4973: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 03524FBD26 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(6666004)(107886003)(54906003)(8936002)(2616005)(16526019)(8676002)(81156014)(86362001)(956004)(36756003)(6486002)(81166006)(186003)(66946007)(6512007)(52116002)(2906002)(5660300002)(6916009)(66476007)(66556008)(316002)(26005)(6506007)(966005)(478600001)(4326008)(1076003)(54420400002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4973; H:VI1PR05MB5102.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bHezUHO1hArYx9IyB3WbOkZH/kIk7sIaK62yGD2P1ZULJSepRl4olZY31vrd+D023RfOJXpCO4Jrw951n+W/F3BOK4GTeZpvzeE/+zsH0Cl+ZFbdgSSi4AUBp1l0kV6c1XCvJ6N5eHkGlACGlvf58Op781B33HZlxkSqYLT0KfQDOVTdYm1qSiBn94gwfGiFk8M2O5q7bE5gvkP28tiI5Uhkhyw5yhYdMUXODFJK7cSLNjcoUZkWaiVk7OoYa49m+wmQHnKu217pBZ/rap6mOPibwqtbl9VT6UYo702PhfMPdUXs6RDPfg8M2VVoAsNaUlYCTcTC7eenU/odaAwQzYtllEGqFrPsP+xWiey5fTSsQowQ8zIvBjv9nM7+c0prk/Gtd2J+5tnhZdhd+kA3m+C6y2ZDzeg7h2SQzz6GqtwuVwTprMlzhsYopwPwbMkJbMJF4bFpHBLc6WxNxwcaMoWIKIp0rLQkwvNiVKzG8hZniP+G1u9aGo82xNbpLAYjKZoLgXabVK9982Ud1fzdNxuawo9CqZE7gZcbkdmYx/KYZ/8Iv+CKTIL8+UH88ksA/MJju0E6L89Nxhtbsq3dC0CzXrNeDc9ipbR9ok2Fg3E= X-MS-Exchange-AntiSpam-MessageData: fukUTtqM75gXNj4qQGMsw5g/rh7nPlUgKfycUH1wGyzK2/C0XVyaNA/VYRRAWdt5baCoUxaNe1mHkUQJjbTvUQ2YzuEu0Tql76h1hJGT6CSYEP4FL5kvo3p4ZLHaaTeqE//zKtumHnljLuzPUr2kLw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2a4e49b-ea60-4460-314a-08d7d03dc548 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2020 21:53:21.9448 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JdejJCxrm6oU5x/rffwcWX6gHi0iXW6H7K4MiGAGt8O5bIFEqowprK/0MvAoQrNFcN3Rh+lA78O49RVI0tVztw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4973 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky The cap_mask1 isn't protected by field_select and not listed among RW fields, but it is required to be written to properly initialize ports in IB virtualization mode. Link: https://lore.kernel.org/linux-rdma/88bab94d2fd72f3145835b4518bc63dda587add6.camel@redhat.com Fixes: ab118da4c10a ("net/mlx5: Don't write read-only fields in MODIFY_HCA_VPORT_CONTEXT command") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index 1faac31f74d0..23f879da9104 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -1071,6 +1071,9 @@ int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev, MLX5_SET64(hca_vport_context, ctx, port_guid, req->port_guid); if (req->field_select & MLX5_HCA_VPORT_SEL_NODE_GUID) MLX5_SET64(hca_vport_context, ctx, node_guid, req->node_guid); + MLX5_SET(hca_vport_context, ctx, cap_mask1, req->cap_mask1); + MLX5_SET(hca_vport_context, ctx, cap_mask1_field_select, + req->cap_mask1_perm); err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out)); ex: kfree(in); From patchwork Tue Mar 24 21:52:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221932 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2FE0C54FCF for ; Tue, 24 Mar 2020 21:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8707320735 for ; Tue, 24 Mar 2020 21:53:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="lNSbUdDk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728368AbgCXVxa (ORCPT ); Tue, 24 Mar 2020 17:53:30 -0400 Received: from mail-vi1eur05on2072.outbound.protection.outlook.com ([40.107.21.72]:6069 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727613AbgCXVxa (ORCPT ); Tue, 24 Mar 2020 17:53:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AsZPq8e51vr/5HcoRbaC7sJThmmqKseXubff8Tm34tYzwpWWgy6JmhL7532XCaEPGKFVZLLqmGEXQUniK5sAncHDXBLqcJTXxLPq881tJfWseFff5LZNJ643v+XAd5u/xFKLpxUKMUmPblgK4u81Q+OeCauAwUKflyyi+ikRKvbnRaiSKi9z6NSmUAdnJcoei1PR6zzT4KXM0iVnUjgjDKyUM5tNaSMrDDQTQhT35jDq2S5LFYoyjHRYhLZ23RxhPUfnYd5OcVcozBF+7HB81Ywm3Xp9iaGff/00W4Dknrui233PvOP7FLLCA09YxDBfE0GIZf22medbW87fmEhK+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hgu+cGiHeq7g1OLb6fJhF9t4RyU9XMMNxv7ctjvE0J8=; b=XK1/29UaGjOovyq9wSSQdQmnbcWNGbbN/lWrNkP20MYzGyO1oPjKruBU7n5q7U7RHhybOVNcFetasgUxL03HHwFhX3t1zaHN2syXAiOlyAWKhK3uqhZ5ib0aWuxw8IveWCHmzwSfMGHqxWHz99zi3jBPhgBNv7p+YN6OmhhJQ8VulpgePWRJ66Uh+/P2uZETBCaXdHKJHnaSNnabph1fsLeAxnBH+M4fCs21poolQdB/Webk6axcQPALGZQpt7C7o7m8l+n5sBm0gfDgc8/Cybsmbx8I3f4l9Zraz/xQVyGNBFc9NBweNed2OdA/JTxoi6lmZWlmTDwnkWHYXIPfIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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:X-MS-Exchange-SenderADCheck; bh=Hgu+cGiHeq7g1OLb6fJhF9t4RyU9XMMNxv7ctjvE0J8=; b=lNSbUdDkSC1ykN+GQUIrS9Kx6oaajGJ2oAo5+DzSRy6ySUZMSjLPgp2W7H2ZnhRFZAEECrW4j9Ss9aa4nSv/CmWaPjc912XiPMgALt4uh5p4SK0GbqWurqulPusjx2iyO9O57i63r5o9RIn1O/1hKjvmbVm4i2S8R0iVg5FrR0Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (20.177.51.151) by VI1PR05MB4973.eurprd05.prod.outlook.com (20.177.52.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Tue, 24 Mar 2020 21:53:26 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2%7]) with mapi id 15.20.2835.023; Tue, 24 Mar 2020 21:53:26 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, kuba@kernel.org, Aya Levin , Tariq Toukan , Saeed Mahameed Subject: [net 3/5] net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset Date: Tue, 24 Mar 2020 14:52:55 -0700 Message-Id: <20200324215257.150911-4-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324215257.150911-1-saeedm@mellanox.com> References: <20200324215257.150911-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Tue, 24 Mar 2020 21:53:24 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 322b5fed-b5a7-4313-b424-08d7d03dc7e1 X-MS-TrafficTypeDiagnostic: VI1PR05MB4973:|VI1PR05MB4973: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 03524FBD26 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(6666004)(107886003)(54906003)(8936002)(2616005)(16526019)(8676002)(81156014)(86362001)(956004)(36756003)(6486002)(81166006)(186003)(66946007)(6512007)(52116002)(2906002)(5660300002)(6916009)(66476007)(66556008)(316002)(26005)(6506007)(478600001)(4326008)(1076003)(54420400002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4973; H:VI1PR05MB5102.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TwN+VpXrKEz4I010TDp/wY4MnJ6o4+7CKPscZdA4Bz+LXcHgvl2dTx2T5pI6SUw4KeptybQybUQrfUqwhGEOJ/hV7N74Yh2rfizNeYhVa8EDgUyDBzK4HYQAC1m2qSFlHUkWvwqJIWaw2LcY6fnI0eM7gPhA2/626/nMLMtB64MqY/WtX155KFUdGWhzUQ7ss5+aOWbOVsAG0YZpkCks/ldXmWlEiUEE0Fr6ITCj1HxnMSLEF81/YgDZIdzqYUp/tNQpeemixZTRHHdZMGJbb2yKPTxUoOvETtbihtXiXkvBK9vPKOThLwvss1y49Z+wWoI909z4wT6+8cR+MnMVk+Ycdlh2KNPXFDjYeksIZwbhln6cSV/4oT7Q5dp3lZdmJa6sWJaOTWiQxTW11BSh5FiNOCGarYOA13PWima421iMAtnjawGrhCqGQxkIJtNY6kJlm2uwtEKRq0mey0sFuJ2OAfSQz1qKIXg9SYMern+5iU95pEv98KgX/AbwLpNfbLzAwpYOwzU1w+obS+89xy2hCo1lTni3J33xui8VrIE= X-MS-Exchange-AntiSpam-MessageData: C9IQ6Amy0oHJUeNYEkykb4XfDPSrs63Dn6tW53Nf7vw9HwfbeiWa4X7WZcKDp0ExqVXwbuRaLbFL2MS+k5r7WelUmNRE+PZreEDhhlXwcCRSdoWSVp0UkffmbjE05K4l2UZBqk6d+fDufTbVtrO8pQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 322b5fed-b5a7-4313-b424-08d7d03dc7e1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2020 21:53:26.3263 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MZnRBOasThwftZdwoxKzC1jOC7wkzXEd8CleVPbyGlwlhVYzfawajdHxoyrpx8NbZ23IA6K1oB4/4ntjpWeLKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4973 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Aya Levin When resetting the RQ (moving RQ state from RST to RDY), the driver resets the WQ's SW metadata. In striding RQ mode, we maintain a field that reflects the actual expected WQ head (including in progress WQEs posted to the ICOSQ). It was mistakenly not reset together with the WQ. Fix this here. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h index a226277b0980..f07b1399744e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h @@ -181,10 +181,12 @@ mlx5e_tx_dma_unmap(struct device *pdev, struct mlx5e_sq_dma *dma) static inline void mlx5e_rqwq_reset(struct mlx5e_rq *rq) { - if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) + if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) { mlx5_wq_ll_reset(&rq->mpwqe.wq); - else + rq->mpwqe.actual_wq_head = 0; + } else { mlx5_wq_cyc_reset(&rq->wqe.wq); + } } /* SW parser related functions */ From patchwork Tue Mar 24 21:52:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC90AC10DCE for ; Tue, 24 Mar 2020 21:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B10902070A for ; Tue, 24 Mar 2020 21:53:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="qlB3qA2i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728405AbgCXVxf (ORCPT ); Tue, 24 Mar 2020 17:53:35 -0400 Received: from mail-vi1eur05on2072.outbound.protection.outlook.com ([40.107.21.72]:6069 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728241AbgCXVxe (ORCPT ); Tue, 24 Mar 2020 17:53:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TThkg5MozFVzHKUt4PouoNc5yxmVjTIZKnXJBCW5JH6REDfnKGSKXdeXT+ynXmAiy2ZubMx1xWWaZNqSVfmIotoV/C4VC6f6PnXQ+b4wD3wEwKJmxJuzXF23yRude23zj9Qptdn1deGAMU8uQ07k8SSrekGmOEuYdw8sllgzaNbL47JnD9lZydZzRN3OPzyciXqSPgU8tV4Qaxl0zQGFVnWKAh19KXuWlZoOAsvaIPV9lg4uuWA3nTGLtHZwux47iDMkqsqge79PyJb0ssDFHwpHaJw2cI/xr7kla4FyACv7Mv/TaxCP8/Tlke/yaxkqNHH+lyCwRfXLyvlf4xR4iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mOID2ZpcsiL3J6u7frxJzH+vBdAWXDSUchhBQnGzOh0=; b=QWxoLoE23aHnfsrok1vEN0QstjuZDGg6MtGU72FtEpsy74IxKlAwB0bBuxVox/oSf8ZmDmLjGXxIQBtBXBcV/kjhWGSBP9CwbL/UQkzOhYkhFLv+aUMcBy7AoJxtPy81VChG+8RcmjR29poM6plDCDHJXMV/XST57CNm9t3a0OVsUycqTTRbJalp0fwI5leAwBUivOgIolp7dNqjl+TLpK+NUss7hvPiTOw6BIC7tK6dRWG3G+MPj+6fOaYWpWs86zsmxqenmBtzQwYveijnQwwP8R5uOUT7WQWSFANW96mhLZlRl6rImLnIyRf7RDJexJcn0LiXBlqeRUDWv9J4xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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:X-MS-Exchange-SenderADCheck; bh=mOID2ZpcsiL3J6u7frxJzH+vBdAWXDSUchhBQnGzOh0=; b=qlB3qA2iQTqLZF2fuNbNLURhRajeC2VyirOIU2+FlE5H6mghjRHwIm4ykM3P6+CvVBWWrbbKTqvdwQMxC5iUbkqND8NhzChfGNeMvEqOq+nx8tzu3y7KNdD9EysL1nSwvQaqIP57VFHSGVrDOaGBnA+DJk4EnoZGERVvAapQv3g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (20.177.51.151) by VI1PR05MB4973.eurprd05.prod.outlook.com (20.177.52.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Tue, 24 Mar 2020 21:53:31 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::8cea:6c66:19fe:fbc2%7]) with mapi id 15.20.2835.023; Tue, 24 Mar 2020 21:53:31 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, kuba@kernel.org, Aya Levin , Tariq Toukan , Saeed Mahameed Subject: [net 5/5] net/mlx5e: Do not recover from a non-fatal syndrome Date: Tue, 24 Mar 2020 14:52:57 -0700 Message-Id: <20200324215257.150911-6-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324215257.150911-1-saeedm@mellanox.com> References: <20200324215257.150911-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0049.namprd06.prod.outlook.com (2603:10b6:a03:14b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Tue, 24 Mar 2020 21:53:28 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cc8bc26b-d507-4107-2d63-08d7d03dca88 X-MS-TrafficTypeDiagnostic: VI1PR05MB4973:|VI1PR05MB4973: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 03524FBD26 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(6666004)(107886003)(54906003)(8936002)(2616005)(16526019)(8676002)(81156014)(86362001)(956004)(36756003)(6486002)(81166006)(186003)(66946007)(6512007)(52116002)(2906002)(5660300002)(6916009)(66476007)(66556008)(316002)(26005)(6506007)(478600001)(4326008)(1076003)(54420400002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4973; H:VI1PR05MB5102.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KuhQWy8mABrRKr5tiDg/wW9+ezzJNSq3J3hmL8EnZhiqJmH9+d8GWpe6RTaAb8kGR+Ms8SUqcMSGbuxAQ7Kdv/wMnbBquowWoAWHy0JIQnPn/wUdio9VTUymG/ZeBNsLuCq08WY4c6plnXryUq0gD9EHHUKEP5nneip5anHJcf51MJDjEO8dmh4xTtduU3dz8Hw0msxQnv5jbWewrG29U5iFMPCTtUB+B6W6Vq6YFMxOk2TZHDmH75xO2eznk9vPtbCTAW7HsIBWhL1s8T5nWe+NQAggnkVjbWKqkTMprDU7MRSDaWabZ7Kz56L1G4m1WjaHOAMqKfg/hQ3hxD15tGXvQDNkHyi/6yPGrdHujQycDvb6nmNzLX+dYqUt0ZYJVghbKzFFgzS3alKASS8Xy7/G94QSJWDy/BX9bCHOzVk55aozKn8pkqIv5Vn/Pbo5dDGFtyxbJPHkXudq9T3gsin3k6ZgUHkdM/QFV+f5qC0mFLmlI/DFGA71QS5gyMVX3KdZWhYicg4WPayx3B05OH/iC2XYasPjXenBnJkesmA= X-MS-Exchange-AntiSpam-MessageData: z2Q9pz7LIj29wSOS4XDd0K1MxJWgljp6NlNmiJbRposN2eNR6V6zwKo27gfFziQj+21IUd2sdC7QCUkvD2WztdZW4ocWlWwryk4ruEoGMet8R5bMhzFygM1NoLzA2D+4/figmfbOFjIzzEd+pFCYiw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc8bc26b-d507-4107-2d63-08d7d03dca88 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2020 21:53:30.9247 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vK2+SBXqz+HC+y6upZOFZR/GdxefFRUl2Vpvfv8JGlU2YL6UqovwRVyPHLOuD4eeXkFUew+42TpHN9tbJmJG/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4973 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Aya Levin For non-fatal syndromes like LOCAL_LENGTH_ERR, recovery shouldn't be triggered. In these scenarios, the RQ is not actually in ERR state. This misleads the recovery flow which assumes that the RQ is really in error state and no more completions arrive, causing crashes on bad page state. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/health.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.h b/drivers/net/ethernet/mellanox/mlx5/core/en/health.h index d3693fa547ac..e54f70d9af22 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.h @@ -10,8 +10,7 @@ static inline bool cqe_syndrome_needs_recover(u8 syndrome) { - return syndrome == MLX5_CQE_SYNDROME_LOCAL_LENGTH_ERR || - syndrome == MLX5_CQE_SYNDROME_LOCAL_QP_OP_ERR || + return syndrome == MLX5_CQE_SYNDROME_LOCAL_QP_OP_ERR || syndrome == MLX5_CQE_SYNDROME_LOCAL_PROT_ERR || syndrome == MLX5_CQE_SYNDROME_WR_FLUSH_ERR; }