Skip to content

Commit 40eca00

Browse files
spikehPaolo Abeni
authored andcommitted
bnxt_en: unlink page pool when stopping Rx queue
Have bnxt call page_pool_disable_direct_recycling() to unlink the old page pool when resetting a queue prior to destroying it, instead of touching a netdev core struct directly. Signed-off-by: David Wei <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent d7f39ae commit 40eca00

File tree

1 file changed

+1
-5
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+1
-5
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15081,11 +15081,6 @@ static void bnxt_queue_mem_free(struct net_device *dev, void *qmem)
1508115081
bnxt_free_one_rx_ring(bp, rxr);
1508215082
bnxt_free_one_rx_agg_ring(bp, rxr);
1508315083

15084-
/* At this point, this NAPI instance has another page pool associated
15085-
* with it. Disconnect here before freeing the old page pool to avoid
15086-
* warnings.
15087-
*/
15088-
rxr->page_pool->p.napi = NULL;
1508915084
page_pool_destroy(rxr->page_pool);
1509015085
rxr->page_pool = NULL;
1509115086

@@ -15205,6 +15200,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1520515200
bnxt_hwrm_rx_ring_free(bp, rxr, false);
1520615201
bnxt_hwrm_rx_agg_ring_free(bp, rxr, false);
1520715202
rxr->rx_next_cons = 0;
15203+
page_pool_disable_direct_recycling(rxr->page_pool);
1520815204

1520915205
memcpy(qmem, rxr, sizeof(*rxr));
1521015206
bnxt_init_rx_ring_struct(bp, qmem);

0 commit comments

Comments
 (0)