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: <20140717222906.GA23125@electric-eye.fr.zoreil.com>
Date:	Fri, 18 Jul 2014 00:29:06 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	Sonic Zhang <sonic.adi@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	netdev <netdev@...r.kernel.org>,
	Varka Bhadram <varkabhadram@...il.com>,
	adi-buildroot-devel@...ts.sourceforge.net,
	"Zhang, Sonic" <sonic.zhang@...log.com>
Subject: Re: [PATCH v5] bfin_mac: convert bfin Ethernet driver to NAPI
 framework

Sonic Zhang <sonic.adi@...il.com> :
> On Thu, Jul 17, 2014 at 5:03 AM, David Miller <davem@...emloft.net> wrote:
[...]
> > Please mimick what other drivers do rather than trying to do things in
> > a special way unique to your driver.
> 
> Driver realtek/8139cp.c does things in the same way as the bfin_mac
> NAPI code.

It wasn't your lucky day.

> In net_poll loop, if napi_complete() is called, the EMAC IRQ is
> enabled more times than the it is disabled. This is not a problem to
> drivers which don't call enable_irq()/disable_irq_nosync(). But, the
> IRQ enabling and disabling operations have to be balanced in the
> bfin_mac driver via __napi_complete() to avoid the kernel warning.

Thanks for the explanation.

In order to use plain napi_complete, may I suggest keeping a mask of
bfin_mac_interrupt disabled irq in the device private area then
enable_irq relevant one - if any - in bfin_mac_poll ?

It should keep things balanced.

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ