srpt_build_cmd_rsp(9)
π
srpt_build_cmd_rsp β like, the kernel API manual, but make it make sense
okay so bestie, welcome to the srpt_build_cmd_rsp(9) page β this is a kernel API function, section 9, and it's the one that literally builds you an SRP_RSP response π
β¨ NAME β¨
srpt_build_cmd_rsp β build a SRP_RSP response. that's it, that's the whole job, and it does it flawlessly π
πΈ SYNOPSIS πΈ
int srpt_build_cmd_rsp (struct srpt_rdma_ch *ch , struct srpt_send_ioctx
*ioctx , u64 tag , int status );
it returns an int, it takes four things, and none of them are optional, so gather them all before you call, mwah π
π¦ ARGUMENTS π¦
chβ the RDMA channel that the request came in through. like, the exact doorway the request walked through, and yes you need it π«ioctxβ the I/O context tied to theSRP_CMDrequest. lowkey important: the response gets built in the buffer thatioctx->bufpoints at, which means this function will straight up overwrite your request data. not a drill, the request data is gone after this π«Άtagβ the tag of the request you're generating this response for. match it up correctly or it's giving chaos π―statusβ the value that goes into theSTATUSfield of theSRP_RSPinformation unit. yes, exactly that field, capital letters and all π
π DESCRIPTION π
so what does it actually do? it returns the size in bytes of the SRP_RSP response it built. that's the return value, bestie β bytes, not vibes π
an SRP_RSP response carries a SCSI status or service response, and if you want the full format tea you gotta read section 6.9 in the SRP r16a document β that's where the whole layout of an SRP_RSP response lives πβ¨
also, for more info about sense data, go look at SPC-2. iconic reference, no cap π
π SEE ALSO π
the kernel file is right here, bestie: ./drivers/infiniband/ulp/srpt/ib_srpt.c
and here's the whole friend group, everybody say hi π:
srpt_event_handler(9),srpt_srq_event(9),srpt_qp_event(9),srpt_set_ioc(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_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!! π«Ά this little icon lives under ./drivers/infiniband/ulp/srpt and it's dated October 2026, so yeah, fresh off the press fr fr. go build those responses, bestie, you're gonna slay πβ¨
π¦ 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