hfi1_process_mad(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 packet
  • in_grh β€” the global route header for this packet
  • in_mad β€” the incoming MAD πŸ“¨
  • out_mad β€” any outgoing MAD reply πŸ’Œ
  • out_mad_size β€” size of the outgoing MAD reply
  • out_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