* [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst
@ 2020-11-20 22:19 Lorenzo Bianconi
2020-11-23 8:06 ` Ilias Apalodimas
0 siblings, 1 reply; 3+ messages in thread
From: Lorenzo Bianconi @ 2020-11-20 22:19 UTC (permalink / raw)
To: netdev; +Cc: lorenzo.bianconi, davem, kuba, brouer, ilias.apalodimas
Introduce page_pool_put_page_bulk() entry into the API section of
page_pool.rst
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
Documentation/networking/page_pool.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
index 43088ddf95e4..e848f5b995b8 100644
--- a/Documentation/networking/page_pool.rst
+++ b/Documentation/networking/page_pool.rst
@@ -97,6 +97,14 @@ a page will cause no race conditions is enough.
* page_pool_get_dma_dir(): Retrieve the stored DMA direction.
+* page_pool_put_page_bulk(): It tries to refill a bulk of count pages into the
+ ptr_ring cache holding ptr_ring producer lock. If the ptr_ring is full,
+ page_pool_put_page_bulk() will release leftover pages to the page allocator.
+ page_pool_put_page_bulk() is suitable to be run inside the driver NAPI tx
+ completion loop for the XDP_REDIRECT use case.
+ Please consider the caller must not use data area after running
+ page_pool_put_page_bulk(), as this function overwrites it.
+
Coding examples
===============
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst
2020-11-20 22:19 [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst Lorenzo Bianconi
@ 2020-11-23 8:06 ` Ilias Apalodimas
2020-11-23 8:54 ` Lorenzo Bianconi
0 siblings, 1 reply; 3+ messages in thread
From: Ilias Apalodimas @ 2020-11-23 8:06 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: netdev, lorenzo.bianconi, davem, kuba, brouer
On Fri, Nov 20, 2020 at 11:19:34PM +0100, Lorenzo Bianconi wrote:
> Introduce page_pool_put_page_bulk() entry into the API section of
> page_pool.rst
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> Documentation/networking/page_pool.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
> index 43088ddf95e4..e848f5b995b8 100644
> --- a/Documentation/networking/page_pool.rst
> +++ b/Documentation/networking/page_pool.rst
> @@ -97,6 +97,14 @@ a page will cause no race conditions is enough.
>
> * page_pool_get_dma_dir(): Retrieve the stored DMA direction.
>
> +* page_pool_put_page_bulk(): It tries to refill a bulk of count pages into the
Tries to refill a number of pages sounds better?
> + ptr_ring cache holding ptr_ring producer lock. If the ptr_ring is full,
> + page_pool_put_page_bulk() will release leftover pages to the page allocator.
> + page_pool_put_page_bulk() is suitable to be run inside the driver NAPI tx
> + completion loop for the XDP_REDIRECT use case.
> + Please consider the caller must not use data area after running
s/consider/note/
> + page_pool_put_page_bulk(), as this function overwrites it.
> +
> Coding examples
> ===============
>
> --
> 2.28.0
>
Other than that
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst
2020-11-23 8:06 ` Ilias Apalodimas
@ 2020-11-23 8:54 ` Lorenzo Bianconi
0 siblings, 0 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2020-11-23 8:54 UTC (permalink / raw)
To: Ilias Apalodimas; +Cc: Lorenzo Bianconi, netdev, davem, kuba, brouer
[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]
> On Fri, Nov 20, 2020 at 11:19:34PM +0100, Lorenzo Bianconi wrote:
> > Introduce page_pool_put_page_bulk() entry into the API section of
> > page_pool.rst
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> > Documentation/networking/page_pool.rst | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
> > index 43088ddf95e4..e848f5b995b8 100644
> > --- a/Documentation/networking/page_pool.rst
> > +++ b/Documentation/networking/page_pool.rst
> > @@ -97,6 +97,14 @@ a page will cause no race conditions is enough.
> >
> > * page_pool_get_dma_dir(): Retrieve the stored DMA direction.
> >
> > +* page_pool_put_page_bulk(): It tries to refill a bulk of count pages into the
>
> Tries to refill a number of pages sounds better?
ack, will fix it in v2
>
> > + ptr_ring cache holding ptr_ring producer lock. If the ptr_ring is full,
> > + page_pool_put_page_bulk() will release leftover pages to the page allocator.
> > + page_pool_put_page_bulk() is suitable to be run inside the driver NAPI tx
> > + completion loop for the XDP_REDIRECT use case.
> > + Please consider the caller must not use data area after running
>
> s/consider/note/
ack, will fix it in v2
Regards,
Lorenzo
>
> > + page_pool_put_page_bulk(), as this function overwrites it.
> > +
> > Coding examples
> > ===============
> >
> > --
> > 2.28.0
> >
>
>
> Other than that
> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-23 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 22:19 [PATCH net-next] net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst Lorenzo Bianconi
2020-11-23 8:06 ` Ilias Apalodimas
2020-11-23 8:54 ` Lorenzo Bianconi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.