[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<MN0PR12MB6174E0F2572E7BFC65EA464BAF792@MN0PR12MB6174.namprd12.prod.outlook.com>
Date: Fri, 11 Oct 2024 18:35:52 +0000
From: "Panicker, Manoj" <Manoj.Panicker2@....com>
To: Jakub Kicinski <kuba@...nel.org>, "Huang2, Wei" <Wei.Huang2@....com>
CC: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
"helgaas@...nel.org" <helgaas@...nel.org>, "corbet@....net" <corbet@....net>,
"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
<edumazet@...gle.com>, "pabeni@...hat.com" <pabeni@...hat.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"gospo@...adcom.com" <gospo@...adcom.com>, "michael.chan@...adcom.com"
<michael.chan@...adcom.com>, "ajit.khaparde@...adcom.com"
<ajit.khaparde@...adcom.com>, "somnath.kotur@...adcom.com"
<somnath.kotur@...adcom.com>, "andrew.gospodarek@...adcom.com"
<andrew.gospodarek@...adcom.com>, "VanTassell, Eric"
<Eric.VanTassell@....com>, "vadim.fedorenko@...ux.dev"
<vadim.fedorenko@...ux.dev>, "horms@...nel.org" <horms@...nel.org>,
"bagasdotme@...il.com" <bagasdotme@...il.com>, "bhelgaas@...gle.com"
<bhelgaas@...gle.com>, "lukas@...ner.de" <lukas@...ner.de>,
"paul.e.luse@...el.com" <paul.e.luse@...el.com>, "jing2.liu@...el.com"
<jing2.liu@...el.com>
Subject: RE: [PATCH V7 4/5] bnxt_en: Add TPH support in BNXT driver
[AMD Official Use Only - AMD Internal Distribution Only]
Hello Jakub,
Thanks for the feedback. We'll update the patch to cover the code under the rtnl_lock.
About the empty function, there are no actions to perform when the driver's notify.release function is called. The IRQ notifier is only registered once and there are no older IRQ notifiers for the driver that could get called back. We also followed the precedent seen from other drivers in the kernel tree that follow the same mechanism .
See code:
>From drivers/net/ethernet/intel/i40e/i40e_main.c
static void i40e_irq_affinity_release(struct kref *ref) {}
>From drivers/net/ethernet/intel/iavf/iavf_main.c
static void iavf_irq_affinity_release(struct kref *ref) {}
>From drivers/net/ethernet/fungible/funeth/funeth_main.c
static void fun_irq_aff_release(struct kref __always_unused *ref)
{
}
Thanks
Manoj
-----Original Message-----
From: Jakub Kicinski <kuba@...nel.org>
Sent: Tuesday, October 8, 2024 6:40 AM
To: Huang2, Wei <Wei.Huang2@....com>
Cc: linux-pci@...r.kernel.org; linux-kernel@...r.kernel.org; linux-doc@...r.kernel.org; netdev@...r.kernel.org; Jonathan.Cameron@...wei.com; helgaas@...nel.org; corbet@....net; davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com; alex.williamson@...hat.com; gospo@...adcom.com; michael.chan@...adcom.com; ajit.khaparde@...adcom.com; somnath.kotur@...adcom.com; andrew.gospodarek@...adcom.com; Panicker, Manoj <Manoj.Panicker2@....com>; VanTassell, Eric <Eric.VanTassell@....com>; vadim.fedorenko@...ux.dev; horms@...nel.org; bagasdotme@...il.com; bhelgaas@...gle.com; lukas@...ner.de; paul.e.luse@...el.com; jing2.liu@...el.com
Subject: Re: [PATCH V7 4/5] bnxt_en: Add TPH support in BNXT driver
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
On Wed, 2 Oct 2024 11:59:53 -0500 Wei Huang wrote:
> + if (netif_running(irq->bp->dev)) {
> + rtnl_lock();
> + err = netdev_rx_queue_restart(irq->bp->dev, irq->ring_nr);
> + if (err)
> + netdev_err(irq->bp->dev,
> + "rx queue restart failed: err=%d\n", err);
> + rtnl_unlock();
> + }
> +}
> +
> +static void __bnxt_irq_affinity_release(struct kref __always_unused
> +*ref) { }
An empty release function is always a red flag.
How is the reference counting used here?
Is irq_set_affinity_notifier() not synchronous?
Otherwise the rtnl_lock() should probably cover the running check.
Powered by blists - more mailing lists