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: <Zwb3PvG_EjwqMT4v@LQ3V64L9R2>
Date: Wed, 9 Oct 2024 14:35:58 -0700
From: Joe Damato <jdamato@...tly.com>
To: Jijie Shao <shaojijie@...wei.com>
Cc: 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 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.

[1]: https://lore.kernel.org/netdev/20200422161329.56026-1-edumazet@google.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ