Thread (23 messages) 23 messages, 4 authors, 2021-04-23

Re: [PATCH net-next 12/14] net: ethernet: mtk_eth_soc: reduce unnecessary interrupts

From: Ilya Lipnitskiy <hidden>
Date: 2021-04-23 04:20:39
Also in: linux-arm-kernel, linux-mediatek, lkml

On Thu, Apr 22, 2021 at 9:26 AM Jakub Kicinski [off-list ref] wrote:
On Wed, 21 Apr 2021 21:09:12 -0700 Ilya Lipnitskiy wrote:
quoted
@@ -1551,8 +1551,9 @@ static int mtk_napi_rx(struct napi_struct *napi, int budget)
              remain_budget -= rx_done;
              goto poll_again;
      }
-     napi_complete(napi);
-     mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
+
+     if (napi_complete(napi))
+             mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
Why not napi_complete_done(napi, rx_done + budget - remain_budget)?
(Modulo possible elimination of rx_done in this function.)
No reason, I think. Thanks for pointing it out. I will clean up both
TX and RX NAPI callbacks to use napi_complete_done and to get rid of
that ugly goto...

Ilya
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help