sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget(/translations/zh_CN/networking/page_poolmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/zh_TW/networking/page_poolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/it_IT/networking/page_poolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ja_JP/networking/page_poolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ko_KR/networking/page_poolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/pt_BR/networking/page_poolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/sp_SP/networking/page_poolmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhB/var/lib/git/docbuild/linux/Documentation/networking/page_pool.rsthKubhsection)}(hhh](htitle)}(h Page Pool APIh]h Page Pool API}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hjThe page_pool allocator is optimized for recycling page or page fragment used by skb packet and xdp frame.h]hjThe page_pool allocator is optimized for recycling page or page fragment used by skb packet and xdp frame.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhK hhhhubh)}(hBasic use involves replacing any alloc_pages() calls with page_pool_alloc(), which allocate memory with or without page splitting depending on the requested memory size.h]hBasic use involves replacing any alloc_pages() calls with page_pool_alloc(), which allocate memory with or without page splitting depending on the requested memory size.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhK hhhhubh)}(hIf the driver knows that it always requires full pages or its allocations are always smaller than half a page, it can use one of the more specific API calls:h]hIf the driver knows that it always requires full pages or its allocations are always smaller than half a page, it can use one of the more specific API calls:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhKhhhhubh)}(hX1. page_pool_alloc_pages(): allocate memory without page splitting when driver knows that the memory it need is always bigger than half of the page allocated from page pool. There is no cache line dirtying for 'struct page' when a page is recycled back to the page pool.h]hX1. page_pool_alloc_pages(): allocate memory without page splitting when driver knows that the memory it need is always bigger than half of the page allocated from page pool. There is no cache line dirtying for ‘struct page’ when a page is recycled back to the page pool.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhKhhhhubh)}(hX2. page_pool_alloc_frag(): allocate memory with page splitting when driver knows that the memory it need is always smaller than or equal to half of the page allocated from page pool. Page splitting enables memory saving and thus avoids TLB/cache miss for data access, but there also is some cost to implement page splitting, mainly some cache line dirtying/bouncing for 'struct page' and atomic operation for page->pp_ref_count.h]hX2. page_pool_alloc_frag(): allocate memory with page splitting when driver knows that the memory it need is always smaller than or equal to half of the page allocated from page pool. Page splitting enables memory saving and thus avoids TLB/cache miss for data access, but there also is some cost to implement page splitting, mainly some cache line dirtying/bouncing for ‘struct page’ and atomic operation for page->pp_ref_count.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhKhhhhubh)}(hX=The API keeps track of in-flight pages, in order to let API users know when it is safe to free a page_pool object, the API users must call page_pool_put_page() or page_pool_free_va() to free the page_pool object, or attach the page_pool object to a page_pool-aware object like skbs marked with skb_mark_for_recycle().h]hX=The API keeps track of in-flight pages, in order to let API users know when it is safe to free a page_pool object, the API users must call page_pool_put_page() or page_pool_free_va() to free the page_pool object, or attach the page_pool object to a page_pool-aware object like skbs marked with skb_mark_for_recycle().}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhK hhhhubh)}(hX page_pool_put_page() may be called multiple times on the same page if a page is split into multiple fragments. For the last fragment, it will either recycle the page, or in case of page->_refcount > 1, it will release the DMA mapping and in-flight state accounting.h]hX page_pool_put_page() may be called multiple times on the same page if a page is split into multiple fragments. For the last fragment, it will either recycle the page, or in case of page->_refcount > 1, it will release the DMA mapping and in-flight state accounting.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhK&hhhhubh)}(hXdma_sync_single_range_for_device() is only called for the last fragment when page_pool is created with PP_FLAG_DMA_SYNC_DEV flag, so it depends on the last freed fragment to do the sync_for_device operation for all fragments in the same page when a page is split. The API user must setup pool->p.max_len and pool->p.offset correctly and ensure that page_pool_put_page() is called with dma_sync_size being -1 for fragment API.h]hXdma_sync_single_range_for_device() is only called for the last fragment when page_pool is created with PP_FLAG_DMA_SYNC_DEV flag, so it depends on the last freed fragment to do the sync_for_device operation for all fragments in the same page when a page is split. The API user must setup pool->p.max_len and pool->p.offset correctly and ensure that page_pool_put_page() is called with dma_sync_size being -1 for fragment API.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:7: ./include/net/page_pool/helpers.hhK+hhhhubh)}(hhh](h)}(hArchitecture overviewh]hArchitecture overview}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhK ubh literal_block)}(hX+------------------+ | Driver | +------------------+ ^ | | | v +--------------------------------------------+ | request memory | +--------------------------------------------+ ^ ^ | | | Pool empty | Pool has entries | | v v +-----------------------+ +------------------------+ | alloc (and map) pages | | get page from cache | +-----------------------+ +------------------------+ ^ ^ | | | cache available | No entries, refill | | from ptr-ring | | v v +-----------------+ +------------------+ | Fast cache | | ptr-ring cache | +-----------------+ +------------------+h]hX+------------------+ | Driver | +------------------+ ^ | | | v +--------------------------------------------+ | request memory | +--------------------------------------------+ ^ ^ | | | Pool empty | Pool has entries | | v v +-----------------------+ +------------------------+ | alloc (and map) pages | | get page from cache | +-----------------------+ +------------------------+ ^ ^ | | | cache available | No entries, refill | | from ptr-ring | | v v +-----------------+ +------------------+ | Fast cache | | ptr-ring cache | +-----------------+ +------------------+}hjjsbah}(h]h ]h"]h$]h&]hhƌforcelanguagenonehighlight_args}uh1jhhhhK hjWhhubeh}(h]architecture-overviewah ]h"]architecture overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Monitoringh]h Monitoring}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK-ubh)}(hInformation about allocated page pools, their memory use, recycling statistics etc. can be accessed via the netdev genetlink family (see Documentation/netlink/specs/netdev.yaml).h]hInformation about allocated page pools, their memory use, recycling statistics etc. can be accessed via the netdev genetlink family (see Documentation/netlink/specs/netdev.yaml).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubh)}(hhh](h)}(h Statisticsh]h Statistics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK3ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single page_pool_alloc_stats (C struct)c.page_pool_alloc_statshNtauh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhNubhdesc)}(hhh](hdesc_signature)}(hpage_pool_alloc_statsh]hdesc_signature_line)}(hstruct page_pool_alloc_statsh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(hpage_pool_alloc_statsh]h desc_sig_name)}(hjh]hpage_pool_alloc_stats}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hallocation statisticsh]hallocation statistics}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKnhj/hhubah}(h]h ]h"]h$]h&]uh1j-hjhhhjhKubeh}(h]h ](cstructeh"]h$]h&]domainjJobjtypejKdesctypejKnoindex noindexentrynocontentsentryuh1jhhhjhjhNubh container)}(hX2**Definition**:: struct page_pool_alloc_stats { u64 fast; u64 slow; u64 slow_high_order; u64 empty; u64 refill; u64 waive; }; **Members** ``fast`` successful fast path allocations ``slow`` slow path order-0 allocations ``slow_high_order`` slow path high order allocations ``empty`` ptr ring is empty, so a slow path allocation was forced ``refill`` an allocation which triggered a refill of the cache ``waive`` pages obtained from the ptr ring that cannot be added to the cache due to a NUMA mismatchh](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj[ubh:}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKrhjWubji)}(hstruct page_pool_alloc_stats { u64 fast; u64 slow; u64 slow_high_order; u64 empty; u64 refill; u64 waive; };h]hstruct page_pool_alloc_stats { u64 fast; u64 slow; u64 slow_high_order; u64 empty; u64 refill; u64 waive; };}hjzsbah}(h]h ]h"]h$]h&]hhuh1jhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKthjWubh)}(h **Members**h]j`)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhK}hjWubhdefinition_list)}(hhh](hdefinition_list_item)}(h*``fast`` successful fast path allocations h](hterm)}(h``fast``h]hliteral)}(hjh]hfast}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKphjubh definition)}(hhh]h)}(h successful fast path allocationsh]h successful fast path allocations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKphjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKphjubj)}(h'``slow`` slow path order-0 allocations h](j)}(h``slow``h]j)}(hjh]hslow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKqhjubj)}(hhh]h)}(hslow path order-0 allocationsh]hslow path order-0 allocations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKqhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKqhjubj)}(h5``slow_high_order`` slow path high order allocations h](j)}(h``slow_high_order``h]j)}(hj&h]hslow_high_order}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKrhj ubj)}(hhh]h)}(h slow path high order allocationsh]h slow path high order allocations}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hKrhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj;hKrhjubj)}(hB``empty`` ptr ring is empty, so a slow path allocation was forced h](j)}(h ``empty``h]j)}(hj_h]hempty}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKshjYubj)}(hhh]h)}(h7ptr ring is empty, so a slow path allocation was forcedh]h7ptr ring is empty, so a slow path allocation was forced}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthKshjuubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhjthKshjubj)}(h?``refill`` an allocation which triggered a refill of the cache h](j)}(h ``refill``h]j)}(hjh]hrefill}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKthjubj)}(hhh]h)}(h3an allocation which triggered a refill of the cacheh]h3an allocation which triggered a refill of the cache}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKthjubj)}(hc``waive`` pages obtained from the ptr ring that cannot be added to the cache due to a NUMA mismatchh](j)}(h ``waive``h]j)}(hjh]hwaive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKuhjubj)}(hhh]h)}(hYpages obtained from the ptr ring that cannot be added to the cache due to a NUMA mismatchh]hYpages obtained from the ptr ring that cannot be added to the cache due to a NUMA mismatch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKuhjubeh}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"page_pool_recycle_stats (C struct)c.page_pool_recycle_statshNtauh1jhjhhhjhNubj)}(hhh](j)}(hpage_pool_recycle_statsh]j)}(hstruct page_pool_recycle_statsh](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhK|ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhj7hK|ubj)}(hpage_pool_recycle_statsh]j)}(hj$h]hpage_pool_recycle_stats}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubah}(h]h ](jjeh"]h$]h&]hhuh1jhj&hhhj7hK|ubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj"hhhj7hK|ubah}(h]jah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj7hK|hjhhubj.)}(hhh]h)}(hrecycling (freeing) statisticsh]hrecycling (freeing) statistics}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjihhubah}(h]h ]h"]h$]h&]uh1j-hjhhhj7hK|ubeh}(h]h ](jJstructeh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjhjhNubjV)}(hX**Definition**:: struct page_pool_recycle_stats { u64 cached; u64 cache_full; u64 ring; u64 ring_full; u64 released_refcnt; }; **Members** ``cached`` recycling placed page in the page pool cache ``cache_full`` page pool cache was full ``ring`` page placed into the ptr ring ``ring_full`` page released from page pool because the ptr ring was full ``released_refcnt`` page released (and not recycled) because refcnt > 1h](h)}(h**Definition**::h](j`)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubji)}(hstruct page_pool_recycle_stats { u64 cached; u64 cache_full; u64 ring; u64 ring_full; u64 released_refcnt; };h]hstruct page_pool_recycle_stats { u64 cached; u64 cache_full; u64 ring; u64 ring_full; u64 released_refcnt; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubh)}(h **Members**h]j`)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubj)}(hhh](j)}(h8``cached`` recycling placed page in the page pool cache h](j)}(h ``cached``h]j)}(hjh]hcached}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h,recycling placed page in the page pool cacheh]h,recycling placed page in the page pool cache}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h(``cache_full`` page pool cache was full h](j)}(h``cache_full``h]j)}(hjh]h cache_full}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhj ubj)}(hhh]h)}(hpage pool cache was fullh]hpage pool cache was full}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hKhj(ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj'hKhjubj)}(h'``ring`` page placed into the ptr ring h](j)}(h``ring``h]j)}(hjKh]hring}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjEubj)}(hhh]h)}(hpage placed into the ptr ringh]hpage placed into the ptr ring}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hKhjaubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj`hKhjubj)}(hI``ring_full`` page released from page pool because the ptr ring was full h](j)}(h ``ring_full``h]j)}(hjh]h ring_full}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhj~ubj)}(hhh]h)}(h:page released from page pool because the ptr ring was fullh]h:page released from page pool because the ptr ring was full}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hG``released_refcnt`` page released (and not recycled) because refcnt > 1h](j)}(h``released_refcnt``h]j)}(hjh]hreleased_refcnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h3page released (and not recycled) because refcnt > 1h]h3page released (and not recycled) because refcnt > 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_stats (C struct)c.page_pool_statshNtauh1jhjhhhjhNubj)}(hhh](j)}(hpage_pool_statsh]j)}(hstruct page_pool_statsh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj$hKubj)}(hpage_pool_statsh]j)}(hjh]hpage_pool_stats}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj3ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj$hKubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjhhhj$hKubah}(h]j ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj$hKhj hhubj.)}(hhh]h)}(h!combined page pool use statisticsh]h!combined page pool use statistics}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjVhhubah}(h]h ]h"]h$]h&]uh1j-hj hhhj$hKubeh}(h]h ](jJstructeh"]h$]h&]jOjJjPjqjQjqjRjSjTuh1jhhhjhjhNubjV)}(hX**Definition**:: struct page_pool_stats { struct page_pool_alloc_stats alloc_stats; struct page_pool_recycle_stats recycle_stats; }; **Members** ``alloc_stats`` see struct page_pool_alloc_stats ``recycle_stats`` see struct page_pool_recycle_statsh](h)}(h**Definition**::h](j`)}(h**Definition**h]h Definition}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjyubh:}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjuubji)}(h{struct page_pool_stats { struct page_pool_alloc_stats alloc_stats; struct page_pool_recycle_stats recycle_stats; };h]h{struct page_pool_stats { struct page_pool_alloc_stats alloc_stats; struct page_pool_recycle_stats recycle_stats; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjuubh)}(h **Members**h]j`)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjuubj)}(hhh](j)}(h1``alloc_stats`` see struct page_pool_alloc_stats h](j)}(h``alloc_stats``h]j)}(hjh]h alloc_stats}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h see struct page_pool_alloc_statsh]h see struct page_pool_alloc_stats}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h4``recycle_stats`` see struct page_pool_recycle_statsh](j)}(h``recycle_stats``h]j)}(hjh]h recycle_stats}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h"see struct page_pool_recycle_statsh]h"see struct page_pool_recycle_stats}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjhhhjhNubh)}(h**Description**h]j`)}(hjBh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj@ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjhhubh)}(hQWrapper struct for combining page pool stats with different storage requirements.h]hQWrapper struct for combining page pool stats with different storage requirements.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:53: ./include/net/page_pool/types.hhKhjhhubeh}(h] statisticsah ]h"] statisticsah$]h&]uh1hhjhhhhhK3ubeh}(h] monitoringah ]h"] monitoringah$]h&]uh1hhhhhhhhK-ubh)}(hhh](h)}(h API interfaceh]h API interface}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhhhhhK;ubh)}(hXThe number of pools created **must** match the number of NAPI contexts / queues unless hardware restrictions make that impossible. This would otherwise beat the purpose of page pool, which is allocate pages fast from cache without locking. This lockless guarantee naturally comes from running under a NAPI softirq. The protection doesn't strictly have to be NAPI, any guarantee that allocating a page will cause no race conditions is enough.h](hThe number of pools created }(hjhhhNhNubj`)}(h**must**h]hmust}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubhX match the number of NAPI contexts / queues unless hardware restrictions make that impossible. This would otherwise beat the purpose of page pool, which is allocate pages fast from cache without locking. This lockless guarantee naturally comes from running under a NAPI softirq. The protection doesn’t strictly have to be NAPI, any guarantee that allocating a page will cause no race conditions is enough.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj: ubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:72: ./net/core/page_pool.chMvhj6 ubj)}(hhh]j)}(hQ``const struct page_pool_params *params`` parameters, see struct page_pool_paramsh](j)}(h)``const struct page_pool_params *params``h]j)}(hj[ h]h%const struct page_pool_params *params}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:72: ./net/core/page_pool.chMxhjU ubj)}(hhh]h)}(h'parameters, see struct page_pool_paramsh]h'parameters, see struct page_pool_params}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:72: ./net/core/page_pool.chMshjq ubah}(h]h ]h"]h$]h&]uh1jhjU ubeh}(h]h ]h"]h$]h&]uh1jhjp hMxhjR ubah}(h]h ]h"]h$]h&]uh1jhj6 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_params (C struct)c.page_pool_paramshNtauh1jhjwhhhNhNubj)}(hhh](j)}(hpage_pool_paramsh]j)}(hstruct page_pool_paramsh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hKubj)}(hpage_pool_paramsh]j)}(hj h]hpage_pool_params}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj hhhj hKubah}(h]j ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj hKhj hhubj.)}(hhh]h)}(hpage pool parametersh]hpage pool parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKGhj hhubah}(h]h ]h"]h$]h&]uh1j-hj hhhj hKubeh}(h]h ](jJstructeh"]h$]h&]jOjJjPj jQj jRjSjTuh1jhhhjwhNhNubjV)}(hX**Definition**:: struct page_pool_params { struct { unsigned int order; unsigned int pool_size; int nid; struct device *dev; struct napi_struct *napi; enum dma_data_direction dma_dir; unsigned int max_len; unsigned int offset; }; struct { struct net_device *netdev; unsigned int queue_idx; unsigned int flags; }; }; **Members** ``{unnamed_struct}`` anonymous ``order`` 2^order pages on allocation ``pool_size`` size of the ptr_ring ``nid`` NUMA node id to allocate from pages from ``dev`` device, for DMA pre-mapping purposes ``napi`` NAPI which is the sole consumer of pages, otherwise NULL ``dma_dir`` DMA mapping direction ``max_len`` max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV ``offset`` DMA sync address offset for PP_FLAG_DMA_SYNC_DEV ``{unnamed_struct}`` anonymous ``netdev`` netdev this pool will serve (leave as NULL if none or multiple) ``queue_idx`` queue idx this page_pool is being created for. ``flags`` PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h](h)}(h**Definition**::h](j`)}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKKhj ubji)}(hXstruct page_pool_params { struct { unsigned int order; unsigned int pool_size; int nid; struct device *dev; struct napi_struct *napi; enum dma_data_direction dma_dir; unsigned int max_len; unsigned int offset; }; struct { struct net_device *netdev; unsigned int queue_idx; unsigned int flags; }; };h]hXstruct page_pool_params { struct { unsigned int order; unsigned int pool_size; int nid; struct device *dev; struct napi_struct *napi; enum dma_data_direction dma_dir; unsigned int max_len; unsigned int offset; }; struct { struct net_device *netdev; unsigned int queue_idx; unsigned int flags; }; };}hj4 sbah}(h]h ]h"]h$]h&]hhuh1jhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKMhj ubh)}(h **Members**h]j`)}(hjE h]hMembers}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjC ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhK_hj ubj)}(hhh](j)}(h``{unnamed_struct}`` anonymous h](j)}(h``{unnamed_struct}``h]j)}(hjd h]h{unnamed_struct}}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKhj^ ubj)}(hhh]h)}(h anonymoush]h anonymous}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy hKhjz ubah}(h]h ]h"]h$]h&]uh1jhj^ ubeh}(h]h ]h"]h$]h&]uh1jhjy hKhj[ ubj)}(h&``order`` 2^order pages on allocation h](j)}(h ``order``h]j)}(hj h]horder}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKJhj ubj)}(hhh]h)}(h2^order pages on allocationh]h2^order pages on allocation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKJhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKJhj[ ubj)}(h#``pool_size`` size of the ptr_ring h](j)}(h ``pool_size``h]j)}(hj h]h pool_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKKhj ubj)}(hhh]h)}(hsize of the ptr_ringh]hsize of the ptr_ring}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKKhj[ ubj)}(h1``nid`` NUMA node id to allocate from pages from h](j)}(h``nid``h]j)}(hj h]hnid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKLhj ubj)}(hhh]h)}(h(NUMA node id to allocate from pages fromh]h(NUMA node id to allocate from pages from}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ hKLhj% ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj$ hKLhj[ ubj)}(h-``dev`` device, for DMA pre-mapping purposes h](j)}(h``dev``h]j)}(hjH h]hdev}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKMhjB ubj)}(hhh]h)}(h$device, for DMA pre-mapping purposesh]h$device, for DMA pre-mapping purposes}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj] hKMhj^ ubah}(h]h ]h"]h$]h&]uh1jhjB ubeh}(h]h ]h"]h$]h&]uh1jhj] hKMhj[ ubj)}(hB``napi`` NAPI which is the sole consumer of pages, otherwise NULL h](j)}(h``napi``h]j)}(hj h]hnapi}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKNhj{ ubj)}(hhh]h)}(h8NAPI which is the sole consumer of pages, otherwise NULLh]h8NAPI which is the sole consumer of pages, otherwise NULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKNhj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubeh}(h]h ]h"]h$]h&]uh1jhj hKNhj[ ubj)}(h"``dma_dir`` DMA mapping direction h](j)}(h ``dma_dir``h]j)}(hj h]hdma_dir}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKOhj ubj)}(hhh]h)}(hDMA mapping directionh]hDMA mapping direction}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKOhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKOhj[ ubj)}(h>``max_len`` max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV h](j)}(h ``max_len``h]j)}(hj h]hmax_len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKPhj ubj)}(hhh]h)}(h1max DMA sync memory size for PP_FLAG_DMA_SYNC_DEVh]h1max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKPhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKPhj[ ubj)}(h<``offset`` DMA sync address offset for PP_FLAG_DMA_SYNC_DEV h](j)}(h ``offset``h]j)}(hj, h]hoffset}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj* ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKQhj& ubj)}(hhh]h)}(h0DMA sync address offset for PP_FLAG_DMA_SYNC_DEVh]h0DMA sync address offset for PP_FLAG_DMA_SYNC_DEV}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA hKQhjB ubah}(h]h ]h"]h$]h&]uh1jhj& ubeh}(h]h ]h"]h$]h&]uh1jhjA hKQhj[ ubj)}(h``{unnamed_struct}`` anonymous h](j)}(h``{unnamed_struct}``h]j)}(hje h]h{unnamed_struct}}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKhj_ ubj)}(hhh]h)}(h anonymoush]h anonymous}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz hKhj{ ubah}(h]h ]h"]h$]h&]uh1jhj_ ubeh}(h]h ]h"]h$]h&]uh1jhjz hKhj[ ubj)}(hK``netdev`` netdev this pool will serve (leave as NULL if none or multiple) h](j)}(h ``netdev``h]j)}(hj h]hnetdev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKShj ubj)}(hhh]h)}(h?netdev this pool will serve (leave as NULL if none or multiple)h]h?netdev this pool will serve (leave as NULL if none or multiple)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKShj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKShj[ ubj)}(h=``queue_idx`` queue idx this page_pool is being created for. h](j)}(h ``queue_idx``h]j)}(hj h]h queue_idx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKThj ubj)}(hhh]h)}(h.queue idx this page_pool is being created for.h]h.queue idx this page_pool is being created for.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKThj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKThj[ ubj)}(hf``flags`` PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h](j)}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:75: ./include/net/page_pool/types.hhKUhj ubj)}(hhh]h)}(h\PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h]h\PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj% hKUhj& ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj% hKUhj[ ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&page_pool_dev_alloc_pages (C function)c.page_pool_dev_alloc_pageshNtauh1jhjwhhhNhNubj)}(hhh](j)}(h@struct page * page_pool_dev_alloc_pages (struct page_pool *pool)h]j)}(h>struct page *page_pool_dev_alloc_pages(struct page_pool *pool)h](j)}(hjh]hstruct}(hji hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKWubj)}(h h]h }(hjw hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje hhhjv hKWubh)}(hhh]j)}(hpageh]hpage}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj modnameN classnameNj,j/)}j2]j5)}j(page_pool_dev_alloc_pagessbc.page_pool_dev_alloc_pagesasbuh1hhje hhhjv hKWubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje hhhjv hKWubjJ)}(hjMh]h*}(hj hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhje hhhjv hKWubj)}(hpage_pool_dev_alloc_pagesh]j)}(hj h]hpage_pool_dev_alloc_pages}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhje hhhjv hKWubjr)}(h(struct page_pool *pool)h]jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j c.page_pool_dev_alloc_pagesasbuh1hhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjJ)}(hjMh]h*}(hj-hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj ubj)}(hpoolh]hpool}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhj ubah}(h]h ]h"]h$]h&]hhuh1jqhje hhhjv hKWubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hja hhhjv hKWubah}(h]j\ ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjv hKWhj^ hhubj.)}(hhh]h)}(hallocate a page.h]hallocate a page.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKWhjahhubah}(h]h ]h"]h$]h&]uh1j-hj^ hhhjv hKWubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPj|jQj|jRjSjTuh1jhhhjwhNhNubjV)}(h**Parameters** ``struct page_pool *pool`` pool from which to allocate **Description** Get a page from the page allocator or page_pool caches.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhK[hjubj)}(hhh]j)}(h7``struct page_pool *pool`` pool from which to allocate h](j)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKXhjubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKZhjubh)}(h7Get a page from the page allocator or page_pool caches.h]h7Get a page from the page allocator or page_pool caches.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKYhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%page_pool_dev_alloc_frag (C function)c.page_pool_dev_alloc_fraghNtauh1jhjwhhhNhNubj)}(hhh](j)}(hhstruct page * page_pool_dev_alloc_frag (struct page_pool *pool, unsigned int *offset, unsigned int size)h]j)}(hfstruct page *page_pool_dev_alloc_frag(struct page_pool *pool, unsigned int *offset, unsigned int size)h](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKdubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj2hKdubh)}(hhh]j)}(hpageh]hpage}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjFmodnameN classnameNj,j/)}j2]j5)}j(page_pool_dev_alloc_fragsbc.page_pool_dev_alloc_fragasbuh1hhj!hhhj2hKdubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj2hKdubjJ)}(hjMh]h*}(hjshhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj!hhhj2hKdubj)}(hpage_pool_dev_alloc_fragh]j)}(hjbh]hpage_pool_dev_alloc_frag}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj!hhhj2hKdubjr)}(hA(struct page_pool *pool, unsigned int *offset, unsigned int size)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j`c.page_pool_dev_alloc_fragasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int *offseth](hdesc_sig_keyword_type)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hinth]hint}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjJ)}(hjMh]h*}(hjJhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj ubj)}(hoffseth]hoffset}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubeh}(h]h ]h"]h$]h&]hhuh1jqhj!hhhj2hKdubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjhhhj2hKdubah}(h]jah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj2hKdhjhhubj.)}(hhh]h)}(hallocate a page fragment.h]hallocate a page fragment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKdhjhhubah}(h]h ]h"]h$]h&]uh1j-hjhhhj2hKdubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjwhNhNubjV)}(hX9**Parameters** ``struct page_pool *pool`` pool from which to allocate ``unsigned int *offset`` offset to the allocated page ``unsigned int size`` requested size **Description** Get a page fragment from the page allocator or page_pool caches. **Return** allocated page fragment, otherwise return NULL.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhhjubj)}(hhh](j)}(h7``struct page_pool *pool`` pool from which to allocate h](j)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKehj ubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKehj)ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj(hKehj ubj)}(h6``unsigned int *offset`` offset to the allocated page h](j)}(h``unsigned int *offset``h]j)}(hjLh]hunsigned int *offset}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKfhjFubj)}(hhh]h)}(hoffset to the allocated pageh]hoffset to the allocated page}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahKfhjbubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjahKfhj ubj)}(h%``unsigned int size`` requested size h](j)}(h``unsigned int size``h]j)}(hjh]hunsigned int size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKghjubj)}(hhh]h)}(hrequested sizeh]hrequested size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKghjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKghj ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKihjubh)}(h@Get a page fragment from the page allocator or page_pool caches.h]h@Get a page fragment from the page allocator or page_pool caches.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhhjubh)}(h **Return**h]j`)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKjhjubh)}(h/allocated page fragment, otherwise return NULL.h]h/allocated page fragment, otherwise return NULL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKkhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j page_pool_dev_alloc (C function)c.page_pool_dev_allochNtauh1jhjwhhhNhNubj)}(hhh](j)}(hdstruct page * page_pool_dev_alloc (struct page_pool *pool, unsigned int *offset, unsigned int *size)h]j)}(hbstruct page *page_pool_dev_alloc(struct page_pool *pool, unsigned int *offset, unsigned int *size)h](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhj9hKubh)}(hhh]j)}(hpageh]hpage}(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjMmodnameN classnameNj,5j/)}j2]j5)}j(page_pool_dev_allocsbc.page_pool_dev_allocasbuh1hhj(hhhj9hKubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhj9hKubjJ)}(hjMh]h*}(hjzhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj(hhhj9hKubj)}(hpage_pool_dev_alloch]j)}(hjih]hpage_pool_dev_alloc}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj(hhhj9hKubjr)}(hB(struct page_pool *pool, unsigned int *offset, unsigned int *size)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]jgc.page_pool_dev_allocasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int *offseth](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinth]hint}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjNhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hoffseth]hoffset}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int *sizeh](j)}(hunsignedh]hunsigned}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjpubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubeh}(h]h ]h"]h$]h&]hhuh1jqhj(hhhj9hKubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj$hhhj9hKubah}(h]jah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj9hKhj!hhubj.)}(hhh]h)}(h#allocate a page or a page fragment.h]h#allocate a page or a page fragment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j-hj!hhhj9hKubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjwhNhNubjV)}(hX**Parameters** ``struct page_pool *pool`` pool from which to allocate ``unsigned int *offset`` offset to the allocated page ``unsigned int *size`` in as the requested size, out as the allocated size **Description** Get a page or a page fragment from the page allocator or page_pool caches depending on the requested size in order to allocate memory with least memory utilization and performance penalty. **Return** allocated page or page fragment, otherwise return NULL.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh](j)}(h7``struct page_pool *pool`` pool from which to allocate h](j)}(h``struct page_pool *pool``h]j)}(hj$h]hstruct page_pool *pool}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hKhj:ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj9hKhjubj)}(h6``unsigned int *offset`` offset to the allocated page h](j)}(h``unsigned int *offset``h]j)}(hj]h]hunsigned int *offset}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjWubj)}(hhh]h)}(hoffset to the allocated pageh]hoffset to the allocated page}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhKhjsubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjrhKhjubj)}(hK``unsigned int *size`` in as the requested size, out as the allocated size h](j)}(h``unsigned int *size``h]j)}(hjh]hunsigned int *size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(h3in as the requested size, out as the allocated sizeh]h3in as the requested size, out as the allocated size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(hGet a page or a page fragment from the page allocator or page_pool caches depending on the requested size in order to allocate memory with least memory utilization and performance penalty.h]hGet a page or a page fragment from the page allocator or page_pool caches depending on the requested size in order to allocate memory with least memory utilization and performance penalty.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(h **Return**h]j`)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(h7allocated page or page fragment, otherwise return NULL.h]h7allocated page or page fragment, otherwise return NULL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#page_pool_dev_alloc_va (C function)c.page_pool_dev_alloc_vahNtauh1jhjwhhhNhNubj)}(hhh](j)}(hJvoid * page_pool_dev_alloc_va (struct page_pool *pool, unsigned int *size)h]j)}(hHvoid *page_pool_dev_alloc_va(struct page_pool *pool, unsigned int *size)h](j)}(hvoidh]hvoid}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhjKhKubjJ)}(hjMh]h*}(hjZhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj9hhhjKhKubj)}(hpage_pool_dev_alloc_vah]j)}(hpage_pool_dev_alloc_vah]hpage_pool_dev_alloc_va}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjgubah}(h]h ](jjeh"]h$]h&]hhuh1jhj9hhhjKhKubjr)}(h,(struct page_pool *pool, unsigned int *size)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j5)}j(jmsbc.page_pool_dev_alloc_vaasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int *sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hj1hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hsizeh]hsize}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubeh}(h]h ]h"]h$]h&]hhuh1jqhj9hhhjKhKubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj5hhhjKhKubah}(h]j0ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjKhKhj2hhubj.)}(hhh]h)}(h5allocate a page or a page fragment and return its va.h]h5allocate a page or a page fragment and return its va.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjehhubah}(h]h ]h"]h$]h&]uh1j-hj2hhhjKhKubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjwhNhNubjV)}(hXt**Parameters** ``struct page_pool *pool`` pool from which to allocate ``unsigned int *size`` in as the requested size, out as the allocated size **Description** This is just a thin wrapper around the page_pool_alloc() API, and it returns va of the allocated page or page fragment. **Return** the va for the allocated page or page fragment, otherwise return NULL.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh](j)}(h7``struct page_pool *pool`` pool from which to allocate h](j)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hK``unsigned int *size`` in as the requested size, out as the allocated size h](j)}(h``unsigned int *size``h]j)}(hjh]hunsigned int *size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(h3in as the requested size, out as the allocated sizeh]h3in as the requested size, out as the allocated size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(hwThis is just a thin wrapper around the page_pool_alloc() API, and it returns va of the allocated page or page fragment.h]hwThis is just a thin wrapper around the page_pool_alloc() API, and it returns va of the allocated page or page fragment.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(h **Return**h]j`)}(hjDh]hReturn}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjBubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(hFthe va for the allocated page or page fragment, otherwise return NULL.h]hFthe va for the allocated page or page fragment, otherwise return NULL.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"page_pool_get_dma_dir (C function)c.page_pool_get_dma_dirhNtauh1jhjwhhhNhNubj)}(hhh](j)}(hLenum dma_data_direction page_pool_get_dma_dir (const struct page_pool *pool)h]j)}(hKenum dma_data_direction page_pool_get_dma_dir(const struct page_pool *pool)h](j)}(henumh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j)}(hdma_data_directionh]hdma_data_direction}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j5)}j(page_pool_get_dma_dirsbc.page_pool_get_dma_dirasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hpage_pool_get_dma_dirh]j)}(hjh]hpage_pool_get_dma_dir}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubjr)}(h(const struct page_pool *pool)h]jx)}(hconst struct page_pool *poolh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj2modnameN classnameNj,j/)}j2]jc.page_pool_get_dma_dirasbuh1hhjubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hj\hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubah}(h]h ]h"]h$]h&]hhuh1jqhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjhhhjhKubah}(h]j|ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjhKhj~hhubj.)}(hhh]h)}(h"Retrieve the stored DMA direction.h]h"Retrieve the stored DMA direction.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j-hj~hhhjhKubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjwhNhNubjV)}(h**Parameters** ``const struct page_pool *pool`` pool from which page was allocated **Description** Get the stored dma direction. A driver might decide to store this locally and avoid the extra cache line from page_pool to determine the direction.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]j)}(hD``const struct page_pool *pool`` pool from which page was allocated h](j)}(h ``const struct page_pool *pool``h]j)}(hjh]hconst struct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubh)}(hGet the stored dma direction. A driver might decide to store this locally and avoid the extra cache line from page_pool to determine the direction.h]hGet the stored dma direction. A driver might decide to store this locally and avoid the extra cache line from page_pool to determine the direction.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_put_page (C function)c.page_pool_put_pagehNtauh1jhjwhhhNhNubj)}(hhh](j)}(hrvoid page_pool_put_page (struct page_pool *pool, struct page *page, unsigned int dma_sync_size, bool allow_direct)h]j)}(hqvoid page_pool_put_page(struct page_pool *pool, struct page *page, unsigned int dma_sync_size, bool allow_direct)h](j)}(hvoidh]hvoid}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM\ubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhhjbhM\ubj)}(hpage_pool_put_pageh]j)}(hpage_pool_put_pageh]hpage_pool_put_page}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjqubah}(h]h ](jjeh"]h$]h&]hhuh1jhjPhhhjbhM\ubjr)}(hZ(struct page_pool *pool, struct page *page, unsigned int dma_sync_size, bool allow_direct)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j5)}j(jwsbc.page_pool_put_pageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hstruct page *pageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hpageh]hpage}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj#modnameN classnameNj,j/)}j2]jc.page_pool_put_pageasbuh1hhjubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjMhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpageh]hpage}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hunsigned int dma_sync_sizeh](j)}(hunsignedh]hunsigned}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h dma_sync_sizeh]h dma_sync_size}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hbool allow_directh](j)}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubeh}(h]h ]h"]h$]h&]hhuh1jqhjPhhhjbhM\ubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjLhhhjbhM\ubah}(h]jGah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjbhM\hjIhhubj.)}(hhh]h)}(h'release a reference to a page pool pageh]h'release a reference to a page pool page}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM\hjhhubah}(h]h ]h"]h$]h&]uh1j-hjIhhhjbhM\ubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPj"jQj"jRjSjTuh1jhhhjwhNhNubjV)}(hX**Parameters** ``struct page_pool *pool`` pool from which page was allocated ``struct page *page`` page to release a reference on ``unsigned int dma_sync_size`` how much of the page may have been touched by the device ``bool allow_direct`` released by the consumer, allow lockless caching **Description** The outcome of this depends on the page refcnt. If the driver bumps the refcnt > 1 this will unmap the page. If the page refcnt is 1 the allocator owns the page and will try to recycle it in one of the pool caches. If PP_FLAG_DMA_SYNC_DEV is set, the page will be synced for_device using dma_sync_single_range_for_device().h](h)}(h**Parameters**h]j`)}(hj,h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj*ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM`hj&ubj)}(hhh](j)}(h>``struct page_pool *pool`` pool from which page was allocated h](j)}(h``struct page_pool *pool``h]j)}(hjKh]hstruct page_pool *pool}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM]hjEubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hM]hjaubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj`hM]hjBubj)}(h5``struct page *page`` page to release a reference on h](j)}(h``struct page *page``h]j)}(hjh]hstruct page *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM^hj~ubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM^hjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjhM^hjBubj)}(hX``unsigned int dma_sync_size`` how much of the page may have been touched by the device h](j)}(h``unsigned int dma_sync_size``h]j)}(hjh]hunsigned int dma_sync_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM_hjubj)}(hhh]h)}(h8how much of the page may have been touched by the deviceh]h8how much of the page may have been touched by the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM_hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM_hjBubj)}(hG``bool allow_direct`` released by the consumer, allow lockless caching h](j)}(h``bool allow_direct``h]j)}(hjh]hbool allow_direct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM`hjubj)}(hhh]h)}(h0released by the consumer, allow lockless cachingh]h0released by the consumer, allow lockless caching}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM`hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hM`hjBubeh}(h]h ]h"]h$]h&]uh1jhj&ubh)}(h**Description**h]j`)}(hj1h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj/ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMbhj&ubh)}(hXCThe outcome of this depends on the page refcnt. If the driver bumps the refcnt > 1 this will unmap the page. If the page refcnt is 1 the allocator owns the page and will try to recycle it in one of the pool caches. If PP_FLAG_DMA_SYNC_DEV is set, the page will be synced for_device using dma_sync_single_range_for_device().h]hXCThe outcome of this depends on the page refcnt. If the driver bumps the refcnt > 1 this will unmap the page. If the page refcnt is 1 the allocator owns the page and will try to recycle it in one of the pool caches. If PP_FLAG_DMA_SYNC_DEV is set, the page will be synced for_device using dma_sync_single_range_for_device().}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMahj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$page_pool_put_full_page (C function)c.page_pool_put_full_pagehNtauh1jhjwhhhNhNubj)}(hhh](j)}(h[void page_pool_put_full_page (struct page_pool *pool, struct page *page, bool allow_direct)h]j)}(hZvoid page_pool_put_full_page(struct page_pool *pool, struct page *page, bool allow_direct)h](j)}(hvoidh]hvoid}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMyubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhjhMyubj)}(hpage_pool_put_full_pageh]j)}(hpage_pool_put_full_pageh]hpage_pool_put_full_page}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjrhhhjhMyubjr)}(h>(struct page_pool *pool, struct page *page, bool allow_direct)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j5)}j(jsbc.page_pool_put_full_pageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hstruct page *pageh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j)}(hpageh]hpage}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjEmodnameN classnameNj,j/)}j2]jc.page_pool_put_full_pageasbuh1hhj!ubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjJ)}(hjMh]h*}(hjohhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj!ubj)}(hpageh]hpage}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubjx)}(hbool allow_directh](j)}(hjh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjubeh}(h]h ]h"]h$]h&]hhuh1jqhjrhhhjhMyubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjnhhhjhMyubah}(h]jiah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjhMyhjkhhubj.)}(hhh]h)}(h'release a reference on a page pool pageh]h'release a reference on a page pool page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMyhjhhubah}(h]h ]h"]h$]h&]uh1j-hjkhhhjhMyubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPjjQjjRjSjTuh1jhhhjwhNhNubjV)}(hXu**Parameters** ``struct page_pool *pool`` pool from which page was allocated ``struct page *page`` page to release a reference on ``bool allow_direct`` released by the consumer, allow lockless caching **Description** Similar to page_pool_put_page(), but will DMA sync the entire memory area as configured in :c:type:`page_pool_params.max_len `.h](h)}(h**Parameters**h]j`)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM}hjubj)}(hhh](j)}(h>``struct page_pool *pool`` pool from which page was allocated h](j)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMzhjubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMzhj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0hMzhjubj)}(h5``struct page *page`` page to release a reference on h](j)}(h``struct page *page``h]j)}(hjTh]hstruct page *page}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM{hjNubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihM{hjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihM{hjubj)}(hG``bool allow_direct`` released by the consumer, allow lockless caching h](j)}(h``bool allow_direct``h]j)}(hjh]hbool allow_direct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM|hjubj)}(hhh]h)}(h0released by the consumer, allow lockless cachingh]h0released by the consumer, allow lockless caching}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM|hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j`)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM~hjubh)}(hSimilar to page_pool_put_page(), but will DMA sync the entire memory area as configured in :c:type:`page_pool_params.max_len `.h](h[Similar to page_pool_put_page(), but will DMA sync the entire memory area as configured in }(hjhhhNhNubh)}(h5:c:type:`page_pool_params.max_len `h]j)}(hjh]hpage_pool_params.max_len}(hjhhhNhNubah}(h]h ](xrefjJc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocnetworking/page_pool refdomainjJreftypetype refexplicitrefwarnj,j/)}j2]sb reftargetpage_pool_paramsuh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhM}hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hM}hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%page_pool_recycle_direct (C function)c.page_pool_recycle_directhNtauh1jhjwhhhNhNubj)}(hhh](j)}(hIvoid page_pool_recycle_direct (struct page_pool *pool, struct page *page)h]j)}(hHvoid page_pool_recycle_direct(struct page_pool *pool, struct page *page)h](j)}(hvoidh]hvoid}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhjDhMubj)}(hpage_pool_recycle_directh]j)}(hpage_pool_recycle_directh]hpage_pool_recycle_direct}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjSubah}(h]h ](jjeh"]h$]h&]hhuh1jhj2hhhjDhMubjr)}(h+(struct page_pool *pool, struct page *page)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubh)}(hhh]j)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjmodnameN classnameNj,j/)}j2]j5)}j(jYsbc.page_pool_recycle_directasbuh1hhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubjJ)}(hjMh]h*}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjoubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjkubjx)}(hstruct page *pageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hpageh]hpage}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj modnameN classnameNj,j/)}j2]jc.page_pool_recycle_directasbuh1hhjubj)}(h h]h }(hj! hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hjMh]h*}(hj/ hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(hpageh]hpage}(hj< hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhjkubeh}(h]h ]h"]h$]h&]hhuh1jqhj2hhhjDhMubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj.hhhjDhMubah}(h]j)ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjDhMhj+hhubj.)}(hhh]h)}(h'release a reference on a page pool pageh]h'release a reference on a page pool page}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhjc hhubah}(h]h ]h"]h$]h&]uh1j-hj+hhhjDhMubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPj~ jQj~ jRjSjTuh1jhhhjwhNhNubjV)}(hX3**Parameters** ``struct page_pool *pool`` pool from which page was allocated ``struct page *page`` page to release a reference on **Description** Similar to page_pool_put_full_page() but caller must guarantee safe context (e.g NAPI), since it will recycle the page directly into the pool fast cache.h](h)}(h**Parameters**h]j`)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj ubj)}(hhh](j)}(h>``struct page_pool *pool`` pool from which page was allocated h](j)}(h``struct page_pool *pool``h]j)}(hj h]hstruct page_pool *pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj ubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj ubj)}(h5``struct page *page`` page to release a reference on h](j)}(h``struct page *page``h]j)}(hj h]hstruct page *page}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj ubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j`)}(hj!h]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj!ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj ubh)}(hSimilar to page_pool_put_full_page() but caller must guarantee safe context (e.g NAPI), since it will recycle the page directly into the pool fast cache.h]hSimilar to page_pool_put_full_page() but caller must guarantee safe context (e.g NAPI), since it will recycle the page directly into the pool fast cache.}(hj1!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_free_va (C function)c.page_pool_free_vahNtauh1jhjwhhhNhNubj)}(hhh](j)}(hLvoid page_pool_free_va (struct page_pool *pool, void *va, bool allow_direct)h]j)}(hKvoid page_pool_free_va(struct page_pool *pool, void *va, bool allow_direct)h](j)}(hvoidh]hvoid}(hj`!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\!hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hjo!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\!hhhjn!hMubj)}(hpage_pool_free_vah]j)}(hpage_pool_free_vah]hpage_pool_free_va}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj}!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj\!hhhjn!hMubjr)}(h5(struct page_pool *pool, void *va, bool allow_direct)h](jx)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j)}(h page_poolh]h page_pool}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj!modnameN classnameNj,j/)}j2]j5)}j(j!sbc.page_pool_free_vaasbuh1hhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjJ)}(hjMh]h*}(hj!hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj!ubj)}(hpoolh]hpool}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhj!ubjx)}(hvoid *vah](j)}(hvoidh]hvoid}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj "ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj "ubjJ)}(hjMh]h*}(hj+"hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj "ubj)}(hvah]hva}(hj8"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj "ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhj!ubjx)}(hbool allow_directh](j)}(hjh]hbool}(hjQ"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM"ubj)}(h h]h }(hj^"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM"ubj)}(h allow_directh]h allow_direct}(hjl"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjM"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhj!ubeh}(h]h ]h"]h$]h&]hhuh1jqhj\!hhhjn!hMubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hjX!hhhjn!hMubah}(h]jS!ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhjn!hMhjU!hhubj.)}(hhh]h)}(hfree a va into the page_poolh]hfree a va into the page_pool}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj"hhubah}(h]h ]h"]h$]h&]uh1j-hjU!hhhjn!hMubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPj"jQj"jRjSjTuh1jhhhjwhNhNubjV)}(h**Parameters** ``struct page_pool *pool`` pool from which va was allocated ``void *va`` va to be freed ``bool allow_direct`` freed by the consumer, allow lockless caching **Description** Free a va allocated from page_pool_allo_va().h](h)}(h**Parameters**h]j`)}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj"ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj"ubj)}(hhh](j)}(h<``struct page_pool *pool`` pool from which va was allocated h](j)}(h``struct page_pool *pool``h]j)}(hj"h]hstruct page_pool *pool}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj"ubj)}(hhh]h)}(h pool from which va was allocatedh]h pool from which va was allocated}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj"ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj"hMhj"ubj)}(h``void *va`` va to be freed h](j)}(h ``void *va``h]j)}(hj#h]hvoid *va}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj #ubj)}(hhh]h)}(hva to be freedh]hva to be freed}(hj)#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%#hMhj&#ubah}(h]h ]h"]h$]h&]uh1jhj #ubeh}(h]h ]h"]h$]h&]uh1jhj%#hMhj"ubj)}(hD``bool allow_direct`` freed by the consumer, allow lockless caching h](j)}(h``bool allow_direct``h]j)}(hjI#h]hbool allow_direct}(hjK#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG#ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhjC#ubj)}(hhh]h)}(h-freed by the consumer, allow lockless cachingh]h-freed by the consumer, allow lockless caching}(hjb#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^#hMhj_#ubah}(h]h ]h"]h$]h&]uh1jhjC#ubeh}(h]h ]h"]h$]h&]uh1jhj^#hMhj"ubeh}(h]h ]h"]h$]h&]uh1jhj"ubh)}(h**Description**h]j`)}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj#ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj"ubh)}(h-Free a va allocated from page_pool_allo_va().h]h-Free a va allocated from page_pool_allo_va().}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#page_pool_get_dma_addr (C function)c.page_pool_get_dma_addrhNtauh1jhjwhhhNhNubj)}(hhh](j)}(h;dma_addr_t page_pool_get_dma_addr (const struct page *page)h]j)}(h:dma_addr_t page_pool_get_dma_addr(const struct page *page)h](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetj#modnameN classnameNj,j/)}j2]j5)}j(page_pool_get_dma_addrsbc.page_pool_get_dma_addrasbuh1hhj#hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#hhhj#hMubj)}(hpage_pool_get_dma_addrh]j)}(hj#h]hpage_pool_get_dma_addr}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj#hhhj#hMubjr)}(h(const struct page *page)h]jx)}(hconst struct page *pageh](j)}(hjh]hconst}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hj($hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(hjh]hstruct}(hj6$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hjC$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubh)}(hhh]j)}(hpageh]hpage}(hjT$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjQ$ubah}(h]h ]h"]h$]h&] refdomainjJreftypej( reftargetjV$modnameN classnameNj,j/)}j2]j#c.page_pool_get_dma_addrasbuh1hhj$ubj)}(h h]h }(hjr$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubjJ)}(hjMh]h*}(hj$hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj$ubj)}(hpageh]hpage}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]noemphhhuh1jwhj$ubah}(h]h ]h"]h$]h&]hhuh1jqhj#hhhj#hMubeh}(h]h ]h"]h$]h&]hhjuh1jj j!hj#hhhj#hMubah}(h]j#ah ](j%j&eh"]h$]h&]j*j+)j,huh1jhj#hMhj#hhubj.)}(hhh]h)}(h Retrieve the stored DMA address.h]h Retrieve the stored DMA address.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj$hhubah}(h]h ]h"]h$]h&]uh1j-hj#hhhj#hMubeh}(h]h ](jJfunctioneh"]h$]h&]jOjJjPj$jQj$jRjSjTuh1jhhhjwhNhNubjV)}(h**Parameters** ``const struct page *page`` page allocated from a page pool **Description** Fetch the DMA address of the page. The page pool to which the page belongs must had been created with PP_FLAG_DMA_MAP.h](h)}(h**Parameters**h]j`)}(hj$h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj$ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj$ubj)}(hhh]j)}(h<``const struct page *page`` page allocated from a page pool h](j)}(h``const struct page *page``h]j)}(hj$h]hconst struct page *page}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj$ubj)}(hhh]h)}(hpage allocated from a page poolh]hpage allocated from a page pool}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj %hMhj%ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj %hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubh)}(h**Description**h]j`)}(hj3%h]h Description}(hj5%hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj1%ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj$ubh)}(hvFetch the DMA address of the page. The page pool to which the page belongs must had been created with PP_FLAG_DMA_MAP.h]hvFetch the DMA address of the page. The page pool to which the page belongs must had been created with PP_FLAG_DMA_MAP.}(hjI%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:78: ./include/net/page_pool/helpers.hhMhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jUhjwhhhNhNubh)}(hhh](h)}(hDMA synch]hDMA sync}(hjb%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_%hhhhhKYubh)}(hXDriver is always responsible for syncing the pages for the CPU. Drivers may choose to take care of syncing for the device as well or set the ``PP_FLAG_DMA_SYNC_DEV`` flag to request that pages allocated from the page pool are already synced for the device.h](hDriver is always responsible for syncing the pages for the CPU. Drivers may choose to take care of syncing for the device as well or set the }(hjp%hhhNhNubj)}(h``PP_FLAG_DMA_SYNC_DEV``h]hPP_FLAG_DMA_SYNC_DEV}(hjx%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp%ubh[ flag to request that pages allocated from the page pool are already synced for the device.}(hjp%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhj_%hhubh)}(hIf ``PP_FLAG_DMA_SYNC_DEV`` is set, the driver must inform the core what portion of the buffer has to be synced. This allows the core to avoid syncing the entire page when the drivers knows that the device only accessed a portion of the page.h](hIf }(hj%hhhNhNubj)}(h``PP_FLAG_DMA_SYNC_DEV``h]hPP_FLAG_DMA_SYNC_DEV}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh is set, the driver must inform the core what portion of the buffer has to be synced. This allows the core to avoid syncing the entire page when the drivers knows that the device only accessed a portion of the page.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hj_%hhubh)}(hMost drivers will reserve headroom in front of the frame. This part of the buffer is not touched by the device, so to avoid syncing it drivers can set the ``offset`` field in struct page_pool_params appropriately.h](hMost drivers will reserve headroom in front of the frame. This part of the buffer is not touched by the device, so to avoid syncing it drivers can set the }(hj%hhhNhNubj)}(h ``offset``h]hoffset}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh0 field in struct page_pool_params appropriately.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKchj_%hhubh)}(hXZFor pages recycled on the XDP xmit and skb paths the page pool will use the ``max_len`` member of struct page_pool_params to decide how much of the page needs to be synced (starting at ``offset``). When directly freeing pages in the driver (page_pool_put_page()) the ``dma_sync_size`` argument specifies how much of the buffer needs to be synced.h](hLFor pages recycled on the XDP xmit and skb paths the page pool will use the }(hj%hhhNhNubj)}(h ``max_len``h]hmax_len}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubhb member of struct page_pool_params to decide how much of the page needs to be synced (starting at }(hj%hhhNhNubj)}(h ``offset``h]hoffset}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubhH). When directly freeing pages in the driver (page_pool_put_page()) the }(hj%hhhNhNubj)}(h``dma_sync_size``h]h dma_sync_size}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh> argument specifies how much of the buffer needs to be synced.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhj_%hhubh)}(hIf in doubt set ``offset`` to 0, ``max_len`` to ``PAGE_SIZE`` and pass -1 as ``dma_sync_size``. That combination of arguments is always correct.h](hIf in doubt set }(hj&hhhNhNubj)}(h ``offset``h]hoffset}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh to 0, }(hj&hhhNhNubj)}(h ``max_len``h]hmax_len}(hj.&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh to }(hj&hhhNhNubj)}(h ``PAGE_SIZE``h]h PAGE_SIZE}(hj@&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh and pass -1 as }(hj&hhhNhNubj)}(h``dma_sync_size``h]h dma_sync_size}(hjR&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh2. That combination of arguments is always correct.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohj_%hhubh)}(hX2Note that the syncing parameters are for the **entire page**, even if the driver allocates fragments (e.g. via ``page_pool_dev_alloc_frag()``). Unless the driver author really understands page pool internals it's recommended to always use ``offset = 0``, ``max_len = PAGE_SIZE`` with fragmented page pools.h](h-Note that the syncing parameters are for the }(hjj&hhhNhNubj`)}(h**entire page**h]h entire page}(hjr&hhhNhNubah}(h]h ]h"]h$]h&]uh1j_hjj&ubh3, even if the driver allocates fragments (e.g. via }(hjj&hhhNhNubj)}(h``page_pool_dev_alloc_frag()``h]hpage_pool_dev_alloc_frag()}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj&ubhd). Unless the driver author really understands page pool internals it’s recommended to always use }(hjj&hhhNhNubj)}(h``offset = 0``h]h offset = 0}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj&ubh, }(hjj&hhhNhNubj)}(h``max_len = PAGE_SIZE``h]hmax_len = PAGE_SIZE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj&ubh with fragmented page pools.}(hjj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKshj_%hhubeh}(h]dma-syncah ]h"]dma syncah$]h&]uh1hhjwhhhhhKYubeh}(h] api-interfaceah ]h"] api interfaceah$]h&]uh1hhhhhhhhK;ubh)}(hhh](h)}(hCoding examplesh]hCoding examples}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhKzubh)}(hhh](h)}(h Registrationh]h Registration}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhK}ubji)}(hX/* Page pool registration */ struct page_pool_params pp_params = { 0 }; struct xdp_rxq_info xdp_rxq; int err; pp_params.order = 0; /* internal DMA mapping in page_pool */ pp_params.flags = PP_FLAG_DMA_MAP; pp_params.pool_size = DESC_NUM; pp_params.nid = NUMA_NO_NODE; pp_params.dev = priv->dev; pp_params.napi = napi; /* only if this NAPI is the sole consumer, see above */ pp_params.dma_dir = xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE; page_pool = page_pool_create(&pp_params); err = xdp_rxq_info_reg(&xdp_rxq, ndev, 0); if (err) goto err_out; err = xdp_rxq_info_reg_mem_model(&xdp_rxq, MEM_TYPE_PAGE_POOL, page_pool); if (err) goto err_out;h]hX/* Page pool registration */ struct page_pool_params pp_params = { 0 }; struct xdp_rxq_info xdp_rxq; int err; pp_params.order = 0; /* internal DMA mapping in page_pool */ pp_params.flags = PP_FLAG_DMA_MAP; pp_params.pool_size = DESC_NUM; pp_params.nid = NUMA_NO_NODE; pp_params.dev = priv->dev; pp_params.napi = napi; /* only if this NAPI is the sole consumer, see above */ pp_params.dma_dir = xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE; page_pool = page_pool_create(&pp_params); err = xdp_rxq_info_reg(&xdp_rxq, ndev, 0); if (err) goto err_out; err = xdp_rxq_info_reg_mem_model(&xdp_rxq, MEM_TYPE_PAGE_POOL, page_pool); if (err) goto err_out;}hj&sbah}(h]h ]h"]h$]h&]hhjxjyjJj{}uh1jhhhhKhj&hhubeh}(h] registrationah ]h"] registrationah$]h&]uh1hhj&hhhhhK}ubh)}(hhh](h)}(h NAPI pollerh]h NAPI poller}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 'hhhhhKubji)}(hX/* NAPI Rx poller */ enum dma_data_direction dma_dir; dma_dir = page_pool_get_dma_dir(dring->page_pool); while (done < budget) { if (some error) page_pool_recycle_direct(page_pool, page); if (packet_is_xdp) { if XDP_DROP: page_pool_recycle_direct(page_pool, page); } else (packet_is_skb) { skb_mark_for_recycle(skb); new_page = page_pool_dev_alloc_pages(page_pool); } }h]hX/* NAPI Rx poller */ enum dma_data_direction dma_dir; dma_dir = page_pool_get_dma_dir(dring->page_pool); while (done < budget) { if (some error) page_pool_recycle_direct(page_pool, page); if (packet_is_xdp) { if XDP_DROP: page_pool_recycle_direct(page_pool, page); } else (packet_is_skb) { skb_mark_for_recycle(skb); new_page = page_pool_dev_alloc_pages(page_pool); } } }hj'sbah}(h]h ]h"]h$]h&]hhjxjyjJj{}uh1jhhhhKhj 'hhubeh}(h] napi-pollerah ]h"] napi pollerah$]h&]uh1hhj&hhhhhKubh)}(hhh](h)}(h Driver unloadh]h Driver unload}(hj4'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1'hhhhhKubji)}(hb/* Driver unload */ page_pool_put_full_page(page_pool, page, false); xdp_rxq_info_unreg(&xdp_rxq);h]hb/* Driver unload */ page_pool_put_full_page(page_pool, page, false); xdp_rxq_info_unreg(&xdp_rxq);}hjB'sbah}(h]h ]h"]h$]h&]hhjxjyjJj{}uh1jhhhhKhj1'hhubeh}(h] driver-unloadah ]h"] driver unloadah$]h&]uh1hhj&hhhhhKubeh}(h]coding-examplesah ]h"]coding examplesah$]h&]uh1hhhhhhhhKzubeh}(h] page-pool-apiah ]h"] page pool apiah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj'error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jf'jc'jjjtjqjljij&j&j&j&j^'j['j'j'j.'j+'jV'jS'u nametypes}(jf'jjtjlj&j&j^'j'j.'jV'uh}(jc'hjjWjqjjijjjjj"j jj&jwjjj j j\ ja jjjj$j0j5j|jjGjLjijnj)j.jS!jX!j#j#j&j_%j['j&j'j&j+'j 'jS'j1'u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.