netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] octeontx2-pf: Set page pool size
@ 2023-08-10  2:44 Ratheesh Kannoth
  2023-08-10 17:09 ` Alexander Lobakin
  0 siblings, 1 reply; 4+ messages in thread
From: Ratheesh Kannoth @ 2023-08-10  2:44 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta, davem,
	edumazet, kuba, pabeni, Ratheesh Kannoth, Alexander Lobakin

page pool infra does direct recycling aggressively.
This would often keep ptr_ring left unused. Save
memory by configuring ptr_ring to a constant value(2K).

Please find discussion at
https://lore.kernel.org/netdev/
	15d32b22-22b0-64e3-a49e-88d780c24616@kernel.org/T/

Fixes: b2e3406a38f0 ("octeontx2-pf: Add support for page pool")
Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 77c8f650f7ac..123348a9e19e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -1432,7 +1432,8 @@ int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
 	}
 
 	pp_params.flags = PP_FLAG_PAGE_FRAG | PP_FLAG_DMA_MAP;
-	pp_params.pool_size = numptrs;
+#define OTX2_PAGE_POOL_SZ 2048
+	pp_params.pool_size = OTX2_PAGE_POOL_SZ;
 	pp_params.nid = NUMA_NO_NODE;
 	pp_params.dev = pfvf->dev;
 	pp_params.dma_dir = DMA_FROM_DEVICE;
-- 
2.25.1


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

end of thread, other threads:[~2023-08-11  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  2:44 [PATCH net] octeontx2-pf: Set page pool size Ratheesh Kannoth
2023-08-10 17:09 ` Alexander Lobakin
2023-08-10 17:59   ` Jakub Kicinski
2023-08-11  1:55     ` [EXT] " Ratheesh Kannoth

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).