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] [day] [month] [year] [list]
Date: Fri, 8 Dec 2023 09:27:44 +0000
From: Justin Lai <justinlai0215@...ltek.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "andrew@...n.ch"
	<andrew@...n.ch>, Ping-Ke Shih <pkshih@...ltek.com>,
        Larry Chiu
	<larry.chiu@...ltek.com>
Subject: RE: [PATCH net-next v13 01/13] rtase: Add pci table supported in this module

> 
> On Wed, 6 Dec 2023 03:28:32 +0000 Justin Lai wrote:
> > > > +static void rtase_remove_one(struct pci_dev *pdev) {
> > > > +     struct net_device *dev = pci_get_drvdata(pdev);
> > > > +     struct rtase_private *tp = netdev_priv(dev);
> > > > +     struct rtase_int_vector *ivec;
> > > > +     u32 i;
> > > > +
> > > > +     for (i = 0; i < tp->int_nums; i++) {
> > > > +             ivec = &tp->int_vector[i];
> > > > +             netif_napi_del(&ivec->napi);
> > >
> > > NAPI instances should be added on ndo_open()
> >
> > Do you want me to call netif_napi_add() in the .ndo_open function, and
> > netif_napi_del() in the .ndo_stop function? However, I saw that many
> > drivers do it in probe and remove. What is the purpose of doing this
> > in .ndo_open and .ndo_stop?
> 
> They will sit in a fixed-size hash table used for NAPI lookup in the core. Not a
> big deal, but not the best way either.
> 
> I think the main thing that prompted me to ask was that I couldn't find
> napi_disable() in the first few patches. You should probably call it on close,
> otherwise making sure NAPI is not running when you start freeing rings is hard.
> synchronize_irq() will not help you at all if you're using NAPI.

Thanks, I will call napi_disable() on close to fix this issue.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ