srpt_mad_recv_handler(9)
π srpt_mad_recv_handler(9) β the MAD reception callback π
okay so bestie, welcome to the Kernel API Manual entry for srpt_mad_recv_handler β yes it's a (9) page, yes it's kernel-internals territory, and yes you're gonna slay it. this is the callback that fires when a MAD shows up. that's it, that's the vibe β¨
πΈ NAME πΈ
srpt_mad_recv_handler β the MAD reception callback function, aka the little function that gets pinged when someone slides a MAD into your inbox π
π¦ SYNOPSIS π¦
void srpt_mad_recv_handler (struct ib_mad_agent *mad_agent , struct
ib_mad_send_buf *send_buf , struct ib_mad_recv_wc *mad_wc );
so it returns void (no receipts, no return value, she just does the thing) and it takes three args. three! a whole trio. let's meet them π
π ARGUMENTS π
mad_agentβ this is the return value ofib_register_mad_agent. yes, literally the thing that function handed back to you. hand it right back here, that's the whole gig π«Άsend_bufβ not used. that's it. not used. she's invited to the party but she's not dancing πmad_wcβ the work completion reporting that a MAD has been received. this is the actual "omg something arrived" notification, the main character of the parameter list π
β¨ SEE ALSO β¨
bestie there are like a MILLION siblings here and we're listing every single one because no one gets left behind π
- Kernel file:
./drivers/infiniband/ulp/srpt/ib_srpt.c 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_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)
ngl that's a whole friend group and you should absolutely go say hi to all of them. iykyk π
π signing off π
this page lives with the good people at ./drivers/infiniband/ulp/srpt, and it was stamped October 2026 β so yeah, future-dated and thriving β periodt. go forth, receive your MADs, and remember: send_buf is not used ππ
π¦ 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