Received: by 10.213.65.68 with SMTP id h4csp1678704imn; Mon, 19 Mar 2018 10:20:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELvgyF8yTvlbCsAy3fVriX0syoGOHMDT6+0mouuk2nqcIdQ45iCDzLMPaThXjewZzl/uL4cn X-Received: by 10.99.183.67 with SMTP id w3mr9662305pgt.153.1521480004473; Mon, 19 Mar 2018 10:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521480004; cv=none; d=google.com; s=arc-20160816; b=gxbd6kIWWCVT/Yfw8v6haylMb71a+VyN3v2X75aeZCtnbip+ijPt9YEVPmpSvwAQtk I9FfIMLNsiqYdo9Gk4lVu3LH0J0KgcGP4YuapX6sOfJxxHcA69+KP5FnV4IdEtQ83s3y Mim1OSv1kQvhmqn2S70vUJWcCuAiLDLgCotDIWlHE0oe6LlIW2s2J3RRgDOIyh71FsUW FIpDBbCTzUsLCqBYtcl1WUtZfln3T4kDJ9MHCJEJgLflzCZNNmU++Z7N/sIKA/h1KwKH gW+mpRJpIW73AC80WUvKuy81RcqQo5+oRx1bL17rZkVjQ6jlHmrk+31hxV7v3g0+ZT5w kJMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FZ67R+tGJRvPoou4U7njEzLXvAfbBRavtMsTKXenW8g=; b=J6nPSNvMjAnNhXUzDXlrZiQv0v3fK9ztR/oEeWXZiaLPjEGjF1hWLVf+EzQse/VhRy Doh+jBUefp/O7fD6q7uVKJDknPwcZvsSUniuXVfV9ym4pxDWXubb0aiki3Uj1D2eTyt2 c5EemmPtMbowZnqZVT3hoXBsYkWt8675wAY5isFIBqFSFy8fT8mzNY90DOETzMUikpKz 7Fhi6YGDbnLcTWowRvEgSe/7uiaLhtgzLtk0uuNSihHj0Mw5G6itB4BVlX8WGpXnqU9N IQBJmrBU8rXlF5oRTynszJinrR2FVX+XUIbLdjcMxIXgA35Yd4oazkf9I0sezBE3JF1g fWdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MtdyAh2E; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l73si228761pfj.45.2018.03.19.10.19.50; Mon, 19 Mar 2018 10:20:04 -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=@microsoft.com header.s=selector1 header.b=MtdyAh2E; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966499AbeCSQJm (ORCPT + 99 others); Mon, 19 Mar 2018 12:09:42 -0400 Received: from mail-cys01nam02on0124.outbound.protection.outlook.com ([104.47.37.124]:59524 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966388AbeCSQJD (ORCPT ); Mon, 19 Mar 2018 12:09:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FZ67R+tGJRvPoou4U7njEzLXvAfbBRavtMsTKXenW8g=; b=MtdyAh2EJctqoUxKB6Atk0OvxR7OUAiruCgRnYZf4oTkLVPSncMb6qJgp4FL+WrA9wJVHGfhKbDqgYusP2PMPpZWsk/aIb1+6g9ldmm0jRy7a0DWg6BgaZc2og9lS43Y/0C4Du0hsWDuZt5DYipiUCSnXul1PezycnfJCVWH4JY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0965.namprd21.prod.outlook.com (52.132.133.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:08:55 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:08:55 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Tariq Toukan , "kernel-team@fb.com" , Saeed Mahameed , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 064/167] net/mlx5: Tolerate irq_set_affinity_hint() failures Thread-Topic: [PATCH AUTOSEL for 4.4 064/167] net/mlx5: Tolerate irq_set_affinity_hint() failures Thread-Index: AQHTv5xEfZGoEgS9ZE+f/Ar/Lz4tXw== Date: Mon, 19 Mar 2018 16:06:41 +0000 Message-ID: <20180319160513.16384-64-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0965;7:/kgkYEj21+WsqVM9f2aYX0njxKHJGQhacWKanVmKCpo70wmG7vMo7sayxQXykCYMa8gFgqM28CPM5XNRnu/3a/bWDK+tI3hj1FVkxbHUKxYumuGfHuwEXvIcMbGlUXIUIhD+KKNIIVfFcG8OklPNlyTSW9jJunP85zMF4RDFbmZxdslyHekiu3L25ptSvP+ZGrJry0fg9nbz12lFWOUgJnPa1H5lO6ahINMiKeoYLGypApCJL1F7GgJfF9U54mVD;20:dKdR9oRI8tS7mNxC1gR12oKjrmketU6dt2BBr1GPQkDE5nTlLrS+M3BtwtZSC+K4IjaVTgiqaRGtgws/b0fyRDRG+ja9N8XIFVxNejlzVQJv3O4O7GSTA2Lm1bPdyk2vsewtAYdp1ao0CJ9OflI2XAWK5q+SaKjA3ObaLrY9H2E= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1bd8eceb-4c01-4b6e-a603-08d58db3b76e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0965; x-ms-traffictypediagnostic: DM5PR2101MB0965: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(67672495146484); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0965;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0965; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(396003)(39860400002)(376002)(39380400002)(189003)(199004)(25786009)(7736002)(6506007)(86362001)(575784001)(86612001)(10090500001)(478600001)(53936002)(6666003)(6512007)(36756003)(2950100002)(8936002)(110136005)(54906003)(105586002)(14454004)(107886003)(72206003)(10290500003)(316002)(102836004)(2501003)(59450400001)(5250100002)(99286004)(22452003)(305945005)(6436002)(6486002)(1076002)(76176011)(26005)(4326008)(186003)(97736004)(106356001)(3660700001)(3846002)(6116002)(5660300001)(68736007)(2900100001)(8676002)(81166006)(81156014)(3280700002)(2906002)(66066001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0965;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Elqc+9975RgYMrGmsxUpjQVIFPvUCI0/zZcEcrg+raOjs5F4LK8wqTnwdwhWkc0Fu7+ZsDykpmNmNDXbf0MYcvfMyCor095e/U+x2AEyeqGjR+E7JGZcYI5wzKbz6Et2ubbay/qE2ukOTeNDS0c/w3bCAQRVUHaCUsNe3Qky0S9aSGO47zXwhDdKgWD42ZS/0aUGKEoHqi1MYPY9/wHjT57XKXlJ2Fe02fpowbnWMMeBwPcAYF3WPn1fWzcN5MIviVCwF/O703oJZaG3sXhCqnhFCw3mOEZzKSkUZdiqVMzHsFM42d3C95cD7hXyQUtiV9rrw2LzQoNwZBNHDfmyog== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bd8eceb-4c01-4b6e-a603-08d58db3b76e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:06:41.3884 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0965 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tariq Toukan [ Upstream commit b665d98edc9ab295169be2fc5bb4e89a46de0a1a ] Add tolerance to failures of irq_set_affinity_hint(). Its role is to give hints that optimizes performance, and should not block the driver load. In non-SMP systems, functionality is not available as there is a single core, and all these calls definitely fail. Hence, do not call the function and avoid the warning prints. Fixes: db058a186f98 ("net/mlx5_core: Set irq affinity hints") Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/e= thernet/mellanox/mlx5/core/main.c index f5c1f4acc57b..2aa42dd321e9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -513,7 +513,6 @@ static int mlx5_irq_set_affinity_hint(struct mlx5_core_= dev *mdev, int i) struct mlx5_priv *priv =3D &mdev->priv; struct msix_entry *msix =3D priv->msix_arr; int irq =3D msix[i + MLX5_EQ_VEC_COMP_BASE].vector; - int err; =20 if (!zalloc_cpumask_var(&priv->irq_info[i].mask, GFP_KERNEL)) { mlx5_core_warn(mdev, "zalloc_cpumask_var failed"); @@ -523,18 +522,12 @@ static int mlx5_irq_set_affinity_hint(struct mlx5_cor= e_dev *mdev, int i) cpumask_set_cpu(cpumask_local_spread(i, priv->numa_node), priv->irq_info[i].mask); =20 - err =3D irq_set_affinity_hint(irq, priv->irq_info[i].mask); - if (err) { - mlx5_core_warn(mdev, "irq_set_affinity_hint failed,irq 0x%.4x", - irq); - goto err_clear_mask; - } +#ifdef CONFIG_SMP + if (irq_set_affinity_hint(irq, priv->irq_info[i].mask)) + mlx5_core_warn(mdev, "irq_set_affinity_hint failed, irq 0x%.4x", irq); +#endif =20 return 0; - -err_clear_mask: - free_cpumask_var(priv->irq_info[i].mask); - return err; } =20 static void mlx5_irq_clear_affinity_hint(struct mlx5_core_dev *mdev, int i= ) --=20 2.14.1