Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3553919pxj; Mon, 21 Jun 2021 01:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdQVDCi01feI4azvGP9wdUPN/eK6rbzCVImJPIkT42ahXgmaP1giCXYeL+qnoZHogowvXJ X-Received: by 2002:a05:6402:4396:: with SMTP id o22mr19549007edc.15.1624262561985; Mon, 21 Jun 2021 01:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624262561; cv=none; d=google.com; s=arc-20160816; b=yk5ALuNwpnZXAwmbx1DmmV0RfC5x5CJZDGHjO3kQlP7aJX2IyFzqvVCOEbXBj82YaI W9wkbnrhRS0L2eGsJJn0R8erMtvlVWM8t+JMdWlrw32aOF7mODo5HuFmeES08NLiE9gd 6xkjnIXrtW13Is0gqh9J+UnW+FCFKJlz/fiaA1mRsez+pHeNq09RpDPKa+BGA5MRTCgp /pkTbU1maFroJo97eWkHBmmFXBeYO0V/9skhs40STYbulfG6wWtgu2tXyMz/Z85VJwVX 1IHXB0Fb86OD/yBY31sHkCgbWCNYjFNtLVqQp8dDbz3CJGRIM4Gu5f2w2nOsCTIn/LhN B7wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DCO9ZXpEySpCZKEPFhJ5tEQtR+FDw8IPQ1/2vDTN4Cc=; b=z08FlBTwrJ1W0tfCTpgLVf+QUi2UzJ80DzkaB10JKqAxY0lintWjuNtmN0e84Ghhs/ Ik4eJHP3j3nL4LxbqlmMf+qUn66QVz+TikDjrz60Q7Smco/HerS6hCgQOjbiN59sKfhb 5EycUrP9TxQFgmCgGP3TA9/3+xjsWyIFnlVv419vMGkqXm/02HGi6WUivarAzo+yh7NW UBwKdu+oDrO5AQ8b5fP+SnSzOborhTpbRsA3LLyWlA9nC+fp7R4TFM4msVph5D2KwE1u gS09cE7daNE76YwHcGauBN5pnC2dY6au7zV+5OyGckNGtwudI0Z5eK05BClH8gYFxk46 CHDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HoNf1YGz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si16198202edr.98.2021.06.21.01.02.18; Mon, 21 Jun 2021 01:02:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HoNf1YGz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbhFUIDY (ORCPT + 99 others); Mon, 21 Jun 2021 04:03:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:51124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhFUIDX (ORCPT ); Mon, 21 Jun 2021 04:03:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F3816109F; Mon, 21 Jun 2021 08:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624262469; bh=gPO/dZoq96/4oBsyGc1ThSkFDnPfX3ZoVFD1snea8ck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HoNf1YGzRXgmHTU0loB2T4/SVEkLSsgPC2LdgggESiQ/uR8KVA7Vc9FK+lMaTqEn3 LCRUsDfVsGZ96ib/C5wbKl9kCzUcPfOYfn/MEH75lKXjG2Zm/TiV6awVNAKtdtCTM6 JwR+eb3iepOdUsq7+qZp6+Ls9y2fPIbHlDgID+r0bqzE4Jpkh2E75XwNcCxIwPGCvD S6QIF89nU708IuCQcUBIQ/f3kUCMfYrUZTabOAvyNZLYAiz2pe+PADAE3lLRajHYDg VuEVdVy4jo0EFD+c3bqZ4hMTpFn+OiBNEuhL+eZpl0rb6ax5Culn7vFTzt6buowbaw eKMm/dci8g3Mg== Date: Mon, 21 Jun 2021 11:01:06 +0300 From: Leon Romanovsky To: Nitesh Narayan Lal Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-pci@vger.kernel.org, tglx@linutronix.de, jesse.brandeburg@intel.com, robin.murphy@arm.com, mtosatti@redhat.com, mingo@kernel.org, jbrandeb@kernel.org, frederic@kernel.org, juri.lelli@redhat.com, abelits@marvell.com, bhelgaas@google.com, rostedt@goodmis.org, peterz@infradead.org, davem@davemloft.net, akpm@linux-foundation.org, sfr@canb.auug.org.au, stephen@networkplumber.org, rppt@linux.vnet.ibm.com, chris.friesen@windriver.com, maz@kernel.org, nhorman@tuxdriver.com, pjwaskiewicz@gmail.com, sassmann@redhat.com, thenzl@redhat.com, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com, sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, jkc@redhat.com, faisal.latif@intel.com, shiraz.saleem@intel.com, tariqt@nvidia.com, ahleihel@redhat.com, kheib@redhat.com, borisp@nvidia.com, saeedm@nvidia.com, benve@cisco.com, govind@gmx.com, jassisinghbrar@gmail.com, luobin9@huawei.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, nilal@redhat.com Subject: Re: [PATCH v1 14/14] net/mlx4: Use irq_update_affinity_hint Message-ID: References: <20210617182242.8637-1-nitesh@redhat.com> <20210617182242.8637-15-nitesh@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617182242.8637-15-nitesh@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 02:22:42PM -0400, Nitesh Narayan Lal wrote: > The driver uses irq_set_affinity_hint() to update the affinity_hint mask > that is consumed by the userspace to distribute the interrupts. However, > under the hood irq_set_affinity_hint() also applies the provided cpumask > (if not NULL) as the affinity for the given interrupt which is an > undocumented side effect. > > To remove this side effect irq_set_affinity_hint() has been marked > as deprecated and new interfaces have been introduced. Hence, replace the > irq_set_affinity_hint() with the new interface irq_update_affinity_hint() > that only updates the affinity_hint pointer. > > Signed-off-by: Nitesh Narayan Lal > --- > drivers/net/ethernet/mellanox/mlx4/eq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c > index 9e48509ed3b2..f549d697ca95 100644 > --- a/drivers/net/ethernet/mellanox/mlx4/eq.c > +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c > @@ -244,9 +244,9 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec) > cpumask_empty(eq->affinity_mask)) > return; > > - hint_err = irq_set_affinity_hint(eq->irq, eq->affinity_mask); > + hint_err = irq_update_affinity_hint(eq->irq, eq->affinity_mask); > if (hint_err) > - mlx4_warn(dev, "irq_set_affinity_hint failed, err %d\n", hint_err); > + mlx4_warn(dev, "irq_update_affinity_hint failed, err %d\n", hint_err); > } > #endif > > @@ -1124,7 +1124,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev) > if (eq_table->eq[i].have_irq) { > free_cpumask_var(eq_table->eq[i].affinity_mask); > #if defined(CONFIG_SMP) > - irq_set_affinity_hint(eq_table->eq[i].irq, NULL); > + irq_update_affinity_hint(eq_table->eq[i].irq, NULL); > #endif This #if/endif can be deleted. Thanks, Reviewed-by: Leon Romanovsky