irdma_get_wqe_shift(9)
πΈ 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 wqeinline_dataβ Maximum inline data sizeshiftβ Returns the shift needed based onsge
π 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:
irdma_set_fragment(9)irdma_set_fragment_gen_1(9)irdma_nop_1(9)irdma_clr_wqes(9)irdma_uk_qp_post_wr(9)irdma_qp_get_next_send_wqe(9)irdma_qp_get_next_recv_wqe(9)irdma_uk_rdma_write(9)irdma_uk_atomic_fetch_add(9)irdma_uk_atomic_compare_swap(9)irdma_uk_srq_post_receive(9)irdma_uk_rdma_read(9)irdma_uk_send(9)irdma_set_mw_bind_wqe_gen_1(9)irdma_copy_inline_data_gen_1(9)irdma_inline_data_size_to_quanta_gen_1(9)irdma_set_mw_bind_wqe(9)irdma_copy_inline_data(9)irdma_inline_data_size_to_quanta(9)irdma_uk_inline_rdma_write(9)irdma_uk_inline_send(9)irdma_uk_stag_local_invalidate(9)irdma_uk_post_receive(9)irdma_uk_cq_resize(9)irdma_uk_cq_set_resized_cnt(9)irdma_uk_cq_request_notification(9)irdma_uk_cq_empty(9)irdma_uk_cq_poll_cmpl(9)irdma_round_up_wq(9)irdma_setup_connection_wqes(9)irdma_uk_srq_init(9)irdma_uk_calc_shift_wq(9)irdma_uk_calc_depth_shift_sq(9)irdma_uk_calc_depth_shift_rq(9)irdma_uk_qp_init(9)irdma_uk_cq_init(9)irdma_uk_clean_cq(9)irdma_nop(9)irdma_fragcnt_to_quanta_sq(9)irdma_fragcnt_to_wqesize_rq(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms