program_rcvarray(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… program_rcvarray β€” like, the whole vibe

okay so bestie, welcome to the program_rcvarray(9) page from the Kernel API Manual 🌸 this one's about programming an RcvArray group with receive buffers, and honestly? it's giving low-level realness. stay with me, it's not scary, i promise 🫢


✨ NAME ✨

program_rcvarray β€” program an RcvArray group with receive buffers πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int program_rcvarray (struct hfi1_filedata *fd , struct tid_user_buf
*tbuf , struct tid_group *grp , u16 count , u32 *tidlist , unsigned int
*tididx , unsigned int *pmapped );

like yes, that's a lot of parameters, no cap, but each one has main character energy in its own way β€” scroll down for the whole breakdown πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fd β€” filedata pointer. literally just the filedata pointer, that's her whole job πŸ’…
  • tbuf β€” pointer to struct tid_user_buf that has the user buffer starting virtual address, buffer length, page pointers, pagesets (array of struct tid_pageset holding information on physically contiguous chunks from the user buffer), and other fields. okay so she's the whole package β€” start vaddr, length, page pointers, pagesets, plus other fields. an icon carrying a lot of luggage 🧳
  • grp β€” RcvArray group. the group in question, periodt ✨
  • count β€” number of struct tid_pageset's to program. yes, that many. πŸ“
  • tidlist β€” the array of u32 elements when the information about the programmed RcvArray entries is to be encoded. it's where the encoded info about the programmed RcvArray entries goes when that's the plan πŸŽ€
  • tididx β€” starting offset into tidlist. where in tidlist we start, bestie πŸ“
  • pmapped β€” (output parameter) number of pages programmed into the RcvArray entries. output parameter!! so she writes back to you, she's not just taking πŸ˜­πŸ’–

🌈 DESCRIPTION 🌈

okay so this function will program up to count number of RcvArray entries from the group grp ✨

and here's the cute part β€” to make best use of write-combining writes, the function will perform writes to the unused RcvArray entries, which will be ignored by the HW 🧚 so yes, it's writing to places that don't care, and that's on purpose, and that's iconic.

each RcvArray entry will be programmed with a physically contiguous buffer chunk from the user's virtual buffer πŸ’œ so every entry gets a chunk that's physically contiguous, pulled out of the user's virtual buffer. slay.


πŸ”₯ RETURN πŸ”₯

  • -EINVAL if the requested count is larger than the size of the group πŸ™ˆ (like, too much, bestie, the group can't hold all that)
  • -ENOMEM or -EFAULT on error from set_rcvarray_entry πŸ’€
  • or the number of RcvArray entries programmed ⭐ (that's the happy path, and it ate)

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/infiniband/hw/hfi1/user_exp_rcv.c β€” like, go read the source, iykyk πŸ¦‹


and that's the page!! πŸ’– big thankies for reading, hope the vibe check passed 🌸

source/version: ./drivers/infiniband/hw/hfi1 Β· date: October 2026 β€” mwah, catch you in the next manpage bestie πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from