Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2595246rwb; Sun, 6 Aug 2023 23:23:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFj+E9liG+fX/Sn6rasRRS32kfH+t4Qhgb7y12i7mihocICbpy+MBgWUbQOj1IpcKqzjR0V X-Received: by 2002:a17:906:538b:b0:98d:e605:2bce with SMTP id g11-20020a170906538b00b0098de6052bcemr6304257ejo.46.1691389418308; Sun, 06 Aug 2023 23:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691389418; cv=none; d=google.com; s=arc-20160816; b=PCYewBMDiL/ZSuAGMRig7i33XhOgkehYgebWLZG1TdrprClCEhKGjuVMi6/wVQW1Ft epQqhbezN8svoRksw+461owYN4PEglJjVyySgtt+DMBFzOEp6OvwtuOpBtzqxE2Vfu2e NKwmowFTQyYwAcEYpxjz9bi0ZUiNJbQVZ0ygXc50a7lmb/LcR4jpwNQekAshMEMnnB6H bNg3UjhJGbZLMu51sGe7iDREL3oYTOIsEZxNSZdNAQBvTj6ud4Xd4yF6SZLoVc6HDF0u 1RgOBK2dsbVCIqwSVka8ugbRs7nBHdJ4dl8OfLBCThEbX+h70L4f2MKJJ6Q1MCbOrBNb 5xWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pyTQoH8mIIaArXwMJduVBQJnNnjf2BQfpuaQRcDIquo=; fh=CvlKGMf3kR2yIDY3S0Zx58VU++eFn5Jw21lW7Qc420w=; b=xOKmg4joOT7lnNZ4Z3OglCyOWlSoePvLrzy3CSE2Cy3j/kxqaaHqamcrqIiQ+U0K5U ZvRn4f/dyUTp3Ln/AukNc6yWpRSNwajqB5cb+WDnOFxbm9C+rLN0KET5qEesjEhT246L +Pq3sZjAlHgf+jhiRY4Nh07AllEvu5WQE/pum7MYU6b/LbmoBu94vPc/Ba3WOYfdH1+t 7HgMeDumQRtBJ4MghaE14VAMhagVvUneT7WZUqZTBif5eCHyrIPxhA+42LqerrLj+v7A /bL/RJzgXwvqomDFnLrA9YhZuiYy/f4eJ+2+v1SDRf3fRJybu/gTDQa1eBVxwvpVuaCx bStQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="dNvEmt/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170906154700b00987e4102ebfsi4325549ejd.993.2023.08.06.23.23.13; Sun, 06 Aug 2023 23:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="dNvEmt/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230039AbjHGDtu (ORCPT + 99 others); Sun, 6 Aug 2023 23:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbjHGDts (ORCPT ); Sun, 6 Aug 2023 23:49:48 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98FBE10FD; Sun, 6 Aug 2023 20:49:46 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 376N0HJt005441; Sun, 6 Aug 2023 20:49:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=pyTQoH8mIIaArXwMJduVBQJnNnjf2BQfpuaQRcDIquo=; b=dNvEmt/9JUAS2xDF1/EWNi8uCIuJBTmp5DK6uJAd61uy3G2eAyEjlTJpYFs8jMkXUAlU 1sQd6WUEWAs08GgFfRTJVGJVwmfYcjp7JiZnPz0kEU1GmOo5lPky8kOagnDDd6CormSj T/8X5QEy3aQeFIUG2y0xoklly1+R6VxfDOsBJUAzFKjUhQMZv1QwRgZ8SAQuJdnexrjX ZVQ1gpBqXxQnsQ337LXZkAnuwREuNJJJBWxVKcqOpZeufPe1iaR0jxc5N49wiyt/J1SP 9HPO+3Cam9Wv/xQ4x/ZdkoED5bQN1Uv2IU/JOQdhnvsEnW+ki2KeS23XTheh6F4dlqXY kg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3s9nxkuau1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 06 Aug 2023 20:49:39 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 6 Aug 2023 20:49:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 6 Aug 2023 20:49:36 -0700 Received: from marvell-OptiPlex-7090.marvell.com (unknown [10.28.36.165]) by maili.marvell.com (Postfix) with ESMTP id 22EF23F7091; Sun, 6 Aug 2023 20:49:33 -0700 (PDT) From: Ratheesh Kannoth To: , CC: , , , , Ratheesh Kannoth Subject: [PATCH net-next] page_pool: Clamp ring size to 32K Date: Mon, 7 Aug 2023 09:19:32 +0530 Message-ID: <20230807034932.4000598-1-rkannoth@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: yWjY0_jY_CfydcVPHQHZBy3u28HWd_a8 X-Proofpoint-ORIG-GUID: yWjY0_jY_CfydcVPHQHZBy3u28HWd_a8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-07_01,2023-08-03_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org https://lore.kernel.org/netdev/20230804133512.4dbbbc16@kernel.org/T/ Capping the recycle ring to 32k instead of returning the error. Suggested-by: Jakub Kicinski Signed-off-by: Ratheesh Kannoth --- net/core/page_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 5d615a169718..404f835a94be 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -182,9 +182,9 @@ 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 */ + /* Clamp 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