* [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 [flat|nested] 6+ messages in thread
* Re: [PATCH v1 net] page_pool: Cap queue size to 32k.
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-09-05 9:57 ` Dan Carpenter
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2023-08-14 7:54 UTC (permalink / raw)
To: Ratheesh Kannoth, 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, 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
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] Re: [PATCH v1 net] page_pool: Cap queue size to 32k.
2023-08-14 7:54 ` Johannes Berg
@ 2023-08-14 8:05 ` Ratheesh Kannoth
2023-08-14 8:45 ` Jesper Dangaard Brouer
0 siblings, 1 reply; 6+ messages in thread
From: Ratheesh Kannoth @ 2023-08-14 8:05 UTC (permalink / raw)
To: Johannes Berg, 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, aleksander.lobakin, linux-stm32,
alexandre.torgue, joabreu, mcoquelin.stm32, p.zabel,
thomas.petazzoni, mw, Sunil Kovvuri Goutham,
Geethasowjanya Akula, Subbaraya Sundeep Bhatta, Hariprasad Kelam,
xen-devel, jgross, sstabellini, oleksandr_tyshchenko,
linux-wireless, ryder.lee, shayne.chen, kvalo, andrii,
martin.lau, song, yonghong.song, kpsingh, sdf, haoluo, jolsa
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXT] Re: [PATCH v1 net] page_pool: Cap queue size to 32k.
2023-08-14 8:05 ` [EXT] " Ratheesh Kannoth
@ 2023-08-14 8:45 ` Jesper Dangaard Brouer
2023-08-14 8:55 ` Ratheesh Kannoth
0 siblings, 1 reply; 6+ messages in thread
From: Jesper Dangaard Brouer @ 2023-08-14 8:45 UTC (permalink / raw)
To: Ratheesh Kannoth, Johannes Berg, netdev, linux-kernel
Cc: hawk, davem, edumazet, kuba, pabeni, ast, daniel, 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, aleksander.lobakin, linux-stm32,
alexandre.torgue, joabreu, mcoquelin.stm32, p.zabel,
thomas.petazzoni, mw, Sunil Kovvuri Goutham,
Geethasowjanya Akula, Subbaraya Sundeep Bhatta, Hariprasad Kelam,
xen-devel, jgross, sstabellini, oleksandr_tyshchenko,
linux-wireless, ryder.lee, shayne.chen, kvalo, andrii,
martin.lau, song, yonghong.song, kpsingh, sdf, haoluo, jolsa
On 14/08/2023 10.05, Ratheesh Kannoth wrote:
>> 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.
>
I agree with Johannes, this commit message is too thin.
It makes sense to give a summary of the discussion, because it show us
(page_pool maintainers) what you concluded for the discussion.
Further more, you also send another patch:
- "[PATCH net-next] page_pool: Set page pool size"
-
https://lore.kernel.org/all/20230809021920.913324-1-rkannoth@marvell.com/
That patch solves the issue for your driver marvell/octeontx2 and I like
than change.
Why did you conclude that PP core should also change?
--Jesper
(p.s. Cc/To list have gotten excessive with 89 recipients)
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] Re: [PATCH v1 net] page_pool: Cap queue size to 32k.
2023-08-14 8:45 ` Jesper Dangaard Brouer
@ 2023-08-14 8:55 ` Ratheesh Kannoth
0 siblings, 0 replies; 6+ messages in thread
From: Ratheesh Kannoth @ 2023-08-14 8:55 UTC (permalink / raw)
To: Jesper Dangaard Brouer, Johannes Berg, netdev, linux-kernel
Cc: davem, edumazet, kuba, pabeni, ast, daniel, john.fastabend,
jiawenwu, mengyuanlou, yang.lee, error27, linyunsheng,
linux-hyperv, kys, haiyangz, wei.liu, decui, longli,
shradhagupta, linux-hwmon, michael.chan, richardcochran,
jdelvare, linux, 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, yisen.zhuang, lgirdwood,
broonie, jaswinder.singh, ilias.apalodimas, UNGLinuxDriver,
horatiu.vultur, linux-omap, grygorii.strashko, simon.horman,
vladimir.oltean, aleksander.lobakin, linux-stm32,
alexandre.torgue, joabreu, mcoquelin.stm32, p.zabel,
thomas.petazzoni, mw, Sunil Kovvuri Goutham,
Geethasowjanya Akula, Subbaraya Sundeep Bhatta, Hariprasad Kelam,
xen-devel, jgross, sstabellini, oleksandr_tyshchenko,
linux-wireless, ryder.lee, shayne.chen, kvalo, andrii,
martin.lau, song, yonghong.song, kpsingh, sdf, haoluo, jolsa
> 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().
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 net] page_pool: Cap queue size to 32k.
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-09-05 9:57 ` Dan Carpenter
1 sibling, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-09-05 9:57 UTC (permalink / raw)
To: Ratheesh Kannoth
Cc: netdev, linux-kernel, 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, 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
On Mon, Aug 14, 2023 at 11:34:11AM +0530, Ratheesh Kannoth wrote:
> Clamp to 32k instead of returning error.
What is the motivation here? What is the real world impact for the
users?
>
> Please find discussion at
> https://lore.kernel.org/lkml/
> CY4PR1801MB1911E15D518A77535F6E51E2D308A@CY4PR1801MB1911.
> namprd18.prod.outlook.com/T/
Please don't break the URL up like this. I think normally we would just
write up a normal commit message and use the Link: tag.
Fixes: ff7d6b27f894 ("page_pool: refurbish version of page_pool code")
Link: https://lore.kernel.org/lkml/CY4PR1801MB1911E15D518A77535F6E51E2D308A@CY4PR1801MB1911.namprd18.prod.outlook.com/
Signed-off-by:
> @@ -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.
Don't introduce a blank line here. Checkpatch will complain if you
have to blank lines in a row. It won't complain about the patch but it
will complain if you apply the patch and then re-run checkpatch -f on
the file. (I didn't test this but it's wrong either way. :P).
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-05 16:51 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
all inboxes | Powered by JetHome®