Skip to content

Commit 7cc9e6d

Browse files
kuba-mooPaolo Abeni
authored andcommitted
eth: link netdev to page_pools in drivers
Link page pool instances to netdev for the drivers which already link to NAPI. Unless the driver is doing something very weird per-NAPI should imply per-netdev. Add netsec as well, Ilias indicates that it fits the mold. Reviewed-by: Eric Dumazet <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 02b3de8 commit 7cc9e6d

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3331,6 +3331,7 @@ static int bnxt_alloc_rx_page_pool(struct bnxt *bp,
33313331
pp.pool_size += bp->rx_ring_size;
33323332
pp.nid = dev_to_node(&bp->pdev->dev);
33333333
pp.napi = &rxr->bnapi->napi;
3334+
pp.netdev = bp->dev;
33343335
pp.dev = &bp->pdev->dev;
33353336
pp.dma_dir = bp->rx_dir;
33363337
pp.max_len = PAGE_SIZE;

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,7 @@ static int mlx5e_alloc_rq(struct mlx5e_params *params,
902902
pp_params.nid = node;
903903
pp_params.dev = rq->pdev;
904904
pp_params.napi = rq->cq.napi;
905+
pp_params.netdev = rq->netdev;
905906
pp_params.dma_dir = rq->buff.map_dir;
906907
pp_params.max_len = PAGE_SIZE;
907908

drivers/net/ethernet/microsoft/mana/mana_en.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,6 +2137,7 @@ static int mana_create_page_pool(struct mana_rxq *rxq, struct gdma_context *gc)
21372137
pprm.pool_size = RX_BUFFERS_PER_QUEUE;
21382138
pprm.nid = gc->numa_node;
21392139
pprm.napi = &rxq->rx_cq.napi;
2140+
pprm.netdev = rxq->ndev;
21402141

21412142
rxq->page_pool = page_pool_create(&pprm);
21422143

drivers/net/ethernet/socionext/netsec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,8 @@ static int netsec_setup_rx_dring(struct netsec_priv *priv)
13021302
.dma_dir = xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE,
13031303
.offset = NETSEC_RXBUF_HEADROOM,
13041304
.max_len = NETSEC_RX_BUF_SIZE,
1305+
.napi = &priv->napi,
1306+
.netdev = priv->ndev,
13051307
};
13061308
int i, err;
13071309

0 commit comments

Comments
 (0)