netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net] page_pool: Cap queue size to 32k.
@ 2023-08-14  6:04 Ratheesh Kannoth
  2023-08-14  7:54 ` Johannes Berg
  2023-09-05  9:57 ` Dan Carpenter
  0 siblings, 2 replies; 6+ messages in thread
From: Ratheesh Kannoth @ 2023-08-14  6:04 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: davem, edumazet, kuba, pabeni, ast, daniel, hawk, john.fastabend,
	jiawenwu, mengyuanlou, yang.lee, error27, linyunsheng,
	linux-hyperv, kys, haiyangz, wei.liu, decui, longli, shradhagupta,
	linux-hwmon, michael.chan, richardcochran, jdelvare, linux,
	yisen.zhuang, salil.mehta, linux-arm-kernel, linux-mediatek, nbd,
	john, sean.wang, Mark-MC.Lee, lorenzo, matthias.bgg,
	angelogioacchino.delregno, linux, linux-rdma, saeedm, leon,
	gerhard, maciej.fijalkowski, alexanderduyck, wei.fang,
	shenwei.wang, xiaoning.wang, linux-imx, lgirdwood, broonie,
	jaswinder.singh, ilias.apalodimas, UNGLinuxDriver, horatiu.vultur,
	linux-omap, grygorii.strashko, simon.horman, vladimir.oltean,
	rkannoth, aleksander.lobakin, linux-stm32, alexandre.torgue,
	joabreu, mcoquelin.stm32, p.zabel, thomas.petazzoni, mw, sgoutham,
	gakula, sbhatta, hkelam, xen-devel, jgross, sstabellini,
	oleksandr_tyshchenko, linux-wireless, ryder.lee, shayne.chen,
	kvalo, andrii, martin.lau, song, yonghong.song, kpsingh, sdf,
	haoluo, jolsa

Clamp to 32k instead of returning error.

Please find discussion at
https://lore.kernel.org/lkml/
CY4PR1801MB1911E15D518A77535F6E51E2D308A@CY4PR1801MB1911.
namprd18.prod.outlook.com/T/

Fixes: ff7d6b27f894 ("page_pool: refurbish version of page_pool code")
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

---
ChangeLog:
v0 -> v1: Rebase && commit message changes
---
 net/core/page_pool.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index a3e12a61d456..e9dc8d8966ad 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -171,9 +171,10 @@ static int page_pool_init(struct page_pool *pool,
 	if (pool->p.pool_size)
 		ring_qsize = pool->p.pool_size;
 
-	/* Sanity limit mem that can be pinned down */
+	/* Cap queue size to 32k */
 	if (ring_qsize > 32768)
-		return -E2BIG;
+		ring_qsize = 32768;
+
 
 	/* DMA direction is either DMA_FROM_DEVICE or DMA_BIDIRECTIONAL.
 	 * DMA_BIDIRECTIONAL is for allowing page used for DMA sending,
-- 
2.25.1


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

end of thread, other threads:[~2023-09-05  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14  6:04 [PATCH v1 net] page_pool: Cap queue size to 32k Ratheesh Kannoth
2023-08-14  7:54 ` Johannes Berg
2023-08-14  8:05   ` [EXT] " Ratheesh Kannoth
2023-08-14  8:45     ` Jesper Dangaard Brouer
2023-08-14  8:55       ` Ratheesh Kannoth
2023-09-05  9:57 ` Dan Carpenter

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