irdma_get_wqe_shift(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

irdma_get_wqe_shift β€” get shift count for maximum wqe size. This is the irdma_get_wqe_shift(9) page from the Kernel API Manual, and it's giving tiny function with main character energy ✨

✨ SYNOPSIS ✨

void irdma_get_wqe_shift (struct irdma_uk_attrs *uk_attrs , u32 sge ,
u32 inline_data , u8 *shift );

πŸŽ€ ARGUMENTS πŸŽ€

  • uk_attrs β€” qp HW attributes πŸ‘‘
  • sge β€” Maximum Scatter Gather Elements wqe
  • inline_data β€” Maximum inline data size
  • shift β€” Returns the shift needed based on sge

πŸ’… DESCRIPTION πŸ’…

okay so shift can be used to left shift the wqe size based on number of SGEs and inline data size. That's the whole plot, no cap. The mapping is literally this, iykyk:

  • For 1 SGE or inline data <= 8, shift = 0 (wqe size of 32 bytes) πŸ’–
  • For 2 or 3 SGEs or inline data <= 39, shift = 1 (wqe size of 64 bytes) ✨
  • For 4-7 SGE's and inline <= 101 Shift of 2 otherwise (wqe size of 256 bytes) πŸ‘€

the way that this little mapping ate, honestly. Shift math is highkey the main character here and lowkey it slays 🫢 not me getting emotional over 32 bytes fr fr

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/infiniband/hw/irdma/uk.c is the source bestie, and these are all the SEE ALSO refs β€” vibe check: every single one is here, no cap, iconic behavior, I'm obsessed ngl:


and that's the page, bestie 🫢 source/version moment: it lives at ./drivers/infiniband/hw/irdma, dated October 2026, and it's page irdma_get_wqe_shift(9). mwah πŸ’‹ periodt

πŸ“¦ where this page comes from