Usphinx.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]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.}(hhhhhNhNubah}(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().}(hjhhhNhNubah}(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.}(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)}(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.}(hj4hhhNhNubah}(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}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhK 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 | +-----------------+ +------------------+}hjVsbah}(h]h ]h"]h$]h&]hhforcelanguagenonehighlight_args}uh1jThhhK hjChhubeh}(h]architecture-overviewah ]h"]architecture overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Monitoringh]h Monitoring}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhK-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.hjqhhubeh}(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.chMsubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhMsubh)}(hhh]h desc_sig_name)}(h page_poolh]h page_pool}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j2 ASTIdentifier)}j-page_pool_createsbc.page_pool_createasbuh1hhjhhhjhMsubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMsubhdesc_sig_punctuation)}(h*h]h*}(hjPhhhNhNubah}(h]h ]pah"]h$]h&]uh1jNhjhhhjhMsubh desc_name)}(hpage_pool_createh]j)}(hj=h]hpage_pool_create}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjaubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j_hjhhhjhMsubhdesc_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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j;c.page_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hparamsh]hparams}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj|ubah}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhMsubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhMsubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhMshjhhubh desc_content)}(hhh]h)}(hcreate a page poolh]hcreate a page pool}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMphj*hhubah}(h]h ]h"]h$]h&]uh1j(hjhhhjhMsubeh}(h]h ](j+functioneh"]h$]h&]domainj+objtypejEdesctypejEnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hc**Parameters** ``const struct page_pool_params *params`` parameters, see struct page_pool_paramsh](h)}(h**Parameters**h]j)}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMthjQubhdefinition_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)}(hj|h]h%const struct page_pool_params *params}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjzubah}(h]h ]h"]h$]h&]uh1jxhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:58: ./net/core/page_pool.chMvhjtubh 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.chMqhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jrhjhMvhjoubah}(h]h ]h"]h$]h&]uh1jmhjQubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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&]uh1jhjhhhjhKubj`)}(hpage_pool_paramsh]j)}(hjh]hpage_pool_params}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhKhjhhubj))}(hhh]h)}(hpage pool parametersh]hpage pool parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK:hjhhubah}(h]h ]h"]h$]h&]uh1j(hjhhhjhKubeh}(h]h ](j+structeh"]h$]h&]jIj+jJj4jKj4jLjMjNuh1jhhhjhNhNubjP)}(hX**Definition**:: struct page_pool_params { struct page_pool_params_fast fast; 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 page_pool_params_slow slow; STRUCT_GROUP( struct net_device *netdev; unsigned int queue_idx; unsigned int flags; }; **Members** ``fast`` params accessed frequently on hotpath ``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 ``slow`` params with slowpath access only (initialization and Netlink) ``netdev`` netdev this pool will serve (leave as NULL if none or multiple) ``queue_idx`` queue idx this page_pool is being created for. ``flags`` PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK>hj8ubjU)}(hXstruct page_pool_params { struct page_pool_params_fast fast; 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 page_pool_params_slow slow; STRUCT_GROUP( struct net_device *netdev; unsigned int queue_idx; unsigned int flags; };h]hXstruct page_pool_params { struct page_pool_params_fast fast; 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 page_pool_params_slow slow; STRUCT_GROUP( struct net_device *netdev; unsigned int queue_idx; unsigned int flags; };}hjYsbah}(h]h ]h"]h$]h&]hhuh1jThb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK@hj8ubh)}(h **Members**h]j)}(hjjh]hMembers}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKPhj8ubjn)}(hhh](js)}(h/``fast`` params accessed frequently on hotpath h](jy)}(h``fast``h]j)}(hjh]hfast}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKhjubj)}(hhh]h)}(hsize of the ptr_ringh]hsize of the ptr_ring}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK>hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhK>hjubjs)}(h1``nid`` NUMA node id to allocate from pages from h](jy)}(h``nid``h]j)}(hj4h]hnid}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj2ubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK?hj.ubj)}(hhh]h)}(h(NUMA node id to allocate from pages fromh]h(NUMA node id to allocate from pages from}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhK?hjJubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jrhjIhK?hjubjs)}(h-``dev`` device, for DMA pre-mapping purposes h](jy)}(h``dev``h]j)}(hjmh]hdev}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjkubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhK@hjgubj)}(hhh]h)}(h$device, for DMA pre-mapping purposesh]h$device, for DMA pre-mapping purposes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK@hjubah}(h]h ]h"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]uh1jrhjhK@hjubjs)}(hB``napi`` NAPI which is the sole consumer of pages, otherwise NULL h](jy)}(h``napi``h]j)}(hjh]hnapi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKAhjubj)}(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&]uh1hhjhKAhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKAhjubjs)}(h"``dma_dir`` DMA mapping direction h](jy)}(h ``dma_dir``h]j)}(hjh]hdma_dir}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKBhjubj)}(hhh]h)}(hDMA mapping directionh]hDMA mapping direction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKBhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKBhjubjs)}(h>``max_len`` max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV h](jy)}(h ``max_len``h]j)}(hjh]hmax_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKChjubj)}(hhh]h)}(h1max DMA sync memory size for PP_FLAG_DMA_SYNC_DEVh]h1max DMA sync memory size for PP_FLAG_DMA_SYNC_DEV}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKChj.ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhj-hKChjubjs)}(h<``offset`` DMA sync address offset for PP_FLAG_DMA_SYNC_DEV h](jy)}(h ``offset``h]j)}(hjQh]hoffset}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjOubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKDhjKubj)}(hhh]h)}(h0DMA sync address offset for PP_FLAG_DMA_SYNC_DEVh]h0DMA sync address offset for PP_FLAG_DMA_SYNC_DEV}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhKDhjgubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jrhjfhKDhjubjs)}(hG``slow`` params with slowpath access only (initialization and Netlink) h](jy)}(h``slow``h]j)}(hjh]hslow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKEhjubj)}(hhh]h)}(h=params with slowpath access only (initialization and Netlink)h]h=params with slowpath access only (initialization and Netlink)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKEhjubjs)}(hK``netdev`` netdev this pool will serve (leave as NULL if none or multiple) h](jy)}(h ``netdev``h]j)}(hjh]hnetdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKFhjubj)}(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&]uh1hhjhKFhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKFhjubjs)}(h=``queue_idx`` queue idx this page_pool is being created for. h](jy)}(h ``queue_idx``h]j)}(hjh]h queue_idx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKGhjubj)}(hhh]h)}(h.queue idx this page_pool is being created for.h]h.queue idx this page_pool is being created for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKGhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKGhjubjs)}(hf``flags`` PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h](jy)}(h ``flags``h]j)}(hj5h]hflags}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj3ubah}(h]h ]h"]h$]h&]uh1jxhb/var/lib/git/docbuild/linux/Documentation/networking/page_pool:61: ./include/net/page_pool/types.hhKHhj/ubj)}(hhh]h)}(h\PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.h]h\PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKHhjKubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jrhjJhKHhjubeh}(h]h ]h"]h$]h&]uh1jmhj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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.hhK\ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhK\ubh)}(hhh]j)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-page_pool_dev_alloc_pagessbc.page_pool_dev_alloc_pagesasbuh1hhjhhhjhK\ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhK\ubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjhhhjhK\ubj`)}(hpage_pool_dev_alloc_pagesh]j)}(hjh]hpage_pool_dev_alloc_pages}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhK\ubj{)}(h(struct page_pool *pool)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 ]j ah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj(modnameN classnameNj1j4)}j7]jc.page_pool_dev_alloc_pagesasbuh1hhjubj)}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjRhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhK\ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhK\ubah}(h]jah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhK\hjhhubj))}(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(hjhhhjhK\ubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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[hjubjn)}(hhh]js)}(h7``struct page_pool *pool`` pool from which to allocate h](jy)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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&]uh1jrhjhKXhjubah}(h]h ]h"]h$]h&]uh1jmhjubh)}(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.hhKZhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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}(hjJ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKmubj)}(h h]h }(hjX hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjF hhhjW hKmubh)}(hhh]j)}(hpageh]hpage}(hji hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjf ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjk modnameN classnameNj1j4)}j7]j:)}j-page_pool_dev_alloc_fragsbc.page_pool_dev_alloc_fragasbuh1hhjF hhhjW hKmubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjF hhhjW hKmubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjF hhhjW hKmubj`)}(hpage_pool_dev_alloc_fragh]j)}(hj h]hpage_pool_dev_alloc_frag}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjF hhhjW hKmubj{)}(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 ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj modnameN classnameNj1j4)}j7]j c.page_pool_dev_alloc_fragasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj ubj)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *offseth](hdesc_sig_keyword_type)}(hunsignedh]hunsigned}(hj6 hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j4 hj0 ubj)}(h h]h }(hjE hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0 ubj5 )}(hinth]hint}(hjS hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj0 ubj)}(h h]h }(hja hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0 ubjO)}(hjRh]h*}(hjo hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj0 ubj)}(hoffseth]hoffset}(hj| hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0 ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int sizeh](j5 )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj5 )}(hinth]hint}(hj hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jzhjF hhhjW hKmubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjB hhhjW hKmubah}(h]j= ah ](j j!eh"]h$]h&]j%j&)j'huh1jhjW hKmhj? 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(hj? hhhjW hKmubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJj jKj jLjMjNuh1jhhhjhNhNubjP)}(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 ubjn)}(hhh](js)}(h7``struct page_pool *pool`` pool from which to allocate h](jy)}(h``struct page_pool *pool``h]j)}(hj8 h]hstruct page_pool *pool}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj6 ubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKehj2 ubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjM hKehjN ubah}(h]h ]h"]h$]h&]uh1jhj2 ubeh}(h]h ]h"]h$]h&]uh1jrhjM hKehj/ ubjs)}(h6``unsigned int *offset`` offset to the allocated page h](jy)}(h``unsigned int *offset``h]j)}(hjq h]hunsigned int *offset}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjo ubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKfhjk 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&]uh1jhjk ubeh}(h]h ]h"]h$]h&]uh1jrhj hKfhj/ ubjs)}(h%``unsigned int size`` requested size h](jy)}(h``unsigned int size``h]j)}(hj h]hunsigned int size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj ubah}(h]h ]h"]h$]h&]uh1jxhd/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&]uh1jrhj hKghj/ ubeh}(h]h ]h"]h$]h&]uh1jmhj 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.hhKihj 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.hhKkhj ubh)}(h/allocated page fragment, otherwise return NULL.h]h/allocated page fragment, otherwise return NULL.}(hj" 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&]uh1jOhjhhhNhNubj)}(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}(hjQ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hj_ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjM hhhj^ hKubh)}(hhh]j)}(hpageh]hpage}(hjp hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjm ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjr modnameN classnameNj1j4)}j7]j:)}j-page_pool_dev_allocsbc.page_pool_dev_allocasbuh1hhjM hhhj^ hKubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjM hhhj^ hKubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjM hhhj^ hKubj`)}(hpage_pool_dev_alloch]j)}(hj h]hpage_pool_dev_alloc}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjM hhhj^ 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 ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj modnameN classnameNj1j4)}j7]j c.page_pool_dev_allocasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj ubj)}(hpoolh]hpool}(hj" hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *offseth](j5 )}(hunsignedh]hunsigned}(hj; hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj7 ubj)}(h h]h }(hjI hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7 ubj5 )}(hinth]hint}(hjW hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj7 ubj)}(h h]h }(hje hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7 ubjO)}(hjRh]h*}(hjs hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj7 ubj)}(hoffseth]hoffset}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7 ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned int *sizeh](j5 )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj5 )}(hinth]hint}(hj hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj ubj)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jzhjM hhhj^ hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjI hhhj^ hKubah}(h]jD ah ](j j!eh"]h$]h&]j%j&)j'huh1jhj^ hKhjF 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(hjF hhhj^ hKubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJj jKj jLjMjNuh1jhhhjhNhNubjP)}(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.hhKhj$ubjn)}(hhh](js)}(h7``struct page_pool *pool`` pool from which to allocate h](jy)}(h``struct page_pool *pool``h]j)}(hjIh]hstruct page_pool *pool}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjGubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhjCubj)}(hhh]h)}(hpool from which to allocateh]hpool from which to allocate}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hKhj_ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jrhj^hKhj@ubjs)}(h6``unsigned int *offset`` offset to the allocated page h](jy)}(h``unsigned int *offset``h]j)}(hjh]hunsigned int *offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj|ubj)}(hhh]h)}(hoffset to the allocated pageh]hoffset to the allocated page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jrhjhKhj@ubjs)}(hK``unsigned int *size`` in as the requested size, out as the allocated size h](jy)}(h``unsigned int *size``h]j)}(hjh]hunsigned int *size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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&]uh1jrhjhKhj@ubeh}(h]h ]h"]h$]h&]uh1jmhj$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.hhKhj$ubh)}(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.hhKhj$ubh)}(h **Return**h]j)}(hjh]hReturn}(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.hhKhj$ubh)}(h7allocated page or page fragment, otherwise return NULL.h]h7allocated page or page fragment, otherwise return NULL.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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](j5 )}(hvoidh]hvoid}(hjbhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj^hhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhKubj)}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj^hhhjphKubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj^hhhjphKubj`)}(hpage_pool_dev_alloc_vah]j)}(hpage_pool_dev_alloc_vah]hpage_pool_dev_alloc_va}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hj^hhhjphKubj{)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-jsbc.page_pool_dev_alloc_vaasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int *sizeh](j5 )}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj5 )}(hinth]hint}(hj:hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjVhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hsizeh]hsize}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhj^hhhjphKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjZhhhjphKubah}(h]jUah ](j j!eh"]h$]h&]j%j&)j'huh1jhjphKhjWhhubj))}(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(hjWhhhjphKubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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.hhKhjubjn)}(hhh](js)}(h7``struct page_pool *pool`` pool from which to allocate h](jy)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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&]uh1jrhjhKhjubjs)}(hK``unsigned int *size`` in as the requested size, out as the allocated size h](jy)}(h``unsigned int *size``h]j)}(hjh]hunsigned int *size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKhjubeh}(h]h ]h"]h$]h&]uh1jmhjubh)}(h**Description**h]j)}(hjBh]h Description}(hjDhhhNhNubah}(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)}(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.}(hjXhhhNhNubah}(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)}(hjih]hReturn}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(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&]uh1jOhjhhhNhNubj)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-page_pool_get_dma_dirsbc.page_pool_get_dma_dirasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj`)}(hpage_pool_get_dma_dirh]j)}(hjh]hpage_pool_get_dma_dir}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhKubj{)}(h(const struct page_pool *pool)h]j)}(hconst struct page_pool *poolh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h page_poolh]h page_pool}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjWmodnameN classnameNj1j4)}j7]jc.page_pool_get_dma_dirasbuh1hhjubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](j j!eh"]h$]h&]j%j&)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&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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.hhKhjubjn)}(hhh]js)}(hD``const struct page_pool *pool`` pool from which page was allocated h](jy)}(h ``const struct page_pool *pool``h]j)}(hjh]hconst struct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhKhjubah}(h]h ]h"]h$]h&]uh1jmhjubh)}(h**Description**h]j)}(hj4h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(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.}(hjJhhhNhNubah}(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&]uh1jOhjhhhNhNubj)}(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](j5 )}(hvoidh]hvoid}(hjyhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjuhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMaubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuhhhjhMaubj`)}(hpage_pool_put_pageh]j)}(hpage_pool_put_pageh]hpage_pool_put_page}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjuhhhjhMaubj{)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-jsbc.page_pool_put_pageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$ubh)}(hhh]j)}(hpageh]hpage}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjHmodnameN classnameNj1j4)}j7]jc.page_pool_put_pageasbuh1hhj$ubj)}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$ubjO)}(hjRh]h*}(hjrhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj$ubj)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned int dma_sync_sizeh](j5 )}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj5 )}(hinth]hint}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h dma_sync_sizeh]h dma_sync_size}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](j5 )}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhjuhhhjhMaubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjqhhhjhMaubah}(h]jlah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhMahjnhhubj))}(hhh]h)}(h'release a reference to a page pool pageh]h'release a reference to a page pool page}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMUhj,hhubah}(h]h ]h"]h$]h&]uh1j(hjnhhhjhMaubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjGjKjGjLjMjNuh1jhhhjhNhNubjP)}(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)}(hjQh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMYhjKubjn)}(hhh](js)}(h>``struct page_pool *pool`` pool from which page was allocated h](jy)}(h``struct page_pool *pool``h]j)}(hjph]hstruct page_pool *pool}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjnubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMVhjjubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMVhjubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]uh1jrhjhMVhjgubjs)}(h5``struct page *page`` page to release a reference on h](jy)}(h``struct page *page``h]j)}(hjh]hstruct page *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMWhjubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhMWhjgubjs)}(hX``unsigned int dma_sync_size`` how much of the page may have been touched by the device h](jy)}(h``unsigned int dma_sync_size``h]j)}(hjh]hunsigned int dma_sync_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMXhjubj)}(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&]uh1hhjhMXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhMXhjgubjs)}(hG``bool allow_direct`` released by the consumer, allow lockless caching h](jy)}(h``bool allow_direct``h]j)}(hjh]hbool allow_direct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMYhjubj)}(hhh]h)}(h0released by the consumer, allow lockless cachingh]h0released by the consumer, allow lockless caching}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMYhj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhj0hMYhjgubeh}(h]h ]h"]h$]h&]uh1jmhjKubh)}(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.hhM[hjKubh)}(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().}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhM[hjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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](j5 )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMzubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMzubj`)}(hpage_pool_put_full_pageh]j)}(hpage_pool_put_full_pageh]hpage_pool_put_full_page}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhMzubj{)}(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}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-jsbc.page_pool_put_full_pageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hj$hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubh)}(hhh]j)}(hpageh]hpage}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjjmodnameN classnameNj1j4)}j7]jc.page_pool_put_full_pageasbuh1hhjFubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjFubj)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](j5 )}(hjh]hbool}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhMzubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMzubah}(h]jah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhMzhjhhubj))}(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.hhMrhjhhubah}(h]h ]h"]h$]h&]uh1j(hjhhhjhMzubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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)}(hj!h]h Parameters}(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.hhMvhjubjn)}(hhh](js)}(h>``struct page_pool *pool`` pool from which page was allocated h](jy)}(h``struct page_pool *pool``h]j)}(hj@h]hstruct page_pool *pool}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj>ubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMshj:ubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMshjVubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jrhjUhMshj7ubjs)}(h5``struct page *page`` page to release a reference on h](jy)}(h``struct page *page``h]j)}(hjyh]hstruct page *page}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjwubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMthjsubj)}(hhh]h)}(hpage to release a reference onh]hpage to release a reference on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMthjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jrhjhMthj7ubjs)}(hG``bool allow_direct`` released by the consumer, allow lockless caching h](jy)}(h``bool allow_direct``h]j)}(hjh]hbool allow_direct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMuhjubj)}(hhh]h)}(h0released by the consumer, allow lockless cachingh]h0released by the consumer, allow lockless caching}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhMuhj7ubeh}(h]h ]h"]h$]h&]uh1jmhjubh)}(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.hhMwhjubh)}(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}(hjhhhNhNubah}(h]h ](xrefj+c-typeeh"]h$]h&]uh1j~hj ubah}(h]h ]h"]h$]h&]refdocnetworking/page_pool refdomainj+reftypetype refexplicitrefwarnj1j4)}j7]sb reftargetpage_pool_paramsuh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMwhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj0hMwhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubj)}(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](j5 )}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjWhhhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjWhhhjihMubj`)}(hpage_pool_recycle_directh]j)}(hpage_pool_recycle_directh]hpage_pool_recycle_direct}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjWhhhjihMubj{)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-j~sbc.page_pool_recycle_directasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page *pageh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(hpageh]hpage}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj*modnameN classnameNj1j4)}j7]jc.page_pool_recycle_directasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjThhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpageh]hpage}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhjWhhhjihMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjShhhjihMubah}(h]jNah ](j j!eh"]h$]h&]j%j&)j'huh1jhjihMhjPhhubj))}(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(hjPhhhjihMubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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.hhMhjubjn)}(hhh](js)}(h>``struct page_pool *pool`` pool from which page was allocated h](jy)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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&]uh1jrhjhMhjubjs)}(h5``struct page *page`` page to release a reference on h](jy)}(h``struct page *page``h]j)}(hjh]hstruct page *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhMhjubeh}(h]h ]h"]h$]h&]uh1jmhjubh)}(h**Description**h]j)}(hj@h]h Description}(hjBhhhNhNubah}(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.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.}(hjVhhhNhNubah}(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&]uh1jOhjhhhNhNubj)}(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](j5 )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 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&]uh1jhjhhhjhMubj`)}(hpage_pool_free_vah]j)}(hpage_pool_free_vah]hpage_pool_free_va}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhMubj{)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-jsbc.page_pool_free_vaasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hvoid *vah](j5 )}(hvoidh]hvoid}(hj4hhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hj0ubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0ubjO)}(hjRh]h*}(hjPhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj0ubj)}(hvah]hva}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hbool allow_directh](j5 )}(hjh]hbool}(hjvhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjrubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrubj)}(h allow_directh]h allow_direct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj}hhhjhMubah}(h]jxah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhMhjzhhubj))}(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(hjzhhhjhMubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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.hhMhjubjn)}(hhh](js)}(h<``struct page_pool *pool`` pool from which va was allocated h](jy)}(h``struct page_pool *pool``h]j)}(hjh]hstruct page_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubj)}(hhh]h)}(h pool from which va was allocatedh]h pool from which va was allocated}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhjhMhjubjs)}(h``void *va`` va to be freed h](jy)}(h ``void *va``h]j)}(hj5h]hvoid *va}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj3ubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhj/ubj)}(hhh]h)}(hva to be freedh]hva to be freed}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMhjKubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jrhjJhMhjubjs)}(hD``bool allow_direct`` freed by the consumer, allow lockless caching h](jy)}(h``bool allow_direct``h]j)}(hjnh]hbool allow_direct}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjlubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjhubj)}(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&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jrhjhMhjubeh}(h]h ]h"]h$]h&]uh1jmhjubh)}(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&]uh1jOhjhhhNhNubj)}(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 ]j ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetjmodnameN classnameNj1j4)}j7]j:)}j-page_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 }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj`)}(hpage_pool_get_dma_addrh]j)}(hjh]hpage_pool_get_dma_addr}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhMubj{)}(h(const struct page *page)h]j)}(hconst struct page *pageh](j)}(hjh]hconst}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubj)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj)}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubh)}(hhh]j)}(hpageh]hpage}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj{modnameN classnameNj1j4)}j7]j c.page_pool_get_dma_addrasbuh1hhj<ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubjO)}(hjRh]h*}(hjhhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhj<ubj)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubah}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhMhjhhubj))}(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(hjhhhjhMubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJjjKjjLjMjNuh1jhhhjhNhNubjP)}(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.hhMhjubjn)}(hhh]js)}(h<``const struct page *page`` page allocated from a page pool h](jy)}(h``const struct page *page``h]j)}(hjh]hconst struct page *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjubah}(h]h ]h"]h$]h&]uh1jxhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubj)}(hhh]h)}(hpage allocated from a page poolh]hpage allocated from a page pool}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jrhj2hMhjubah}(h]h ]h"]h$]h&]uh1jmhjubh)}(h**Description**h]j)}(hjXh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/networking/page_pool:64: ./include/net/page_pool/helpers.hhMhjubh)}(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.}(hjnhhhNhNubah}(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&]uh1jOhjhhhNhNubj)}(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](j5 )}(hjh]hbool}(hjhhhNhNubah}(h]h ]jA ah"]h$]h&]uh1j4 hjhhhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKUubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKUubj`)}(hpage_pool_get_statsh]j)}(hpage_pool_get_statsh]hpage_pool_get_stats}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](jujveh"]h$]h&]hhuh1j_hjhhhjhKUubj{)}(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}(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 ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj modnameN classnameNj1j4)}j7]j:)}j-jsbc.page_pool_get_statsasbuh1hhjubj)}(h h]h }(hj2 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjO)}(hjRh]h*}(hj@ hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjubj)}(hpoolh]hpool}(hjM hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct page_pool_stats *statsh](j)}(hjh]hstruct}(hjf hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb ubj)}(h h]h }(hjs hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjb ubh)}(hhh]j)}(hpage_pool_statsh]hpage_pool_stats}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainj+reftypej- reftargetj modnameN classnameNj1j4)}j7]j. c.page_pool_get_statsasbuh1hhjb ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjb ubjO)}(hjRh]h*}(hj hhhNhNubah}(h]h ]j[ah"]h$]h&]uh1jNhjb ubj)}(hstatsh]hstats}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjb ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jzhjhhhjhKUubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKUubah}(h]jah ](j j!eh"]h$]h&]j%j&)j'huh1jhjhKUhjhhubj))}(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(hjhhhjhKUubeh}(h]h ](j+functioneh"]h$]h&]jIj+jJj jKj jLjMjNuh1jhhhjhNhNubjP)}(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!ubjn)}(hhh](js)}(hD``const struct page_pool *pool`` pool from which page was allocated h](jy)}(h ``const struct page_pool *pool``h]j)}(hj(!h]hconst struct page_pool *pool}(hj*!hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj&!ubah}(h]h ]h"]h$]h&]uh1jxhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKLhj"!ubj)}(hhh]h)}(h"pool from which page was allocatedh]h"pool from which page was allocated}(hjA!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=!hKLhj>!ubah}(h]h ]h"]h$]h&]uh1jhj"!ubeh}(h]h ]h"]h$]h&]uh1jrhj=!hKLhj!ubjs)}(hD``struct page_pool_stats *stats`` struct page_pool_stats to fill in h](jy)}(h!``struct page_pool_stats *stats``h]j)}(hja!h]hstruct page_pool_stats *stats}(hjc!hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj_!ubah}(h]h ]h"]h$]h&]uh1jxhY/var/lib/git/docbuild/linux/Documentation/networking/page_pool:71: ./net/core/page_pool.chKMhj[!ubj)}(hhh]h)}(h!struct page_pool_stats to fill inh]h!struct page_pool_stats to fill in}(hjz!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv!hKMhjw!ubah}(h]h ]h"]h$]h&]uh1jhj[!ubeh}(h]h ]h"]h$]h&]uh1jrhjv!hKMhj!ubeh}(h]h ]h"]h$]h&]uh1jmhj!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&]uh1j~hj!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.chKOhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhjhhhNhNubh)}(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&]uh1j~hj!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&]uh1j~hj "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}(hj3"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj+"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 }(hjK"hhhNhNubj)}(h ``max_len``h]hmax_len}(hjS"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjK"ubhb member of struct page_pool_params to decide how much of the page needs to be synced (starting at }(hjK"hhhNhNubj)}(h ``offset``h]hoffset}(hje"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjK"ubhH). When directly freeing pages in the driver (page_pool_put_page()) the }(hjK"hhhNhNubj)}(h``dma_sync_size``h]h dma_sync_size}(hjw"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjK"ubh> argument specifies how much of the buffer needs to be synced.}(hjK"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&]uh1j~hj"ubh to 0, }(hj"hhhNhNubj)}(h ``max_len``h]hmax_len}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj"ubh to }(hj"hhhNhNubj)}(h ``PAGE_SIZE``h]h PAGE_SIZE}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj"ubh and pass -1 as }(hj"hhhNhNubj)}(h``dma_sync_size``h]h dma_sync_size}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj"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&]uh1j~hj"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&]uh1j~hj"ubh, }(hj"hhhNhNubj)}(h``max_len = PAGE_SIZE``h]hmax_len = PAGE_SIZE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj"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}(hj4#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1#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 }(hjB#hhhNhNubj)}(h``CONFIG_PAGE_POOL_STATS=y``h]hCONFIG_PAGE_POOL_STATS=y}(hjJ#hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjB#ubhg, the API page_pool_get_stats() and structures described below are available. It takes a pointer to a }(hjB#hhhNhNubj)}(h``struct page_pool``h]hstruct page_pool}(hj\#hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjB#ubhC and a pointer to a struct page_pool_stats allocated by the caller.}(hjB#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKnhj1#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.}(hjt#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj1#hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j page_pool_alloc_stats (C struct)c.page_pool_alloc_statshNtauh1jhj1#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#hKubj`)}(hpage_pool_alloc_statsh]j)}(hj#h]hpage_pool_alloc_stats}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hj#hhhj#hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj#hhhj#hKubah}(h]j#ah ](j j!eh"]h$]h&]j%j&)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.hhKahj#hhubah}(h]h ]h"]h$]h&]uh1j(hj#hhhj#hKubeh}(h]h ](j+structeh"]h$]h&]jIj+jJj#jKj#jLjMjNuh1jhhhj1#hj#hNubjP)}(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.hhKehj#ubjU)}(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&]hhuh1jThc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKghj#ubh)}(h **Members**h]j)}(hj,$h]hMembers}(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.hhKphj#ubjn)}(hhh](js)}(h*``fast`` successful fast path allocations h](jy)}(h``fast``h]j)}(hjK$h]hfast}(hjM$hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjI$ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKchjE$ubj)}(hhh]h)}(h successful fast path allocationsh]h successful fast path allocations}(hjd$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`$hKchja$ubah}(h]h ]h"]h$]h&]uh1jhjE$ubeh}(h]h ]h"]h$]h&]uh1jrhj`$hKchjB$ubjs)}(h'``slow`` slow path order-0 allocations h](jy)}(h``slow``h]j)}(hj$h]hslow}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj$ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKdhj~$ubj)}(hhh]h)}(hslow path order-0 allocationsh]hslow path order-0 allocations}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKdhj$ubah}(h]h ]h"]h$]h&]uh1jhj~$ubeh}(h]h ]h"]h$]h&]uh1jrhj$hKdhjB$ubjs)}(h5``slow_high_order`` slow path high order allocations h](jy)}(h``slow_high_order``h]j)}(hj$h]hslow_high_order}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj$ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKehj$ubj)}(hhh]h)}(h slow path high order allocationsh]h slow path high order allocations}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKehj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jrhj$hKehjB$ubjs)}(hB``empty`` ptr ring is empty, so a slow path allocation was forced h](jy)}(h ``empty``h]j)}(hj$h]hempty}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj$ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKfhj$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 %hKfhj %ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jrhj %hKfhjB$ubjs)}(h?``refill`` an allocation which triggered a refill of the cache h](jy)}(h ``refill``h]j)}(hj/%h]hrefill}(hj1%hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj-%ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKghj)%ubj)}(hhh]h)}(h3an allocation which triggered a refill of the cacheh]h3an allocation which triggered a refill of the cache}(hjH%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD%hKghjE%ubah}(h]h ]h"]h$]h&]uh1jhj)%ubeh}(h]h ]h"]h$]h&]uh1jrhjD%hKghjB$ubjs)}(hc``waive`` pages obtained from the ptr ring that cannot be added to the cache due to a NUMA mismatchh](jy)}(h ``waive``h]j)}(hjh%h]hwaive}(hjj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjf%ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhhjb%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}%hKhhj~%ubah}(h]h ]h"]h$]h&]uh1jhjb%ubeh}(h]h ]h"]h$]h&]uh1jrhj}%hKhhjB$ubeh}(h]h ]h"]h$]h&]uh1jmhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhj1#hhhj#hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"page_pool_recycle_stats (C struct)c.page_pool_recycle_statshNtauh1jhj1#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.hhKoubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%hhhj%hKoubj`)}(hpage_pool_recycle_statsh]j)}(hj%h]hpage_pool_recycle_stats}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hj%hhhj%hKoubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj%hhhj%hKoubah}(h]j%ah ](j j!eh"]h$]h&]j%j&)j'huh1jhj%hKohj%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.hhKthj&hhubah}(h]h ]h"]h$]h&]uh1j(hj%hhhj%hKoubeh}(h]h ](j+structeh"]h$]h&]jIj+jJj&jKj&jLjMjNuh1jhhhj1#hj#hNubjP)}(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&]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.hhKxhj&ubjU)}(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; };}hj@&sbah}(h]h ]h"]h$]h&]hhuh1jThc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKzhj&ubh)}(h **Members**h]j)}(hjQ&h]hMembers}(hjS&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj&ubjn)}(hhh](js)}(h8``cached`` recycling placed page in the page pool cache h](jy)}(h ``cached``h]j)}(hjp&h]hcached}(hjr&hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjn&ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKvhjj&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&hKvhj&ubah}(h]h ]h"]h$]h&]uh1jhjj&ubeh}(h]h ]h"]h$]h&]uh1jrhj&hKvhjg&ubjs)}(h(``cache_full`` page pool cache was full h](jy)}(h``cache_full``h]j)}(hj&h]h cache_full}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj&ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKwhj&ubj)}(hhh]h)}(hpage pool cache was fullh]hpage pool cache was full}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKwhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jrhj&hKwhjg&ubjs)}(h'``ring`` page placed into the ptr ring h](jy)}(h``ring``h]j)}(hj&h]hring}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj&ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKxhj&ubj)}(hhh]h)}(hpage placed into the ptr ringh]hpage placed into the ptr ring}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKxhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jrhj&hKxhjg&ubjs)}(hI``ring_full`` page released from page pool because the ptr ring was full h](jy)}(h ``ring_full``h]j)}(hj'h]h ring_full}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj'ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKyhj'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}(hj4'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0'hKyhj1'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jrhj0'hKyhjg&ubjs)}(hG``released_refcnt`` page released (and not recycled) because refcnt > 1h](jy)}(h``released_refcnt``h]j)}(hjT'h]hreleased_refcnt}(hjV'hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hjR'ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKyhjN'ubj)}(hhh]h)}(h3page released (and not recycled) because refcnt > 1h]h3page released (and not recycled) because refcnt > 1}(hjm'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKzhjj'ubah}(h]h ]h"]h$]h&]uh1jhjN'ubeh}(h]h ]h"]h$]h&]uh1jrhji'hKyhjg&ubeh}(h]h ]h"]h$]h&]uh1jmhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhj1#hhhj#/hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jpage_pool_stats (C struct)c.page_pool_statshNtauh1jhj1#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'hKubj`)}(hpage_pool_statsh]j)}(hj'h]hpage_pool_stats}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj'ubah}(h]h ](jujveh"]h$]h&]hhuh1j_hj'hhhj'hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj'hhhj'hKubah}(h]j'ah ](j j!eh"]h$]h&]j%j&)j'huh1jhj'hKhj'hhubj))}(hhh]h)}(h!combined page pool use statisticsh]h!combined page pool use statistics}(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&]jIj+jJj(jKj(jLjMjNuh1jhhhj1#hj#hNubjP)}(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 (ubjU)}(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; };}hj-(sbah}(h]h ]h"]h$]h&]hhuh1jThc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhj (ubh)}(h **Members**h]j)}(hj>(h]hMembers}(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.hhKhj (ubjn)}(hhh](js)}(h1``alloc_stats`` see struct page_pool_alloc_stats h](jy)}(h``alloc_stats``h]j)}(hj](h]h alloc_stats}(hj_(hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj[(ubah}(h]h ]h"]h$]h&]uh1jxhc/var/lib/git/docbuild/linux/Documentation/networking/page_pool:119: ./include/net/page_pool/types.hhKhjW(ubj)}(hhh]h)}(h see struct page_pool_alloc_statsh]h see struct page_pool_alloc_stats}(hjv(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr(hKhjs(ubah}(h]h ]h"]h$]h&]uh1jhjW(ubeh}(h]h ]h"]h$]h&]uh1jrhjr(hKhjT(ubjs)}(h4``recycle_stats`` see struct page_pool_recycle_statsh](jy)}(h``recycle_stats``h]j)}(hj(h]h recycle_stats}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j~hj(ubah}(h]h ]h"]h$]h&]uh1jxhc/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&]uh1jrhj(hKhjT(ubeh}(h]h ]h"]h$]h&]uh1jmhj (ubeh}(h]h ] kernelindentah"]h$]h&]uh1jOhj1#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.hhKhj1#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.hhKhj1#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}(hj")hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhKubjU)}(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;}hj0)sbah}(h]h ]h"]h$]h&]hhjdjej+jg}uh1jThhhKhj)hhubeh}(h] registrationah ]h"] registrationah$]h&]uh1hhj)hhhhhKubh)}(hhh](h)}(h NAPI pollerh]h NAPI poller}(hjJ)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG)hhhhhKubjU)}(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); } }}hjX)sbah}(h]h ]h"]h$]h&]hhjdjej+jg}uh1jThhhKhjG)hhubeh}(h] napi-pollerah ]h"] napi pollerah$]h&]uh1hhj)hhhhhKubh)}(hhh](h)}(hStatsh]hStats}(hjr)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo)hhhhhKubjU)}(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&]hhjdjej+jg}uh1jThhhKhjo)hhubeh}(h]statsah ]h"]statsah$]h&]uh1hhj)hhhhhKubh)}(hhh](h)}(h Driver unloadh]h Driver unload}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhKubjU)}(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&]hhjdjej+jg}uh1jThhhKhj)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_sourceh _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)jnjkjjj )j)j.#j+#j)j)j)j)jD)jA)jl)ji)j)j)j)j)u nametypes}(j)jnjj )j.#j)j)jD)jl)j)j)uh}(j)hjkjCjjqj)jjjjjjjj= jB jD jI jUjZjjjljqjjjNjSjxj}jjjjj+#j!j)j1#j#j#j%j%j'j'j)j)jA)j)ji)jG)j)jo)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.