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: <Zwb4vlznjquet3DT@LQ3V64L9R2>
Date: Wed, 9 Oct 2024 14:42:22 -0700
From: Joe Damato <jdamato@...tly.com>
To: Jijie Shao <shaojijie@...wei.com>, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	shenjian15@...wei.com, wangpeiyang1@...wei.com,
	liuyonglong@...wei.com, chenhao418@...wei.com,
	sudongming1@...wei.com, xujunsheng@...wei.com,
	shiyongbang@...wei.com, libaihan@...wei.com, andrew@...n.ch,
	horms@...nel.org, kalesh-anakkur.purayil@...adcom.com,
	christophe.jaillet@...adoo.fr, jonathan.cameron@...wei.com,
	shameerali.kolothum.thodi@...wei.com, salil.mehta@...wei.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V11 net-next 07/10] net: hibmcge: Implement rx_poll
 function to receive packets

On Wed, Oct 09, 2024 at 02:35:58PM -0700, Joe Damato wrote:
> On Tue, Oct 08, 2024 at 10:23:55AM +0800, Jijie Shao wrote:
> > Implement rx_poll function to read the rx descriptor after
> > receiving the rx interrupt. Adjust the skb based on the
> > descriptor to complete the reception of the packet.
> > 
> > Signed-off-by: Jijie Shao <shaojijie@...wei.com>
> 
> [...]
> 
> > +
> > +static int hbg_napi_rx_poll(struct napi_struct *napi, int budget)
> > +{
> 
> [...]
> 
> > +
> > +	if (likely(packet_done < budget &&
> > +		   napi_complete_done(napi, packet_done)))
> > +		hbg_hw_irq_enable(priv, HBG_INT_MSK_RX_B, true);
> 
> I am not sure this is correct.
> 
> napi_complete_done might return false if napi_defer_hard_irqs is
> being used [1].
> 
> In that case you'd probably want to avoid re-enabling IRQs even
> though (packet_done < budget) is true.

Err, sorry. I read the code wrong. The implementation you have looks
right to me, my mistake.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ