2sphinx.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 page pools on the system can be accessed via the netdev genetlink family (see Documentation/netlink/specs/netdev.yaml).h]hInformation about page pools on the system can be accessed via the netdev genetlink family (see Documentation/netlink/specs/netdev.yaml).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubeh}(h] monitoringah ]h"] monitoringah$]h&]uh1hhhhhhhhK-ubh)}(hhh](h)}(h API interfaceh]h API interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK2ubh)}(hXThe number of pools created **must** match the number of hardware 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 }(hjhhhNhNubhstrong)}(h**must**h]hmust}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX match the number of hardware 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&]uh1hhhhK3hjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlepage_pool_create (C function)c.page_pool_createhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hKstruct page_pool * page_pool_create (const struct page_pool_params *params)h]hdesc_signature_line)}(hIstruct page_pool *page_pool_create(const struct page_pool_params *params)h](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMtubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhMtubh)}(hhh]h desc_sig_name)}(h page_poolh]h page_pool}(hj)hhhNhNubah}(h]h ]nah"]h$]h&]uh1j'hj$ubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetj+modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jF ASTIdentifier)}jApage_pool_createsbc.page_pool_createasbuh1hhjhhhjhMtubj)}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMtubhdesc_sig_punctuation)}(h*h]h*}(hjdhhhNhNubah}(h]h ]pah"]h$]h&]uh1jbhjhhhjhMtubh desc_name)}(hpage_pool_createh]j()}(hjQh]hpage_pool_create}(hjyhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjuubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jshjhhhjhMtubhdesc_parameterlist)}(h'(const struct page_pool_params *params)h]hdesc_parameter)}(h%const struct page_pool_params *paramsh](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(hpage_pool_paramsh]hpage_pool_params}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jOc.page_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hparamsh]hparams}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMtubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhjhMtubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhMthjhhubh desc_content)}(hhh]h)}(hcreate a page poolh]hcreate a page pool}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMthj>hhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhMtubeh}(h]h ](j?functioneh"]h$]h&]domainj?objtypejYdesctypejYnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hc**Parameters** ``const struct page_pool_params *params`` parameters, see struct page_pool_paramsh](h)}(h**Parameters**h]j)}(hjkh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMxhjeubhdefinition_list)}(hhh]hdefinition_list_item)}(hQ``const struct page_pool_params *params`` parameters, see struct page_pool_paramsh](hterm)}(h)``const struct page_pool_params *params``h]hliteral)}(hjh]h%const struct page_pool_params *params}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMzhjubh definition)}(hhh]h)}(h'parameters, see struct page_pool_paramsh]h'parameters, see struct page_pool_params}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMzhjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_params (C struct)c.page_pool_paramshNtauh1jhjhhhNhNubj)}(hhh](j)}(hpage_pool_paramsh]j)}(hstruct page_pool_paramsh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubjt)}(hpage_pool_paramsh]j()}(hjh]hpage_pool_params}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhKubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhKhjhhubj=)}(hhh]h)}(hpage pool parametersh]hpage pool parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKGhj-hhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhKubeh}(h]h ](j?structeh"]h$]h&]j]j?j^jHj_jHj`jajbuh1jhhhjhNhNubjd)}(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}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubh:}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKKhjLubji)}(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; }; };}hjmsbah}(h]h ]h"]h$]h&]hhuh1jhhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKMhjLubh)}(h **Members**h]j)}(hj~h]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK_hjLubj)}(hhh](j)}(h``{unnamed_struct}`` anonymous h](j)}(h``{unnamed_struct}``h]j)}(hjh]h{unnamed_struct}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h&``order`` 2^order pages on allocation h](j)}(h ``order``h]j)}(hjh]horder}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKJhjubj)}(hhh]h)}(h2^order pages on allocationh]h2^order pages on allocation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKJhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKJhjubj)}(h#``pool_size`` size of the ptr_ring h](j)}(h ``pool_size``h]j)}(hjh]h pool_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./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$hKKhjubj)}(h1``nid`` NUMA node id to allocate from pages from h](j)}(h``nid``h]j)}(hjHh]hnid}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKLhjBubj)}(hhh]h)}(h(NUMA node id to allocate from pages fromh]h(NUMA node id to allocate from pages from}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hKLhj^ubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhj]hKLhjubj)}(h-``dev`` device, for DMA pre-mapping purposes h](j)}(h``dev``h]j)}(hjh]hdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKMhj{ubj)}(hhh]h)}(h$device, for DMA pre-mapping purposesh]h$device, for DMA pre-mapping purposes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKMhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhjhKMhjubj)}(hB``napi`` NAPI which is the sole consumer of pages, otherwise NULL h](j)}(h``napi``h]j)}(hjh]hnapi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKNhjubj)}(hhh]h)}(h8NAPI which is the sole consumer of pages, otherwise NULLh]h8NAPI which is the sole consumer of pages, otherwise NULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKNhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKNhjubj)}(h"``dma_dir`` DMA mapping direction h](j)}(h ``dma_dir``h]j)}(hjh]hdma_dir}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKOhjubj)}(hhh]h)}(hDMA mapping directionh]hDMA mapping direction}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKOhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKOhjubj)}(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:61: ./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}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKPhjBubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhjAhKPhjubj)}(h<``offset`` DMA sync address offset for PP_FLAG_DMA_SYNC_DEV h](j)}(h ``offset``h]j)}(hjeh]hoffset}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./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}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhKQhj{ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjzhKQhjubj)}(h``{unnamed_struct}`` anonymous h](j)}(h``{unnamed_struct}``h]j)}(hjh]h{unnamed_struct}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hK``netdev`` netdev this pool will serve (leave as NULL if none or multiple) h](j)}(h ``netdev``h]j)}(hjh]hnetdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKShjubj)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKShjubj)}(h=``queue_idx`` queue idx this page_pool is being created for. h](j)}(h ``queue_idx``h]j)}(hjh]h queue_idx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./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%hKThjubj)}(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)}(hjIh]hflags}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKUhjCubj)}(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.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hKUhj_ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj^hKUhjubeh}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&page_pool_dev_alloc_pages (C function)c.page_pool_dev_alloc_pageshNtauh1jhjhhhNhNubj)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKWubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKWubh)}(hhh]j()}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jApage_pool_dev_alloc_pagessbc.page_pool_dev_alloc_pagesasbuh1hhjhhhjhKWubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKWubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjhhhjhKWubjt)}(hpage_pool_dev_alloc_pagesh]j()}(hjh]hpage_pool_dev_alloc_pages}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhKWubj)}(h(struct page_pool *pool)h]j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hj:hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj7ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj<modnameN classnameNjEjH)}jK]jc.page_pool_dev_alloc_pagesasbuh1hhjubj)}(h h]h }(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjfhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hjshhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKWubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhKWubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhKWhjhhubj=)}(hhh]h)}(hallocate a page.h]hallocate a page.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKWhjhhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhKWubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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:64: ./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)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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.}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKYhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%page_pool_dev_alloc_frag (C function)c.page_pool_dev_alloc_fraghNtauh1jhjhhhNhNubj)}(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&]uh1jhjZ hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKdubj)}(h h]h }(hjl hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZ hhhjk hKdubh)}(hhh]j()}(hpageh]hpage}(hj} hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjz ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]jN)}jApage_pool_dev_alloc_fragsbc.page_pool_dev_alloc_fragasbuh1hhjZ hhhjk hKdubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZ hhhjk hKdubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjZ hhhjk hKdubjt)}(hpage_pool_dev_alloc_fragh]j()}(hj h]hpage_pool_dev_alloc_frag}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jshjZ hhhjk hKdubj)}(hA(struct page_pool *pool, unsigned int *offset, unsigned int size)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j()}(h page_poolh]h page_pool}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]j c.page_pool_dev_alloc_fragasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjc)}(hjfh]h*}(hj" hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj ubj()}(hpoolh]hpool}(hj/ hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *offseth](hdesc_sig_keyword_type)}(hunsignedh]hunsigned}(hjJ hhhNhNubah}(h]h ]ktah"]h$]h&]uh1jH hjD ubj)}(h h]h }(hjY hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjD ubjI )}(hinth]hint}(hjg hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjD ubj)}(h h]h }(hju hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjD ubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjD ubj()}(hoffseth]hoffset}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjD ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int sizeh](jI )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjI )}(hinth]hint}(hj hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj()}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhjZ hhhjk hKdubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjV hhhjk hKdubah}(h]jQ ah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjk hKdhjS hhubj=)}(hhh]h)}(hallocate a page fragment.h]hallocate a page fragment.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKdhj hhubah}(h]h ]h"]h$]h&]uh1j<hjS hhhjk hKdubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^j# j_j# j`jajbuh1jhhhjhNhNubjd)}(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)}(hj- h]h Parameters}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhhj' ubj)}(hhh](j)}(h7``struct page_pool *pool`` pool from which to allocate h](j)}(h``struct page_pool *pool``h]j)}(hjL h]hstruct page_pool *pool}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKehjF ubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja hKehjb ubah}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ]h"]h$]h&]uh1jhja hKehjC ubj)}(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:64: ./include/net/page_pool/helpers.hhKfhj ubj)}(hhh]h)}(hoffset to the allocated pageh]hoffset to the allocated page}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKfhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKfhjC ubj)}(h%``unsigned int size`` requested size h](j)}(h``unsigned int size``h]j)}(hj h]hunsigned int size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKghj ubj)}(hhh]h)}(hrequested sizeh]hrequested size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKghj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKghjC ubeh}(h]h ]h"]h$]h&]uh1jhj' ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKihj' ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhhj' ubh)}(h **Return**h]j)}(hj h]hReturn}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKjhj' ubh)}(h/allocated page fragment, otherwise return NULL.h]h/allocated page fragment, otherwise return NULL.}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKkhj' ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j page_pool_dev_alloc (C function)c.page_pool_dev_allochNtauh1jhjhhhNhNubj)}(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}(hje hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhja hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjs hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhja hhhjr hKubh)}(hhh]j()}(hpageh]hpage}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]jN)}jApage_pool_dev_allocsbc.page_pool_dev_allocasbuh1hhja hhhjr hKubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhja hhhjr hKubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhja hhhjr hKubjt)}(hpage_pool_dev_alloch]j()}(hj h]hpage_pool_dev_alloc}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jshja hhhjr hKubj)}(hB(struct page_pool *pool, unsigned int *offset, unsigned int *size)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j()}(h page_poolh]h page_pool}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]j c.page_pool_dev_allocasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjc)}(hjfh]h*}(hj) hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj ubj()}(hpoolh]hpool}(hj6 hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *offseth](jI )}(hunsignedh]hunsigned}(hjO hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjK ubj)}(h h]h }(hj] hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK ubjI )}(hinth]hint}(hjk hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjK ubj)}(h h]h }(hjy hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK ubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjK ubj()}(hoffseth]hoffset}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjK ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *sizeh](jI )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjI )}(hinth]hint}(hj hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj ubj()}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhja hhhjr hKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hj] hhhjr hKubah}(h]jX ah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjr hKhjZ 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:64: ./include/net/page_pool/helpers.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j<hjZ hhhjr hKubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^j4j_j4j`jajbuh1jhhhjhNhNubjd)}(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)}(hj>h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj8ubj)}(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:64: ./include/net/page_pool/helpers.hhKhjWubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhKhjsubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjrhKhjTubj)}(h6``unsigned int *offset`` offset to the allocated page h](j)}(h``unsigned int *offset``h]j)}(hjh]hunsigned int *offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(hoffset to the allocated pageh]hoffset to the allocated page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjTubj)}(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:64: ./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&]uh1jhjhKhjTubeh}(h]h ]h"]h$]h&]uh1jhj8ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj8ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj8ubh)}(h **Return**h]j)}(hj1h]hReturn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj8ubh)}(h7allocated page or page fragment, otherwise return NULL.h]h7allocated page or page fragment, otherwise return NULL.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#page_pool_dev_alloc_va (C function)c.page_pool_dev_alloc_vahNtauh1jhjhhhNhNubj)}(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](jI )}(hvoidh]hvoid}(hjvhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjrhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrhhhjhKubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjrhhhjhKubjt)}(hpage_pool_dev_alloc_vah]j()}(hpage_pool_dev_alloc_vah]hpage_pool_dev_alloc_va}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjrhhhjhKubj)}(h,(struct page_pool *pool, unsigned int *size)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_dev_alloc_vaasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int *sizeh](jI )}(hunsignedh]hunsigned}(hj2hhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj.ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubjI )}(hinth]hint}(hjNhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hj.ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubjc)}(hjfh]h*}(hjjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj.ubj()}(hsizeh]hsize}(hjwhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj.ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjrhhhjhKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjnhhhjhKubah}(h]jiah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhKhjkhhubj=)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j<hjkhhhjhKubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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:64: ./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:64: ./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}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hKhj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjVh]h Description}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjubh)}(h **Return**h]j)}(hj}h]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"page_pool_get_dma_dir (C function)c.page_pool_get_dma_dirhNtauh1jhjhhhNhNubj)}(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:64: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j()}(hdma_data_directionh]hdma_data_direction}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jApage_pool_get_dma_dirsbc.page_pool_get_dma_dirasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubjt)}(hpage_pool_get_dma_dirh]j()}(hjh]hpage_pool_get_dma_dir}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhKubj)}(h(const struct page_pool *pool)h]j)}(hconst struct page_pool *poolh](j)}(hjh]hconst}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj,ubj)}(hjh]hstruct}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj,ubh)}(hhh]j()}(h page_poolh]h page_pool}(hjihhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjfubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjkmodnameN classnameNjEjH)}jK]jc.page_pool_get_dma_dirasbuh1hhj,ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj,ubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj,ubj()}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj(ubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhKubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhKhjhhubj=)}(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:64: ./include/net/page_pool/helpers.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhKubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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)}(hj h]hconst struct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hKhj#ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj"hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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:64: ./include/net/page_pool/helpers.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_put_page (C function)c.page_pool_put_pagehNtauh1jhjhhhNhNubj)}(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](jI )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM\ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM\ubjt)}(hpage_pool_put_pageh]j()}(hpage_pool_put_pageh]hpage_pool_put_page}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhM\ubj)}(hZ(struct page_pool *pool, struct page *page, unsigned int dma_sync_size, bool allow_direct)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_put_pageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hj#hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(h h]h }(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8ubh)}(hhh]j()}(hpageh]hpage}(hjZhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjWubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj\modnameN classnameNjEjH)}jK]jc.page_pool_put_pageasbuh1hhj8ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8ubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj8ubj()}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int dma_sync_sizeh](jI )}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjI )}(hinth]hint}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj()}(h dma_sync_sizeh]h dma_sync_size}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](jI )}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj()}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM\ubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhM\ubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhM\hjhhubj=)}(hhh]h)}(h'release a reference to a page pool pageh]h'release a reference to a page pool page}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM\hj@hhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhM\ubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^j[j_j[j`jajbuh1jhhhjhNhNubjd)}(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)}(hjeh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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)}(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:64: ./include/net/page_pool/helpers.hhM]hj~ubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM]hjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjhM]hj{ubj)}(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:64: ./include/net/page_pool/helpers.hhM^hjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM^hj{ubj)}(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:64: ./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&]uh1hhj hM_hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hM_hj{ubj)}(hG``bool allow_direct`` released by the consumer, allow lockless caching h](j)}(h``bool allow_direct``h]j)}(hj/h]hbool allow_direct}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM`hj)ubj)}(hhh]h)}(h0released by the consumer, allow lockless cachingh]h0released by the consumer, allow lockless caching}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhM`hjEubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhjDhM`hj{ubeh}(h]h ]h"]h$]h&]uh1jhj_ubh)}(h**Description**h]j)}(hjjh]h Description}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMahj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$page_pool_put_full_page (C function)c.page_pool_put_full_pagehNtauh1jhjhhhNhNubj)}(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](jI )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMyubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMyubjt)}(hpage_pool_put_full_pageh]j()}(hpage_pool_put_full_pageh]hpage_pool_put_full_page}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhMyubj)}(h>(struct page_pool *pool, struct page *page, bool allow_direct)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_put_full_pageasbuh1hhjubj)}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hj8hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hjEhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZubh)}(hhh]j()}(hpageh]hpage}(hj|hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjyubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj~modnameN classnameNjEjH)}jK]j&c.page_pool_put_full_pageasbuh1hhjZubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjZubj()}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjZubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](jI )}(hjh]hbool}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj()}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMyubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhMyubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhMyhjhhubj=)}(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:64: ./include/net/page_pool/helpers.hhMyhjhhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhMyubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^j+j_j+j`jajbuh1jhhhjhNhNubjd)}(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)}(hj5h]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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)}(hjTh]hstruct page_pool *pool}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMzhjNubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMzhjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihMzhjKubj)}(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:64: ./include/net/page_pool/helpers.hhM{hjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM{hjKubj)}(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:64: ./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|hjKubeh}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM~hj/ubh)}(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)}(hj!h]hpage_pool_params.max_len}(hj#hhhNhNubah}(h]h ](xrefj?c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocnetworking/page_pool refdomainj?reftypetype refexplicitrefwarnjEjH)}jK]sb reftargetpage_pool_paramsuh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM}hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhM}hj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%page_pool_recycle_direct (C function)c.page_pool_recycle_directhNtauh1jhjhhhNhNubj)}(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](jI )}(hvoidh]hvoid}(hjohhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjkhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjkhhhj}hMubjt)}(hpage_pool_recycle_directh]j()}(hpage_pool_recycle_directh]hpage_pool_recycle_direct}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjkhhhj}hMubj)}(h+(struct page_pool *pool, struct page *page)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_recycle_directasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(hpageh]hpage}(hj<hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj9ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj>modnameN classnameNjEjH)}jK]jc.page_pool_recycle_directasbuh1hhjubj)}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpageh]hpage}(hjuhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjkhhhj}hMubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjghhhj}hMubah}(h]jbah ](j4j5eh"]h$]h&]j9j:)j;huh1jhj}hMhjdhhubj=)}(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:64: ./include/net/page_pool/helpers.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j<hjdhhhj}hMubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubj)}(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:64: ./include/net/page_pool/helpers.hhMhjubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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:64: ./include/net/page_pool/helpers.hhMhjubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj.hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjTh]h Description}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubh)}(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.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_free_va (C function)c.page_pool_free_vahNtauh1jhjhhhNhNubj)}(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](jI )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubjt)}(hpage_pool_free_vah]j()}(hpage_pool_free_vah]hpage_pool_free_va}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhMubj)}(h5(struct page_pool *pool, void *va, bool allow_direct)h](j)}(hstruct page_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_free_vaasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hj"hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hj/hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hvoid *vah](jI )}(hvoidh]hvoid}(hjHhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjDubj)}(h h]h }(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDubjc)}(hjfh]h*}(hjdhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjDubj()}(hvah]hva}(hjqhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjDubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](jI )}(hjh]hbool}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj()}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhMubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhMhjhhubj=)}(hhh]h)}(hfree a va into the page_poolh]hfree a va into the page_pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhMubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubj)}(hhh](j)}(h<``struct page_pool *pool`` pool from which va 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:64: ./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%hMhjubj)}(h``void *va`` va to be freed h](j)}(h ``void *va``h]j)}(hjIh]hvoid *va}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjCubj)}(hhh]h)}(hva to be freedh]hva to be freed}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj_ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj^hMhjubj)}(hD``bool allow_direct`` freed 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:64: ./include/net/page_pool/helpers.hhMhj|ubj)}(hhh]h)}(h-freed by the consumer, allow lockless cachingh]h-freed by the consumer, allow lockless caching}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubh)}(h-Free a va allocated from page_pool_allo_va().h]h-Free a va allocated from page_pool_allo_va().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#page_pool_get_dma_addr (C function)c.page_pool_get_dma_addrhNtauh1jhjhhhNhNubj)}(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}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jApage_pool_get_dma_addrsbc.page_pool_get_dma_addrasbuh1hhjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj&hMubjt)}(hpage_pool_get_dma_addrh]j()}(hj#h]hpage_pool_get_dma_addr}(hj9hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj5ubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhj&hMubj)}(h(const struct page *page)h]j)}(hconst struct page *pageh](j)}(hjh]hconst}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjPubj)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(h h]h }(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjPubh)}(hhh]j()}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetjmodnameN classnameNjEjH)}jK]j!c.page_pool_get_dma_addrasbuh1hhjPubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjPubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjPubj()}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjLubah}(h]h ]h"]h$]h&]hhuh1jhjhhhj&hMubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhj&hMubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhj&hMhjhhubj=)}(hhh]h)}(h Retrieve the stored DMA address.h]h Retrieve the stored DMA address.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j<hjhhhj&hMubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^jj_jj`jajbuh1jhhhjhNhNubjd)}(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)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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)}(hj1h]hconst struct page *page}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhj+ubj)}(hhh]h)}(hpage allocated from a page poolh]hpage allocated from a page pool}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjlh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j page_pool_get_stats (C function)c.page_pool_get_statshNtauh1jhjhhhNhNubj)}(hhh](j)}(hVbool page_pool_get_stats (const struct page_pool *pool, struct page_pool_stats *stats)h]j)}(hUbool page_pool_get_stats(const struct page_pool *pool, struct page_pool_stats *stats)h](jI )}(hjh]hbool}(hjhhhNhNubah}(h]h ]jU ah"]h$]h&]uh1jH hjhhhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKKubjt)}(hpage_pool_get_statsh]j()}(hpage_pool_get_statsh]hpage_pool_get_stats}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubah}(h]h ](jjeh"]h$]h&]hhuh1jshjhhhjhKKubj)}(h=(const struct page_pool *pool, struct page_pool_stats *stats)h](j)}(hconst struct page_pool *poolh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j()}(h page_poolh]h page_pool}(hj& hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj# ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj( modnameN classnameNjEjH)}jK]jN)}jAjsbc.page_pool_get_statsasbuh1hhjubj)}(h h]h }(hjF hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjT hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj()}(hpoolh]hpool}(hja hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page_pool_stats *statsh](j)}(hjh]hstruct}(hjz hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjv ubh)}(hhh]j()}(hpage_pool_statsh]hpage_pool_stats}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj ubah}(h]h ]h"]h$]h&] refdomainj?reftypejA reftargetj modnameN classnameNjEjH)}jK]jB c.page_pool_get_statsasbuh1hhjv ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjv ubjc)}(hjfh]h*}(hj hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjv ubj()}(hstatsh]hstats}(hj hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjv ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hjhhhjhKKubah}(h]jah ](j4j5eh"]h$]h&]j9j:)j;huh1jhjhKKhjhhubj=)}(hhh]h)}(hfetch page pool statsh]hfetch page pool stats}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKKhj hhubah}(h]h ]h"]h$]h&]uh1j<hjhhhjhKKubeh}(h]h ](j?functioneh"]h$]h&]j]j?j^j!j_j!j`jajbuh1jhhhjhNhNubjd)}(hX**Parameters** ``const struct page_pool *pool`` pool from which page was allocated ``struct page_pool_stats *stats`` struct page_pool_stats to fill in **Description** Retrieve statistics about the page_pool. This API is only available if the kernel has been configured with ``CONFIG_PAGE_POOL_STATS=y``. A pointer to a caller allocated struct page_pool_stats structure is passed to this API which is filled in. The caller can then report those stats to the user (perhaps via ethtool, debugfs, etc.).h](h)}(h**Parameters**h]j)}(hj!h]h Parameters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKOhj!ubj)}(hhh](j)}(hD``const struct page_pool *pool`` pool from which page was allocated h](j)}(h ``const struct page_pool *pool``h]j)}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:!ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKLhj6!ubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjU!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ!hKLhjR!ubah}(h]h ]h"]h$]h&]uh1jhj6!ubeh}(h]h ]h"]h$]h&]uh1jhjQ!hKLhj3!ubj)}(hD``struct page_pool_stats *stats`` struct page_pool_stats to fill in h](j)}(h!``struct page_pool_stats *stats``h]j)}(hju!h]hstruct page_pool_stats *stats}(hjw!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs!ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKMhjo!ubj)}(hhh]h)}(h!struct page_pool_stats to fill inh]h!struct page_pool_stats to fill in}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hKMhj!ubah}(h]h ]h"]h$]h&]uh1jhjo!ubeh}(h]h ]h"]h$]h&]uh1jhj!hKMhj3!ubeh}(h]h ]h"]h$]h&]uh1jhj!ubh)}(h**Description**h]j)}(hj!h]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKOhj!ubh)}(hXLRetrieve statistics about the page_pool. This API is only available if the kernel has been configured with ``CONFIG_PAGE_POOL_STATS=y``. A pointer to a caller allocated struct page_pool_stats structure is passed to this API which is filled in. The caller can then report those stats to the user (perhaps via ethtool, debugfs, etc.).h](hkRetrieve statistics about the page_pool. This API is only available if the kernel has been configured with }(hj!hhhNhNubj)}(h``CONFIG_PAGE_POOL_STATS=y``h]hCONFIG_PAGE_POOL_STATS=y}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh. A pointer to a caller allocated struct page_pool_stats structure is passed to this API which is filled in. The caller can then report those stats to the user (perhaps via ethtool, debugfs, etc.).}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKNhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjhhhNhNubh)}(hhh](h)}(hDMA synch]hDMA sync}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hhhhhKKubh)}(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 }(hj!hhhNhNubj)}(h``PP_FLAG_DMA_SYNC_DEV``h]hPP_FLAG_DMA_SYNC_DEV}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh[ flag to request that pages allocated from the page pool are already synced for the device.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhj!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&]uh1hhhhKQhj!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}(hjG"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?"ubh0 field in struct page_pool_params appropriately.}(hj?"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKUhj!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}(hjg"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}(hjy"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&]uh1hhhhKZhj!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}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh2. That combination of arguments is always correct.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKahj!hhubh)}(hXaNote that the syncing parameters are for the entire page. This is important to remember when using fragments (``PP_FLAG_PAGE_FRAG``), where allocated buffers may be smaller than a full page. 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](hnNote that the syncing parameters are for the entire page. This is important to remember when using fragments (}(hj"hhhNhNubj)}(h``PP_FLAG_PAGE_FRAG``h]hPP_FLAG_PAGE_FRAG}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh), where allocated buffers may be smaller than a full page. Unless the driver author really understands page pool internals it’s recommended to always use }(hj"hhhNhNubj)}(h``offset = 0``h]h offset = 0}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh, }(hj"hhhNhNubj)}(h``max_len = PAGE_SIZE``h]hmax_len = PAGE_SIZE}(hj%#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh with fragmented page pools.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehj!hhubeh}(h]dma-syncah ]h"]dma syncah$]h&]uh1hhjhhhhhKKubh)}(hhh](h)}(hStats API and structuresh]hStats API and structures}(hjH#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE#hhhhhKmubh)}(hIf the kernel is configured with ``CONFIG_PAGE_POOL_STATS=y``, the API page_pool_get_stats() and structures described below are available. It takes a pointer to a ``struct page_pool`` and a pointer to a struct page_pool_stats allocated by the caller.h](h!If the kernel is configured with }(hjV#hhhNhNubj)}(h``CONFIG_PAGE_POOL_STATS=y``h]hCONFIG_PAGE_POOL_STATS=y}(hj^#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV#ubhg, the API page_pool_get_stats() and structures described below are available. It takes a pointer to a }(hjV#hhhNhNubj)}(h``struct page_pool``h]hstruct page_pool}(hjp#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV#ubhC and a pointer to a struct page_pool_stats allocated by the caller.}(hjV#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKnhjE#hhubh)}(hOlder drivers expose page pool statistics via ethtool or debugfs. The same statistics are accessible via the netlink netdev family in a driver-independent fashion.h]hOlder drivers expose page pool statistics via ethtool or debugfs. The same statistics are accessible via the netlink netdev family in a driver-independent fashion.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjE#hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j page_pool_alloc_stats (C struct)c.page_pool_alloc_statshNtauh1jhjE#hhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhNubj)}(hhh](j)}(hpage_pool_alloc_statsh]j)}(hstruct page_pool_alloc_statsh](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#hhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#hhhj#hKubjt)}(hpage_pool_alloc_statsh]j()}(hj#h]hpage_pool_alloc_stats}(hj#hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj#ubah}(h]h ](jjeh"]h$]h&]hhuh1jshj#hhhj#hKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hj#hhhj#hKubah}(h]j#ah ](j4j5eh"]h$]h&]j9j:)j;huh1jhj#hKhj#hhubj=)}(hhh]h)}(hallocation statisticsh]hallocation statistics}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKnhj#hhubah}(h]h ]h"]h$]h&]uh1j<hj#hhhj#hKubeh}(h]h ](j?structeh"]h$]h&]j]j?j^j $j_j $j`jajbuh1jhhhjE#hj#hNubjd)}(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](j)}(h**Definition**h]h Definition}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh:}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKrhj$ubji)}(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; };}hj/$sbah}(h]h ]h"]h$]h&]hhuh1jhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKthj$ubh)}(h **Members**h]j)}(hj@$h]hMembers}(hjB$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhK}hj$ubj)}(hhh](j)}(h*``fast`` successful fast path allocations h](j)}(h``fast``h]j)}(hj_$h]hfast}(hja$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]$ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKphjY$ubj)}(hhh]h)}(h successful fast path allocationsh]h successful fast path allocations}(hjx$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt$hKphju$ubah}(h]h ]h"]h$]h&]uh1jhjY$ubeh}(h]h ]h"]h$]h&]uh1jhjt$hKphjV$ubj)}(h'``slow`` slow path order-0 allocations h](j)}(h``slow``h]j)}(hj$h]hslow}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKqhj$ubj)}(hhh]h)}(hslow path order-0 allocationsh]hslow path order-0 allocations}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKqhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hKqhjV$ubj)}(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&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./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$hKrhjV$ubj)}(hB``empty`` ptr ring is empty, so a slow path allocation was forced h](j)}(h ``empty``h]j)}(hj %h]hempty}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKshj%ubj)}(hhh]h)}(h7ptr ring is empty, so a slow path allocation was forcedh]h7ptr ring is empty, so a slow path allocation was forced}(hj#%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKshj %ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hKshjV$ubj)}(h?``refill`` an allocation which triggered a refill of the cache h](j)}(h ``refill``h]j)}(hjC%h]hrefill}(hjE%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA%ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKthj=%ubj)}(hhh]h)}(h3an allocation which triggered a refill of the cacheh]h3an allocation which triggered a refill of the cache}(hj\%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX%hKthjY%ubah}(h]h ]h"]h$]h&]uh1jhj=%ubeh}(h]h ]h"]h$]h&]uh1jhjX%hKthjV$ubj)}(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)}(hj|%h]hwaive}(hj~%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz%ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKuhjv%ubj)}(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}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKuhj%ubah}(h]h ]h"]h$]h&]uh1jhjv%ubeh}(h]h ]h"]h$]h&]uh1jhj%hKuhjV$ubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjE#hhhj#hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"page_pool_recycle_stats (C struct)c.page_pool_recycle_statshNtauh1jhjE#hhhj#hNubj)}(hhh](j)}(hpage_pool_recycle_statsh]j)}(hstruct page_pool_recycle_statsh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhK|ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%hhhj%hK|ubjt)}(hpage_pool_recycle_statsh]j()}(hj%h]hpage_pool_recycle_stats}(hj%hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj%ubah}(h]h ](jjeh"]h$]h&]hhuh1jshj%hhhj%hK|ubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hj%hhhj%hK|ubah}(h]j%ah ](j4j5eh"]h$]h&]j9j:)j;huh1jhj%hK|hj%hhubj=)}(hhh]h)}(hrecycling (freeing) statisticsh]hrecycling (freeing) statistics}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj&hhubah}(h]h ]h"]h$]h&]uh1j<hj%hhhj%hK|ubeh}(h]h ](j?structeh"]h$]h&]j]j?j^j/&j_j/&j`jajbuh1jhhhjE#hj#hNubjd)}(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}(hj;&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7&ubh:}(hj7&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj3&ubji)}(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; };}hjT&sbah}(h]h ]h"]h$]h&]hhuh1jhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj3&ubh)}(h **Members**h]j)}(hje&h]hMembers}(hjg&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj3&ubj)}(hhh](j)}(h8``cached`` recycling placed page in the page pool cache h](j)}(h ``cached``h]j)}(hj&h]hcached}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj~&ubj)}(hhh]h)}(h,recycling placed page in the page pool cacheh]h,recycling placed page in the page pool cache}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1jhj~&ubeh}(h]h ]h"]h$]h&]uh1jhj&hKhj{&ubj)}(h(``cache_full`` page pool cache was full h](j)}(h``cache_full``h]j)}(hj&h]h cache_full}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./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&hKhj{&ubj)}(h'``ring`` page placed into the ptr ring h](j)}(h``ring``h]j)}(hj&h]hring}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj&ubj)}(hhh]h)}(hpage placed into the ptr ringh]hpage placed into the ptr ring}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 'hKhj 'ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj 'hKhj{&ubj)}(hI``ring_full`` page released from page pool because the ptr ring was full h](j)}(h ``ring_full``h]j)}(hj/'h]h ring_full}(hj1'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./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}(hjH'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD'hKhjE'ubah}(h]h ]h"]h$]h&]uh1jhj)'ubeh}(h]h ]h"]h$]h&]uh1jhjD'hKhj{&ubj)}(hG``released_refcnt`` page released (and not recycled) because refcnt > 1h](j)}(h``released_refcnt``h]j)}(hjh'h]hreleased_refcnt}(hjj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhjb'ubj)}(hhh]h)}(h3page released (and not recycled) because refcnt > 1h]h3page released (and not recycled) because refcnt > 1}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj~'ubah}(h]h ]h"]h$]h&]uh1jhjb'ubeh}(h]h ]h"]h$]h&]uh1jhj}'hKhj{&ubeh}(h]h ]h"]h$]h&]uh1jhj3&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjE#hhhj#/hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_stats (C struct)c.page_pool_statshNtauh1jhjE#hhhj#hNubj)}(hhh](j)}(hpage_pool_statsh]j)}(hstruct page_pool_statsh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'hhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKubj)}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj'hhhj'hKubjt)}(hpage_pool_statsh]j()}(hj'h]hpage_pool_stats}(hj'hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj'ubah}(h]h ](jjeh"]h$]h&]hhuh1jshj'hhhj'hKubeh}(h]h ]h"]h$]h&]hhj.uh1jj/j0hj'hhhj'hKubah}(h]j'ah ](j4j5eh"]h$]h&]j9j:)j;huh1jhj'hKhj'hhubj=)}(hhh]h)}(h!combined page pool use statisticsh]h!combined page pool use statistics}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj(hhubah}(h]h ]h"]h$]h&]uh1j<hj'hhhj'hKubeh}(h]h ](j?structeh"]h$]h&]j]j?j^j(j_j(j`jajbuh1jhhhjE#hj#hNubjd)}(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&]uh1jhj$(ubh:}(hj$(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj (ubji)}(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; };}hjA(sbah}(h]h ]h"]h$]h&]hhuh1jhhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj (ubh)}(h **Members**h]j)}(hjR(h]hMembers}(hjT(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP(ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj (ubj)}(hhh](j)}(h1``alloc_stats`` see struct page_pool_alloc_stats h](j)}(h``alloc_stats``h]j)}(hjq(h]h alloc_stats}(hjs(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhjk(ubj)}(hhh]h)}(h see struct page_pool_alloc_statsh]h see struct page_pool_alloc_stats}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKhj(ubah}(h]h ]h"]h$]h&]uh1jhjk(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhjh(ubj)}(h4``recycle_stats`` see struct page_pool_recycle_statsh](j)}(h``recycle_stats``h]j)}(hj(h]h recycle_stats}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj(ubj)}(hhh]h)}(h"see struct page_pool_recycle_statsh]h"see struct page_pool_recycle_stats}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhjh(ubeh}(h]h ]h"]h$]h&]uh1jhj (ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchjE#hhhj#hNubh)}(h**Description**h]j)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhjE#hhubh)}(hQWrapper struct for combining page pool stats with different storage requirements.h]hQWrapper struct for combining page pool stats with different storage requirements.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhjE#hhubeh}(h]stats-api-and-structuresah ]h"]stats api and structuresah$]h&]uh1hhjhhhhhKmubeh}(h] api-interfaceah ]h"] api interfaceah$]h&]uh1hhhhhhhhK2ubh)}(hhh](h)}(hCoding examplesh]hCoding examples}(hj%)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj")hhhhhK}ubh)}(hhh](h)}(h Registrationh]h Registration}(hj6)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3)hhhhhKubji)}(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 locking is tied to NAPI */ 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 locking is tied to NAPI */ 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;}hjD)sbah}(h]h ]h"]h$]h&]hhjxjyj?j{}uh1jhhhhKhj3)hhubeh}(h] registrationah ]h"] registrationah$]h&]uh1hhj")hhhhhKubh)}(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); } }}hjl)sbah}(h]h ]h"]h$]h&]hhjxjyj?j{}uh1jhhhhKhj[)hhubeh}(h] napi-pollerah ]h"] napi pollerah$]h&]uh1hhj")hhhhhKubh)}(hhh](h)}(hStatsh]hStats}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhKubji)}(hXF#ifdef CONFIG_PAGE_POOL_STATS /* retrieve stats */ struct page_pool_stats stats = { 0 }; if (page_pool_get_stats(page_pool, &stats)) { /* perhaps the driver reports statistics with ethool */ ethtool_print_allocation_stats(&stats.alloc_stats); ethtool_print_recycle_stats(&stats.recycle_stats); } #endifh]hXF#ifdef CONFIG_PAGE_POOL_STATS /* retrieve stats */ struct page_pool_stats stats = { 0 }; if (page_pool_get_stats(page_pool, &stats)) { /* perhaps the driver reports statistics with ethool */ ethtool_print_allocation_stats(&stats.alloc_stats); ethtool_print_recycle_stats(&stats.recycle_stats); } #endif}hj)sbah}(h]h ]h"]h$]h&]hhjxjyj?j{}uh1jhhhhKhj)hhubeh}(h]statsah ]h"]statsah$]h&]uh1hhj")hhhhhKubh)}(hhh](h)}(h Driver unloadh]h Driver unload}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)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);}hj)sbah}(h]h ]h"]h$]h&]hhjxjyj?j{}uh1jhhhhKhj)hhubeh}(h] driver-unloadah ]h"] driver unloadah$]h&]uh1hhj")hhhhhKubeh}(h]coding-examplesah ]h"]coding examplesah$]h&]uh1hhhhhhhhK}ubeh}(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}(j)j)jjjjj)j)jB#j?#j)j)j)j)jX)jU)j)j})j)j)j)j)u nametypes}(j)jjj)jB#j)j)jX)j)j)j)uh}(j)hjjWjjj)jjjjjjjjQ jV jX j] jijnjjjjjjjbjgjjjjjjj?#j!j)jE#j#j#j%j%j'j'j)j")jU)j3)j})j[)j)j)j)j)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.