Skip to content

Commit 0dd765f

Browse files
Sankararaman Jayaramankuba-moo
Sankararaman Jayaraman
authored andcommitted
vmxnet3: unregister xdp rxq info in the reset path
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: 54f00cc ("vmxnet3: Add XDP support.") Signed-off-by: Sankararaman Jayaraman <[email protected]> Signed-off-by: Ronak Doshi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e1cd42a commit 0dd765f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/vmxnet3/vmxnet3_drv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,11 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq,
20332033

20342034
rq->comp_ring.gen = VMXNET3_INIT_GEN;
20352035
rq->comp_ring.next2proc = 0;
2036+
2037+
if (xdp_rxq_info_is_reg(&rq->xdp_rxq))
2038+
xdp_rxq_info_unreg(&rq->xdp_rxq);
2039+
page_pool_destroy(rq->page_pool);
2040+
rq->page_pool = NULL;
20362041
}
20372042

20382043

@@ -2073,11 +2078,6 @@ static void vmxnet3_rq_destroy(struct vmxnet3_rx_queue *rq,
20732078
}
20742079
}
20752080

2076-
if (xdp_rxq_info_is_reg(&rq->xdp_rxq))
2077-
xdp_rxq_info_unreg(&rq->xdp_rxq);
2078-
page_pool_destroy(rq->page_pool);
2079-
rq->page_pool = NULL;
2080-
20812081
if (rq->data_ring.base) {
20822082
dma_free_coherent(&adapter->pdev->dev,
20832083
rq->rx_ring[0].size * rq->data_ring.desc_size,

0 commit comments

Comments
 (0)