[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 net] page_pool: Cap queue size to 32k.
- To: <netdev@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
- From: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>
- Date: Mon, 14 Aug 2023 11:34:11 +0530
- Cc: <davem@xxxxxxxxxxxxx>, <edumazet@xxxxxxxxxx>, <kuba@xxxxxxxxxx>, <pabeni@xxxxxxxxxx>, <ast@xxxxxxxxxx>, <daniel@xxxxxxxxxxxxx>, <hawk@xxxxxxxxxx>, <john.fastabend@xxxxxxxxx>, <jiawenwu@xxxxxxxxxxxxxx>, <mengyuanlou@xxxxxxxxxxxxx>, <yang.lee@xxxxxxxxxxxxxxxxx>, <error27@xxxxxxxxx>, <linyunsheng@xxxxxxxxxx>, <linux-hyperv@xxxxxxxxxxxxxxx>, <kys@xxxxxxxxxxxxx>, <haiyangz@xxxxxxxxxxxxx>, <wei.liu@xxxxxxxxxx>, <decui@xxxxxxxxxxxxx>, <longli@xxxxxxxxxxxxx>, <shradhagupta@xxxxxxxxxxxxxxxxxxx>, <linux-hwmon@xxxxxxxxxxxxxxx>, <michael.chan@xxxxxxxxxxxx>, <richardcochran@xxxxxxxxx>, <jdelvare@xxxxxxxx>, <linux@xxxxxxxxxxxx>, <yisen.zhuang@xxxxxxxxxx>, <salil.mehta@xxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-mediatek@xxxxxxxxxxxxxxxxxxx>, <nbd@xxxxxxxx>, <john@xxxxxxxxxxx>, <sean.wang@xxxxxxxxxxxx>, <Mark-MC.Lee@xxxxxxxxxxxx>, <lorenzo@xxxxxxxxxx>, <matthias.bgg@xxxxxxxxx>, <angelogioacchino.delregno@xxxxxxxxxxxxx>, <linux@xxxxxxxxxxxxxxx>, <linux-rdma@xxxxxxxxxxxxxxx>, <saeedm@xxxxxxxxxx>, <leon@xxxxxxxxxx>, <gerhard@xxxxxxxxxxxxxxxxxxxxx>, <maciej.fijalkowski@xxxxxxxxx>, <alexanderduyck@xxxxxx>, <wei.fang@xxxxxxx>, <shenwei.wang@xxxxxxx>, <xiaoning.wang@xxxxxxx>, <linux-imx@xxxxxxx>, <lgirdwood@xxxxxxxxx>, <broonie@xxxxxxxxxx>, <jaswinder.singh@xxxxxxxxxx>, <ilias.apalodimas@xxxxxxxxxx>, <UNGLinuxDriver@xxxxxxxxxxxxx>, <horatiu.vultur@xxxxxxxxxxxxx>, <linux-omap@xxxxxxxxxxxxxxx>, <grygorii.strashko@xxxxxx>, <simon.horman@xxxxxxxxxxxx>, <vladimir.oltean@xxxxxxx>, <rkannoth@xxxxxxxxxxx>, <aleksander.lobakin@xxxxxxxxx>, <linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, <alexandre.torgue@xxxxxxxxxxx>, <joabreu@xxxxxxxxxxxx>, <mcoquelin.stm32@xxxxxxxxx>, <p.zabel@xxxxxxxxxxxxxx>, <thomas.petazzoni@xxxxxxxxxxx>, <mw@xxxxxxxxxxxx>, <sgoutham@xxxxxxxxxxx>, <gakula@xxxxxxxxxxx>, <sbhatta@xxxxxxxxxxx>, <hkelam@xxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <jgross@xxxxxxxx>, <sstabellini@xxxxxxxxxx>, <oleksandr_tyshchenko@xxxxxxxx>, <linux-wireless@xxxxxxxxxxxxxxx>, <ryder.lee@xxxxxxxxxxxx>, <shayne.chen@xxxxxxxxxxxx>, <kvalo@xxxxxxxxxx>, <andrii@xxxxxxxxxx>, <martin.lau@xxxxxxxxx>, <song@xxxxxxxxxx>, <yonghong.song@xxxxxxxxx>, <kpsingh@xxxxxxxxxx>, <sdf@xxxxxxxxxx>, <haoluo@xxxxxxxxxx>, <jolsa@xxxxxxxxxx>
- Delivery-date: Mon, 14 Aug 2023 06:14:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxxx>
---
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
|