BPF List
 help / color / mirror / Atom feed
* [PATCH net] vmxnet3: unregister xdp rxq info in the reset path
@ 2025-03-20  4:55 Sankararaman Jayaraman
  2025-03-25 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Sankararaman Jayaraman @ 2025-03-20  4:55 UTC (permalink / raw)
  To: netdev
  Cc: sankararaman.jayaraman, ronak.doshi, bcm-kernel-feedback-list,
	andrew+netdev, davem, u9012063, kuba, edumazet, pabeni, ast,
	alexandr.lobakin, alexanderduyck, bpf, daniel, hawk,
	john.fastabend

vmxnet3 does not unregister xdp rxq info in the
vmxnet3_reset_work() code path as vmxnet3_rq_destroy()
is not invoked in this code path. So, we get below message with a
backtrace.

Missing unregister, handled but fix driver
WARNING: CPU:48 PID: 500 at net/core/xdp.c:182
__xdp_rxq_info_reg+0x93/0xf0

This patch fixes the problem by moving the unregister
code of XDP from vmxnet3_rq_destroy() to vmxnet3_rq_cleanup().

Fixes: 54f00cce1178 ("vmxnet3: Add XDP support.")
Signed-off-by: Sankararaman Jayaraman <sankararaman.jayaraman@broadcom.com>
Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
---
 drivers/net/vmxnet3/vmxnet3_drv.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 6793fa09f9d1..3df6aabc7e33 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2033,6 +2033,11 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq,
 
 	rq->comp_ring.gen = VMXNET3_INIT_GEN;
 	rq->comp_ring.next2proc = 0;
+
+	if (xdp_rxq_info_is_reg(&rq->xdp_rxq))
+		xdp_rxq_info_unreg(&rq->xdp_rxq);
+	page_pool_destroy(rq->page_pool);
+	rq->page_pool = NULL;
 }
 
 
@@ -2073,11 +2078,6 @@ static void vmxnet3_rq_destroy(struct vmxnet3_rx_queue *rq,
 		}
 	}
 
-	if (xdp_rxq_info_is_reg(&rq->xdp_rxq))
-		xdp_rxq_info_unreg(&rq->xdp_rxq);
-	page_pool_destroy(rq->page_pool);
-	rq->page_pool = NULL;
-
 	if (rq->data_ring.base) {
 		dma_free_coherent(&adapter->pdev->dev,
 				  rq->rx_ring[0].size * rq->data_ring.desc_size,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] vmxnet3: unregister xdp rxq info in the reset path
  2025-03-20  4:55 [PATCH net] vmxnet3: unregister xdp rxq info in the reset path Sankararaman Jayaraman
@ 2025-03-25 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-25 15:00 UTC (permalink / raw)
  To: Sankararaman Jayaraman
  Cc: netdev, ronak.doshi, bcm-kernel-feedback-list, andrew+netdev,
	davem, u9012063, kuba, edumazet, pabeni, ast, alexandr.lobakin,
	alexanderduyck, bpf, daniel, hawk, john.fastabend

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 20 Mar 2025 10:25:22 +0530 you wrote:
> vmxnet3 does not unregister xdp rxq info in the
> vmxnet3_reset_work() code path as vmxnet3_rq_destroy()
> is not invoked in this code path. So, we get below message with a
> backtrace.
> 
> Missing unregister, handled but fix driver
> WARNING: CPU:48 PID: 500 at net/core/xdp.c:182
> __xdp_rxq_info_reg+0x93/0xf0
> 
> [...]

Here is the summary with links:
  - [net] vmxnet3: unregister xdp rxq info in the reset path
    https://git.kernel.org/netdev/net/c/0dd765fae295

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:[~2025-03-25 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20  4:55 [PATCH net] vmxnet3: unregister xdp rxq info in the reset path Sankararaman Jayaraman
2025-03-25 15:00 ` 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