hfi1_process_mad(9)
π« NAME π«
Welcome to the Kernel API Manual, bestie! This page is all about hfi1_process_mad β which processes an incoming MAD packet β¨
π SYNOPSIS π
int hfi1_process_mad (struct ib_device *ibdev , int mad_flags , u32 port
, const struct ib_wc *in_wc , const struct ib_grh *in_grh , const struct
ib_mad *in_mad , struct ib_mad *out_mad , size_t *out_mad_size , u16
*out_mad_pkey_index );
πΈ ARGUMENTS πΈ
Okay bestie, gather round, here's every single parameter with zero skips:
ibdevβ the infiniband device this packet came in on π»mad_flagsβ MAD flags (literally just the flags, no extra lore)portβ the port number this packet came in on πin_wcβ the work completion entry for this packetin_grhβ the global route header for this packetin_madβ the incoming MAD π¨out_madβ any outgoing MAD reply πout_mad_sizeβ size of the outgoing MAD replyout_mad_pkey_indexβ used to apss back the packet key index (yes, "apss" β that's exactly how it's spelled in the original, so I'm keeping it! π )
π¦ DESCRIPTION π¦
Here's the tea: this function returns IB_MAD_RESULT_SUCCESS if this is a MAD that we are not interested in processing. Like, if it's not our vibe, we just say success and move on. β¨
Also important, bestie: the verbs framework has already done the MAD sanity checks, and hop count/pointer updating for IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE MADs. So that's already handled β no need to worry about it, fr fr. π«Ά
This is called by the ib_mad module. Main character energy right there. π
π SEE ALSO π
Kernel file ./drivers/infiniband/hw/hfi1/mad.c plus these iconic functions: get_pkeys(9), set_pkeys(9), tx_link_width(9), get_xmit_wait_counters(9), hfi1_pkey_validation_pma(9) π₯
Okay that's the whole page! It's from ./drivers/infiniband/hw/hfi1 and dated October 2026. Stay slaying, bestie! πβ¨
π¦ 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