Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3755673pxj; Mon, 21 Jun 2021 06:02:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0DNk7N7Aq6hbh2YREs9qly3EELYxgTI8GTDPMAh+eGFbTroU045zL2yomFahbu9FIu+nu X-Received: by 2002:a05:6402:1777:: with SMTP id da23mr7390449edb.72.1624280527711; Mon, 21 Jun 2021 06:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624280527; cv=none; d=google.com; s=arc-20160816; b=tTloQO3p9hHjq2jJifbHa6TQZQDqG3xVTCdvyXz9xOWrDXEoJZK2EQAm4dCv4chsbk O3ozk+I//ZdqyRBypgiFH9iLRZyBlj8Oc95f3LfukLqUjKWnY98Oka8LXrjyoAnETKdX LqSea5HktYc4HJ+BqL8h9gWDUMh6YQrwG2jRpgWv0BdnU82jzDQvK+z3I+wMrrhqzGOv WVIyITwb6zd1uk1M9RrguwJ8oYPv3Ng/tW5lLrDSNShi15yanpLlsGLs7HvK4TYG1csH wnXWWwO9tQ8EcMU31PCAIAY2y29PKlUUAF0xgwidwNsAESUojZW/sqIm3qOifoGavc1t dNCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+YgUj6PMWgTlE2/zJGxRd3Re9nIIH1KzyMdqnBdCris=; b=hK8brAwfhND0mS8aqE/5zTe8syPy/Ukjzx7hYqHVAiQDh4Vb8UhTcSmu8jg8CSZBls DFHUbAjKghZrUS8ZRwKsf17MNVM/KKrevoincOt9+UBA3o/eMea2rew0xTkrDSJ+XVMY COo5kqMpITzELXB06dHMfptFjsFnC0R18C3e0BrNYQ9RabCkbv7188M7MYHfMBfF+oVh j7LzqSmz942OSviI76sVr2IjXUXuX2rfnRdI0xpDLPNni/tDDuYKUVVppLn3EfIwWgl2 vNCLdu7CG3eH2Koxt1QbgM9rnQRxqSrNqh4zJL+AJd9WQQxH6+pmf5FnXNbFndicboP+ GHbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TDsd6DOq; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si7268187eds.32.2021.06.21.06.01.44; Mon, 21 Jun 2021 06:02:07 -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=@redhat.com header.s=mimecast20190719 header.b=TDsd6DOq; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbhFUNCP (ORCPT + 99 others); Mon, 21 Jun 2021 09:02:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30820 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbhFUNCO (ORCPT ); Mon, 21 Jun 2021 09:02:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624280399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+YgUj6PMWgTlE2/zJGxRd3Re9nIIH1KzyMdqnBdCris=; b=TDsd6DOqYEmNtglxYYf5Zevq8TZimrqE/Bp4N3nwomCTvBY87wEI2NdU67psyTC333oUVS geXjkjhOo4jcv+KYVwtBCaqMIo0Lj7o9mabdNuQH8/CmuQtAUjmokARmRW8ohcwElRajsT t0AbiSZphGnXF6ISQ/cbiFLql63HVv8= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-65-2xZo_P6yPrynCIQo5Od4Dg-1; Mon, 21 Jun 2021 08:59:58 -0400 X-MC-Unique: 2xZo_P6yPrynCIQo5Od4Dg-1 Received: by mail-lj1-f197.google.com with SMTP id v3-20020a2e99030000b0290144dc7b6cf0so9200948lji.2 for ; Mon, 21 Jun 2021 05:59:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+YgUj6PMWgTlE2/zJGxRd3Re9nIIH1KzyMdqnBdCris=; b=fNCcDtUh2z6XKgehNHF61vLUGqKxpsmj33kVIssg9bR9tVUMOnOBqX+egUp5iKfDS1 WawPuNBPE+YaPbkma0oUDWcMYJ3+ERhs2EZekbv3oyGtwjRq42hpL1wnMvJbvbmUefyb UIOcw95gzwOk0duyY9tQdzjlndjMjqA0pop54krwgv8Jn5Zxl+dinad5+IEggm1ftvj/ GvcxaVNLG2ePM2AJMY0YxYS3466Mp2hOAW/zs0IdaGNnnR1VbUSHM5MyPJS/5kmljfcH UUj4hcW7yufFi7kgLnjMg0XwzW74yfyI5630RTE+Yfydxw8woJSFVIV6dvqOn96tIlzo brDA== X-Gm-Message-State: AOAM5311t2KniYfmwDXUaH4tScn/auqb/AiVWX+pn+kEef9+/I5el7p+ ETw6EQHsekJps1D/5NaaBszbkNNq7BQ0dT4gMufUf1mFfqRVud++jlNIVoe0M+z7wKDshcH7dTl cNKnKbXVdqDeripnsKC1Zk6ONdKWABjFVmD/40eMx X-Received: by 2002:a05:651c:211e:: with SMTP id a30mr12543826ljq.14.1624280396487; Mon, 21 Jun 2021 05:59:56 -0700 (PDT) X-Received: by 2002:a05:651c:211e:: with SMTP id a30mr12543807ljq.14.1624280396133; Mon, 21 Jun 2021 05:59:56 -0700 (PDT) MIME-Version: 1.0 References: <20210617182242.8637-1-nitesh@redhat.com> <20210617182242.8637-15-nitesh@redhat.com> In-Reply-To: From: Nitesh Lal Date: Mon, 21 Jun 2021 08:59:44 -0400 Message-ID: Subject: Re: [PATCH v1 14/14] net/mlx4: Use irq_update_affinity_hint To: Leon Romanovsky Cc: Nitesh Narayan Lal , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 4:02 AM Leon Romanovsky wrote: > > 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. > Ack will get rid of them in v2. > Thanks, > Reviewed-by: Leon Romanovsky > -- Thanks Nitesh