update_num_rd_atomic(9)
π update_num_rd_atomic(9) π
Okay bestie, welcome to the Kernel API Manual β this one's a little hfi1 deep-dive and honestly it's giving "small function, big responsibilities". Let's get into it π«Ά
β¨ NAME β¨
update_num_rd_atomic β the function whose whole entire job is to update the qp->s_num_rd_atomic. That's it. That's the gig. Iconic, honestly π
π¦ SYNOPSIS π¦
void update_num_rd_atomic (struct rvt_qp *qp , u32 psn , struct rvt_swqe
*wqe );
Three args, returns nothing (void), no cap. Copy it exactly like that, don't get creative π
π ARGUMENTS π
qpβ the QP, obvs. The main character of this whole situation.psnβ the packet sequence number to restart at. Yes, restart. We're picking up where we left off β¨wqeβ the wqe. That's the wqe. It's right there. Love that for us π
πΈ DESCRIPTION πΈ
So here's the tea: this function gets called from reset_psn, and its whole purpose in life is to update qp->s_num_rd_atomic for the current wqe. That's the assignment. That's what we're doing here π₯
β οΈ Important vibe check: this one is called at interrupt level with the QP s_lock held. So like... be normal about it. Don't go doing anything spicy in there. The lock is literally being held, bestie π
π SEE ALSO π
If you're going down the rabbit hole (and you know you are, iykyk), the kernel file to look at is ./drivers/infiniband/hw/hfi1/rc.c, plus all these besties:
make_rc_ack(9)hfi1_make_rc_req(9)reset_psn(9)hfi1_rc_verbs_aborted(9)update_qp_retry_state(9)rc_rcv_resp(9)rc_rcv_error(9)hfi1_rc_rcv(9)
π and that's the whole page, bestie π
Cute lil sign-off: this one lives over in ./drivers/infiniband/hw/hfi1, dated October 2026 β same energy as ever, update_num_rd_atomic(9), we love her, 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