* [PATCH v2 net-next] net: ethernet: mtk_wed: get rid of queue lock for rx queue
@ 2023-01-10 9:31 Lorenzo Bianconi
2023-01-12 5:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2023-01-10 9:31 UTC (permalink / raw)
To: netdev
Cc: davem, edumazet, kuba, pabeni, lorenzo.bianconi, nbd, john,
sean.wang, Mark-MC.Lee, sujuan.chen, daniel, alexanderduyck
Queue spinlock is currently held in mtk_wed_wo_queue_rx_clean and
mtk_wed_wo_queue_refill routines for MTK Wireless Ethernet Dispatcher
MCU rx queue. mtk_wed_wo_queue_refill() is running during initialization
and in rx tasklet while mtk_wed_wo_queue_rx_clean() is running in
mtk_wed_wo_hw_deinit() during hw de-init phase after rx tasklet has been
disabled. Since mtk_wed_wo_queue_rx_clean and mtk_wed_wo_queue_refill
routines can't run concurrently get rid of spinlock for mcu rx queue.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
Changes since v1:
- improve commit message
---
drivers/net/ethernet/mediatek/mtk_wed_wo.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_wed_wo.c b/drivers/net/ethernet/mediatek/mtk_wed_wo.c
index a0a39643caf7..d32b86499896 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.c
@@ -138,7 +138,6 @@ mtk_wed_wo_queue_refill(struct mtk_wed_wo *wo, struct mtk_wed_wo_queue *q,
enum dma_data_direction dir = rx ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
int n_buf = 0;
- spin_lock_bh(&q->lock);
while (q->queued < q->n_desc) {
struct mtk_wed_wo_queue_entry *entry;
dma_addr_t addr;
@@ -172,7 +171,6 @@ mtk_wed_wo_queue_refill(struct mtk_wed_wo *wo, struct mtk_wed_wo_queue *q,
q->queued++;
n_buf++;
}
- spin_unlock_bh(&q->lock);
return n_buf;
}
@@ -316,7 +314,6 @@ mtk_wed_wo_queue_rx_clean(struct mtk_wed_wo *wo, struct mtk_wed_wo_queue *q)
{
struct page *page;
- spin_lock_bh(&q->lock);
for (;;) {
void *buf = mtk_wed_wo_dequeue(wo, q, NULL, true);
@@ -325,7 +322,6 @@ mtk_wed_wo_queue_rx_clean(struct mtk_wed_wo *wo, struct mtk_wed_wo_queue *q)
skb_free_frag(buf);
}
- spin_unlock_bh(&q->lock);
if (!q->cache.va)
return;
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 net-next] net: ethernet: mtk_wed: get rid of queue lock for rx queue
2023-01-10 9:31 [PATCH v2 net-next] net: ethernet: mtk_wed: get rid of queue lock for rx queue Lorenzo Bianconi
@ 2023-01-12 5:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-12 5:20 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: netdev, davem, edumazet, kuba, pabeni, lorenzo.bianconi, nbd,
john, sean.wang, Mark-MC.Lee, sujuan.chen, daniel,
alexanderduyck
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 10 Jan 2023 10:31:26 +0100 you wrote:
> Queue spinlock is currently held in mtk_wed_wo_queue_rx_clean and
> mtk_wed_wo_queue_refill routines for MTK Wireless Ethernet Dispatcher
> MCU rx queue. mtk_wed_wo_queue_refill() is running during initialization
> and in rx tasklet while mtk_wed_wo_queue_rx_clean() is running in
> mtk_wed_wo_hw_deinit() during hw de-init phase after rx tasklet has been
> disabled. Since mtk_wed_wo_queue_rx_clean and mtk_wed_wo_queue_refill
> routines can't run concurrently get rid of spinlock for mcu rx queue.
>
> [...]
Here is the summary with links:
- [v2,net-next] net: ethernet: mtk_wed: get rid of queue lock for rx queue
https://git.kernel.org/netdev/net-next/c/d4f12a8271fb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-12 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 9:31 [PATCH v2 net-next] net: ethernet: mtk_wed: get rid of queue lock for rx queue Lorenzo Bianconi
2023-01-12 5:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).