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: <20250722154127.2880a12e@kernel.org>
Date: Tue, 22 Jul 2025 15:41:27 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Samiullah Khawaja <skhawaja@...gle.com>, "David S . Miller"
 <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
 almasrymina@...gle.com, willemb@...gle.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v7 2/3] net: Use netif_set_threaded_hint
 instead of netif_set_threaded in drivers

On Tue, 22 Jul 2025 01:21:58 -0700 Eric Dumazet wrote:
> > diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> > index 3a9ad4a9c1cb..ee7d07c86dcf 100644
> > --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> > +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> > @@ -2688,7 +2688,7 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> >         adapter->mii.mdio_write = atl1c_mdio_write;
> >         adapter->mii.phy_id_mask = 0x1f;
> >         adapter->mii.reg_num_mask = MDIO_CTRL_REG_MASK;
> > -       netif_set_threaded(netdev, true);
> > +       netif_set_threaded_hint(netdev);  
> 
> I have not seen a cover letter for this series ?
> 
> netif_set_threaded_hint() name seems a bit strange, it seems drivers
> intent is to enable threaded mode ?
> 
> netif_threaded_enable() might be a better name.

Cover letter or at least a link to where this was suggested would indeed
be useful. I may have suggested the name, and if so the thinking was
that the API is for the driver to "recommend" that we default to
threaded NAPI, likely because the device is IRQ-challenged.
But no strong feelings if you prefer netif_set_threaded_enabled().

Since this is a driver-facing API a kdoc may be useful:

/**
 * netif_set_threaded_hint() - default to using threaded NAPIs
 * @dev: net_device instance
 *
 * Default NAPI instances of the device to run in threaded mode.
 * This may be useful for devices where multiple NAPI instances
 * get scheduled by a single interrupt. Threaded NAPI allows moving
 * the NAPI processing to cores other than the core where IRQ is mapped.
 *
 * This function should be called before @dev is registered.
 */

Since this is just a hint the function should be void. No caller cares
about the return value anyway.

BTW I think we should delete the debugfs file for threaded config
from mt76. debugfs is not uAPI, presumably.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ