srpt_set_ioc(9)
πΈ srpt_set_ioc β the Kernel API Manual moment π
ok so this is a page from the Kernel API Manual (section 9, kernel-space vibes only, no userland shenanigans) and it's about srpt_set_ioc, which honestly does one tiny adorable thing and we're gonna love it for that π
β¨ NAME β¨
srpt_set_ioc β initialize a IOUnitInfo structure π«Ά
β¨ SYNOPSIS β¨
void srpt_set_ioc (u8 *c_list , u32 slot , u8 value );
that's it. that's the whole signature. void return, three args, no drama, no cap π
β¨ ARGUMENTS β¨
c_listβ the controller list. bestie this is the array we're poking at, okay, be nice to it πΈslotβ a slot number, and heads up: it's one-based, so slot1is the first one, not slot0. yes really. i know. it's giving "indexing but make it off-by-one on purpose" πvalueβ a four-bit value. four. bits. tiny little guy. only the lowest four bits of it even matter, which likeβ¦ iconic honestly β
β¨ DESCRIPTION β¨
okay so here's the whole plot: it copies the lowest four bits of value into element slot of that array of four-bit elements called c_list (the controller list, iykyk π).
and the index slot is one-based β genuinely cannot stress this enough, it's the whole personality of the function π₯
so like. it's a setter. it sets. it puts four little bits where they belong and it goes home. main character energy, zero notes π
warning-ish reminder bestie: slot is one-based, so if you rock up with a zero you are not in the array anymore and that's a whole different conversation π
β¨ SEE ALSO β¨
the kernel file lives at ./drivers/infiniband/ulp/srpt/ib_srpt.c and there is. a LOT. of family. we're listing every single one because nobody gets left behind π«Ά
srpt_event_handler(9)srpt_srq_event(9)srpt_qp_event(9)srpt_get_class_port_info(9)srpt_get_iou(9)srpt_get_ioc(9)srpt_get_svc_entries(9)srpt_mgmt_method_get(9)srpt_mad_send_handler(9)srpt_mad_recv_handler(9)srpt_refresh_port(9)srpt_unregister_mad_agent(9)srpt_alloc_ioctx(9)srpt_free_ioctx(9)srpt_alloc_ioctx_ring(9)srpt_free_ioctx_ring(9)srpt_set_cmd_state(9)srpt_test_and_set_cmd_state(9)srpt_post_recv(9)srpt_zerolength_write(9)srpt_get_desc_tbl(9)srpt_init_ch_qp(9)srpt_ch_qp_rtr(9)srpt_ch_qp_rts(9)srpt_ch_qp_err(9)srpt_get_send_ioctx(9)srpt_abort_cmd(9)srpt_rdma_read_done(9)srpt_build_cmd_rsp(9)srpt_build_tskmgmt_rsp(9)srpt_handle_cmd(9)srpt_handle_tsk_mgmt(9)srpt_handle_new_iu(9)srpt_send_done(9)srpt_create_ch_ib(9)srpt_close_ch(9)srpt_cm_req_recv(9)srpt_cm_rtu_recv(9)srpt_cm_handler(9)srpt_queue_response(9)srpt_release_sport(9)srpt_lookup_port(9)srpt_add_one(9)srpt_remove_one(9)srpt_close_session(9)srpt_parse_i_port_id(9)srpt_make_tpg(9)srpt_drop_tpg(9)srpt_make_tport(9)srpt_drop_tport(9)srpt_init_module(9)
and that's the page!! π¦ go set some four-bit values in your one-based slots, you absolute legend π
this little love letter came from ./drivers/infiniband/ulp/srpt and it's dated October 2026 β see you in the future bestie, mwah ππ
π¦ 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