Re: [PATCH V11 net-next 07/10] net: hibmcge: Implement rx_poll function to receive packets

From: Jijie Shao
Date: Wed Oct 09 2024 - 21:05:07 EST



on 2024/10/10 5:42, Joe Damato wrote:
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:
+
+ 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.

It's okay. Thank you for reviewing the code.


Jijie Shao.