irdma_add_pd_table_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… irdma_add_pd_table_entry β€” the manual, but make it cute

okay so bestie, welcome to the irdma_add_pd_table_entry(9) page from the Kernel API Manual ✨ this is the whole vibe, let's get into it 🫢


🌸 NAME 🌸

irdma_add_pd_table_entry β€” literally adds a page descriptor to the specified table πŸ’… no cap, that's the whole job.


✨ SYNOPSIS ✨

int irdma_add_pd_table_entry (struct irdma_sc_dev *dev , struct
irdma_hmc_info *hmc_info , u32 pd_index , struct irdma_dma_mem *rsrc_pg
);

like, that's the signature, copy it exactly pls, don't be weird about it πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” pointer to our device structure, the main character fr πŸ‘‘
  • hmc_info β€” pointer to the HMC configuration information structure, it's giving lore ✨
  • pd_index β€” which page descriptor index to manipulate, i.e. which one you're messing with 🎯
  • rsrc_pg β€” if it's not NULL, use the preallocated page instead of allocating a new one. reuse slay πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so here's what this function actually does, step by step, no skipping 🧚

  1. Initializes the pd entry
  2. Adds pd_entry in the pd_table
  3. Mark the entry valid in irdma_hmc_pd_entry structure
  4. Initializes the pd_entry's ref count to 1 ← yes, that's attached to step 4, that's just how it's written, periodt

assumptions: (read these, they're lowkey important πŸ‘€)

  1. The memory for pd should be pinned down, physically contiguous and aligned on 4K boundary and zeroed memory. all of that. every word πŸ’€
  2. It should be 4K in size.
bestie I'm serious, if the memory isn't pinned, contiguous, 4K-aligned, zeroed AND 4K in size, that's on you, not on the function πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/infiniband/hw/irdma/hmc.c β€” that's where the actual source lives, iykyk πŸ“

and the whole friend group of related pages, all of them, in order, here we go:


πŸ’– cute little sign-off: this page came from ./drivers/infiniband/hw/irdma, dated October 2026, and it's filed under irdma_add_pd_table_entry(9). that's the whole footer, bestie, mwah πŸŽ€βœ¨
πŸ“¦ where this page comes from