[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230814060411.2401817-1-rkannoth@marvell.com>
Date: Mon, 14 Aug 2023 11:34:11 +0530
From: Ratheesh Kannoth <rkannoth@...vell.com>
To: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <ast@...nel.org>, <daniel@...earbox.net>,
<hawk@...nel.org>, <john.fastabend@...il.com>,
<jiawenwu@...stnetic.com>, <mengyuanlou@...-swift.com>,
<yang.lee@...ux.alibaba.com>, <error27@...il.com>,
<linyunsheng@...wei.com>, <linux-hyperv@...r.kernel.org>,
<kys@...rosoft.com>, <haiyangz@...rosoft.com>,
<wei.liu@...nel.org>, <decui@...rosoft.com>,
<longli@...rosoft.com>, <shradhagupta@...ux.microsoft.com>,
<linux-hwmon@...r.kernel.org>, <michael.chan@...adcom.com>,
<richardcochran@...il.com>, <jdelvare@...e.com>,
<linux@...ck-us.net>, <yisen.zhuang@...wei.com>,
<salil.mehta@...wei.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>, <nbd@....name>,
<john@...ozen.org>, <sean.wang@...iatek.com>,
<Mark-MC.Lee@...iatek.com>, <lorenzo@...nel.org>,
<matthias.bgg@...il.com>,
<angelogioacchino.delregno@...labora.com>, <linux@...linux.org.uk>,
<linux-rdma@...r.kernel.org>, <saeedm@...dia.com>,
<leon@...nel.org>, <gerhard@...leder-embedded.com>,
<maciej.fijalkowski@...el.com>, <alexanderduyck@...com>,
<wei.fang@....com>, <shenwei.wang@....com>,
<xiaoning.wang@....com>, <linux-imx@....com>,
<lgirdwood@...il.com>, <broonie@...nel.org>,
<jaswinder.singh@...aro.org>, <ilias.apalodimas@...aro.org>,
<UNGLinuxDriver@...rochip.com>, <horatiu.vultur@...rochip.com>,
<linux-omap@...r.kernel.org>, <grygorii.strashko@...com>,
<simon.horman@...igine.com>, <vladimir.oltean@....com>,
<rkannoth@...vell.com>, <aleksander.lobakin@...el.com>,
<linux-stm32@...md-mailman.stormreply.com>,
<alexandre.torgue@...s.st.com>, <joabreu@...opsys.com>,
<mcoquelin.stm32@...il.com>, <p.zabel@...gutronix.de>,
<thomas.petazzoni@...tlin.com>, <mw@...ihalf.com>,
<sgoutham@...vell.com>, <gakula@...vell.com>,
<sbhatta@...vell.com>, <hkelam@...vell.com>,
<xen-devel@...ts.xenproject.org>, <jgross@...e.com>,
<sstabellini@...nel.org>, <oleksandr_tyshchenko@...m.com>,
<linux-wireless@...r.kernel.org>, <ryder.lee@...iatek.com>,
<shayne.chen@...iatek.com>, <kvalo@...nel.org>,
<andrii@...nel.org>, <martin.lau@...ux.dev>, <song@...nel.org>,
<yonghong.song@...ux.dev>, <kpsingh@...nel.org>, <sdf@...gle.com>,
<haoluo@...gle.com>, <jolsa@...nel.org>
Subject: [PATCH v1 net] page_pool: Cap queue size to 32k.
Clamp to 32k instead of returning error.
Please find discussion at
https://lore.kernel.org/lkml/
CY4PR1801MB1911E15D518A77535F6E51E2D308A@...PR1801MB1911.
namprd18.prod.outlook.com/T/
Fixes: ff7d6b27f894 ("page_pool: refurbish version of page_pool code")
Signed-off-by: Ratheesh Kannoth <rkannoth@...vell.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
Powered by blists - more mailing lists