Message ID | 20230814060411.2401817-1-rkannoth@marvell.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2618752vqi; Mon, 14 Aug 2023 02:17:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcuunnmvqK2cPX5z7FeV3gWqC1SfQQcPhJqReWIgZJR8RPw0eewrm2Wi940riNU/n0hju8 X-Received: by 2002:a05:6808:13cd:b0:3a7:41a7:f7fe with SMTP id d13-20020a05680813cd00b003a741a7f7femr11142524oiw.15.1692004620782; Mon, 14 Aug 2023 02:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692004620; cv=none; d=google.com; s=arc-20160816; b=yD7OMxI1qAYbjMndH9PuOlAeOaCKo+QCPF4+unxSfX45M9oECMJSlWxFh+XAAZIBQG JDgtHjdeEa4WDfxpxFIBSzfjN6W6oai4wi6GI0qxAdrO9Yno0Pro5623/MBNNZOhNy3v HiqLh4FqgSNs8gdFUhF9yeTP3U+gemTMHLChDwZaetOj+nfUH/d6YGk5UTyYfUDFclie r6zt4EfcqlFRLknfR3gShWaquN77EN0Nbzrk3RZW543RuYU0mI9iTh6W/ck8DpChwVLd A6AzSokP7iKBAz5RYNLYLOyreHrSbPbiJAB87K2tsWl7qQmXm8eubJWmR5F7J7Z+xPRF HKqg== 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=2e/DgbPH5Z735BTpVc79AFms8kX4Gp8CjDRy+gF54Og=; fh=zKLfZ8PSbZUIncgYrlRyVXApVxbzqRj7KMXjzwxg4DY=; b=Rnfs1Pu5SHrSfOLrpJHImPg5EZMqloi9ZgMPfBQbgMkSBI15n7mUewfbj2Tey7uJPJ TQ/IOwOuYsgrGIJy1EFWdltWshvVASu91s6O6BejuzQD2GCrOE5jRF1/Er3I+wh0eJQL +KBmHeDZvOJ1L/zmARlgpxnoTX7Df+VW+JY7YQ+NxsiDlD3SYxEycI+5ehrQzmn9nMvw dZXW2L76MCZVo6HhWKALUUyP0JnweE5BOsWxIZLre7pZKEhva9CayclxBSR2owtO/1Ee wWD6RfmptOGNhTAGgZZ7/6jsKDY/bBhvK1o1X/S0J2YDXyRxq+YIaLH9uYVpkYcKzImx 3wmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="E/8P5/+j"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a63f508000000b00565617189e2si6719868pgh.839.2023.08.14.02.16.47; Mon, 14 Aug 2023 02:17:00 -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="E/8P5/+j"; 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 S232280AbjHNGG7 (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Mon, 14 Aug 2023 02:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233732AbjHNGGH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Aug 2023 02:06:07 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2FEF199B; Sun, 13 Aug 2023 23:05:38 -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 37E5dnKn028174; Sun, 13 Aug 2023 23:04:53 -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=2e/DgbPH5Z735BTpVc79AFms8kX4Gp8CjDRy+gF54Og=; b=E/8P5/+jNOFDXnIeAK6eLktq00L60xiKYdb2qKHYNE+xCpg5uzwBma5HNeeDm5+xDr/z PtUPN2CVxipoL7xIRglPjHM0nr73ebcCfiBNHKO+ejsrYpyGT1z5owXlVZBvcqnjQTMi xVpi7MTLbBxFyMgVXN2gotRa8b8ZGbhZzCnaie9FgVwAx0KVLDEe3Z0Hs/va3cj30eI3 bQep63FV2AJCT9K2ToAglpvTN/WgrwwX8gb7FG8I4boMHs0BV/6m7+XurB6k5AN7oOOW iqus7BoMwgqKR+ia384IF8M69kir+dL0CX57DDgO8auPhc0KzwAXvTjo5NFnI/q/asdB kQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3se9kj4xs9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 13 Aug 2023 23:04:52 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 13 Aug 2023 23:04:50 -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, 13 Aug 2023 23:04:50 -0700 Received: from marvell-OptiPlex-7090.marvell.com (unknown [10.28.36.165]) by maili.marvell.com (Postfix) with ESMTP id A95D13F707E; Sun, 13 Aug 2023 23:04:25 -0700 (PDT) From: Ratheesh Kannoth <rkannoth@marvell.com> To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <ast@kernel.org>, <daniel@iogearbox.net>, <hawk@kernel.org>, <john.fastabend@gmail.com>, <jiawenwu@trustnetic.com>, <mengyuanlou@net-swift.com>, <yang.lee@linux.alibaba.com>, <error27@gmail.com>, <linyunsheng@huawei.com>, <linux-hyperv@vger.kernel.org>, <kys@microsoft.com>, <haiyangz@microsoft.com>, <wei.liu@kernel.org>, <decui@microsoft.com>, <longli@microsoft.com>, <shradhagupta@linux.microsoft.com>, <linux-hwmon@vger.kernel.org>, <michael.chan@broadcom.com>, <richardcochran@gmail.com>, <jdelvare@suse.com>, <linux@roeck-us.net>, <yisen.zhuang@huawei.com>, <salil.mehta@huawei.com>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <nbd@nbd.name>, <john@phrozen.org>, <sean.wang@mediatek.com>, <Mark-MC.Lee@mediatek.com>, <lorenzo@kernel.org>, <matthias.bgg@gmail.com>, <angelogioacchino.delregno@collabora.com>, <linux@armlinux.org.uk>, <linux-rdma@vger.kernel.org>, <saeedm@nvidia.com>, <leon@kernel.org>, <gerhard@engleder-embedded.com>, <maciej.fijalkowski@intel.com>, <alexanderduyck@fb.com>, <wei.fang@nxp.com>, <shenwei.wang@nxp.com>, <xiaoning.wang@nxp.com>, <linux-imx@nxp.com>, <lgirdwood@gmail.com>, <broonie@kernel.org>, <jaswinder.singh@linaro.org>, <ilias.apalodimas@linaro.org>, <UNGLinuxDriver@microchip.com>, <horatiu.vultur@microchip.com>, <linux-omap@vger.kernel.org>, <grygorii.strashko@ti.com>, <simon.horman@corigine.com>, <vladimir.oltean@nxp.com>, <rkannoth@marvell.com>, <aleksander.lobakin@intel.com>, <linux-stm32@st-md-mailman.stormreply.com>, <alexandre.torgue@foss.st.com>, <joabreu@synopsys.com>, <mcoquelin.stm32@gmail.com>, <p.zabel@pengutronix.de>, <thomas.petazzoni@bootlin.com>, <mw@semihalf.com>, <sgoutham@marvell.com>, <gakula@marvell.com>, <sbhatta@marvell.com>, <hkelam@marvell.com>, <xen-devel@lists.xenproject.org>, <jgross@suse.com>, <sstabellini@kernel.org>, <oleksandr_tyshchenko@epam.com>, <linux-wireless@vger.kernel.org>, <ryder.lee@mediatek.com>, <shayne.chen@mediatek.com>, <kvalo@kernel.org>, <andrii@kernel.org>, <martin.lau@linux.dev>, <song@kernel.org>, <yonghong.song@linux.dev>, <kpsingh@kernel.org>, <sdf@google.com>, <haoluo@google.com>, <jolsa@kernel.org> Subject: [PATCH v1 net] page_pool: Cap queue size to 32k. Date: Mon, 14 Aug 2023 11:34:11 +0530 Message-ID: <20230814060411.2401817-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: aFZU2RAx_UAE8R4K6KZZzbh7PQU3_GNE X-Proofpoint-ORIG-GUID: aFZU2RAx_UAE8R4K6KZZzbh7PQU3_GNE 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-13_24,2023-08-10_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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774194117099204130 X-GMAIL-MSGID: 1774195437048194353 |
Series |
[v1,net] page_pool: Cap queue size to 32k.
|
|
Commit Message
Ratheesh Kannoth
Aug. 14, 2023, 6:04 a.m. UTC
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(-)
Comments
On Mon, 2023-08-14 at 11:34 +0530, Ratheesh Kannoth wrote: > Clamp to 32k instead of returning error. > > Please find discussion at > https://lore.kernel.org/lkml/ > CY4PR1801MB1911E15D518A77535F6E51E2D308A@CY4PR1801MB1911. > namprd18.prod.outlook.com/T/ > I'm not the one who's going to apply this, but honestly, I don't think that will work as a commit message for such a change ... Sure, link to it by all means, but also summarize it and make sense of it for the commit message? johannes
> From: Johannes Berg <johannes@sipsolutions.net> > Subject: [EXT] Re: [PATCH v1 net] page_pool: Cap queue size to 32k. > > Please find discussion at > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_l > > > I'm not the one who's going to apply this, but honestly, I don't think that will > work as a commit message for such a change ... > Sure, link to it by all means, but also summarize it and make sense of it for > the commit message? Why do you think it will not work ?. There is a long discussion about pros and cons of different approaches by Page pool maintainers in the discussion link. However I summarize it here, as commit message, it will Lead to some more questions by reviewers. -Ratheesh
> From: Jesper Dangaard Brouer <hawk@kernel.org> > Subject: Re: [EXT] Re: [PATCH v1 net] page_pool: Cap queue size to 32k. > I agree with Johannes, this commit message is too thin. ACK. > It makes sense to give a summary of the discussion, because it show us > (page_pool maintainers) what you concluded for the discussion. Got it. Thanks. > Further more, you also send another patch: > - "[PATCH net-next] page_pool: Set page pool size" Okay. > - > https://urldefense.proofpoint.com/v2/url?u=https- > 3A__lore.kernel.org_all_20230809021920.913324-2D1-2Drkannoth- > 40marvell.com_&d=DwICaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=aekcsyBCH00 > _LewrEDcQBzsRw8KCpUR0vZb_auTHk4M&m=uvV_vt_cNyQItTD90jF1LdKovP > 7j7FYtnr7I38__nYY6wHtFHSozYoRSSvCI14nh&s=vGgt2ccGdiRTEhj3MoGVx- > EXHmB03v6I3UIIY1fEb24&e= > > That patch solves the issue for your driver marvell/octeontx2 and I like than > change. Okay. > Why did you conclude that PP core should also change? I could not answer Jacub's question at https://lore.kernel.org/netdev/20230810024422.1781312-1-rkannoth@marvell.com/T/ > (p.s. Cc/To list have gotten excessive with 89 recipients) I added maintainters of all files which used page_pool_init().
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,