STRUCT PAGE_POOL_PARAMS(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… struct page_pool_params(9)

okay bestie, welcome to the Kernel API Manual โ€” yes we're reading kernel headers for fun now, this is who we are ๐ŸŽ€


โœจ NAME โœจ

struct page_pool_params โ€” literally the parameters for a page pool, that's the whole vibe ๐Ÿ’–


๐ŸŒธ SYNOPSIS ๐ŸŒธ

struct page_pool_params {
    struct {
      unsigned int    order;
      unsigned int    pool_size;
      int nid;
      struct device   *dev;
      struct napi_struct *napi;
      enum dma_data_direction dma_dir;
      unsigned int    max_len;
      unsigned int    offset;
    };
    struct {
      struct net_device *netdev;
      unsigned int queue_idx;
      unsigned int    flags;
    };
 };

๐Ÿ’… Members ๐Ÿ’…

Look at these anonymous structs, they're giving mystery โœจ

  • {unnamed_struct} โ€” anonymous ๐Ÿซถ (yes. that's it. that's the description. we love a no-notes king)
  • order โ€” it's 2^order pages on allocation, so like, do the math babe ๐Ÿงฎ
  • pool_size โ€” the size of the ptr_ring โญ•
  • nid โ€” the NUMA node id we're allocating pages from ๐Ÿ“
  • dev โ€” the device, and it's here for DMA pre-mapping purposes ๐Ÿ—บ๏ธ
  • napi โ€” the NAPI that is the sole consumer of pages โ€” otherwise NULL, main character only, no sharing ๐Ÿ”ฅ
  • dma_dir โ€” DMA mapping direction โžก๏ธ
  • max_len โ€” max DMA sync memory size, for PP_FLAG_DMA_SYNC_DEV ๐Ÿ“
  • offset โ€” DMA sync address offset, for PP_FLAG_DMA_SYNC_DEV ๐ŸŽฏ
  • {unnamed_struct} โ€” anonymous, again ๐Ÿ’€ (iconic behaviour honestly)
  • netdev โ€” the netdev this pool is gonna serve (leave it as NULL if there's none, or if there's multiple โ€” yes really ๐Ÿ‘€)
  • queue_idx โ€” the queue idx this page_pool is being created for ๐ŸŽŸ๏ธ
  • flags โ€” it's one of PP_FLAG_DMA_MAP, PP_FLAG_DMA_SYNC_DEV, PP_FLAG_SYSTEM_POOL, PP_FLAG_ALLOW_UNREADABLE_NETMEM ๐Ÿšฉ

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

  • Kernel file ./include/net/page_pool/types.h struct
  • page_pool_alloc_stats(9), struct page_pool_recycle_stats(9), struct page_pool_stats(9) โ€” go read the stats ones too bestie, iykyk ๐Ÿ“š

no cap, every single field up there matters โ€” napi being the sole consumer is not a suggestion, and netdev really does want NULL when there's none or multiple, so don't get cute ๐Ÿ™ˆ

okay that's the whole page, you ate that ๐Ÿ“๐Ÿ’œ

โ€” from <pink>./include/net/page_pool</pink>, dated October 2026, with love, mwah ๐Ÿ’‹โœจ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from