lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <341139a9-a2d0-465e-bdd3-bdd009b78589@amd.com>
Date: Tue, 15 Oct 2024 14:50:39 -0500
From: Wei Huang <wei.huang2@....com>
To: "Panicker, Manoj" <Manoj.Panicker2@....com>,
 Jakub Kicinski <kuba@...nel.org>
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

[These question are for both Jakub and Bjorn]

Any suggestions on how to proceed? I can send out a V8 patchset if Jakub
is OK with Manoj's solution? Or only a new patch #4 is needed since the
rest are intact.

Thanks,
-Wei

On 10/11/24 13:35, Panicker, Manoj wrote:
> [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

Powered by Openwall GNU/*/Linux Powered by OpenVZ