mlx5dv_map_ah_to_qp(3)

πŸ’… mlx5dv_map_ah_to_qp(3) πŸ’…

okay so bestie, welcome to section 3 of the manual β€” mlx5dv_map_ah_to_qp, the little function that makes your address handle and your QP get along. genuinely iconic behavior, no cap.


✨ NAME ✨

mlx5dv_map_ah_to_qp β€” maps the destination path information that lives in an address handle (AH) over to the info we pull out of the qp. it's giving matchmaker energy fr fr πŸŽ€


🌸 SYNOPSIS 🌸

#include <infiniband/mlx5dv.h>

int mlx5dv_map_ah_to_qp(struct ibv_ah *ah, uint32_t qp_num);

look at her. two arguments. immaculate. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this API actually do? it maps the destination path information sitting in the address handle (ah) to the information that gets extracted from the qp β€” think congestion control coming from ECE, iykyk. πŸ’«

this API is literally an enhancement to DC and UD QPs, and the whole point is better performance: it lets you use per-address congestion control (CC) algorithms, which means DC/UD QPs can run multiple CC algorithms inside the same datacenter. main character energy for your fabric, honestly. πŸ”₯

the mapping this API creates is implicitly destroyed when the address handle is destroyed, bestie. that's just how it goes.

and listen β€” it is not affected by the destruction of QP qp_num. so go ahead and yeet that QP, the mapping stays put. πŸ’€

a duplicate mapping to the same address handle? ignored. because in that case this API is just a hint for the hardware, so it would do nothing and return success regardless of the new qp_num ECE. yes, regardless β€” that part matters. πŸ™ˆ

one more thing, and this is the part people miss: the function must be called after ECE negotiation/preconfiguration was done by some external means. don't skip that step, queen. πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • ah β€” the target's address handle. the destination-vibe holder. πŸ“
  • qp_num β€” the initiator QP whose congestion control info gets extracted from its ECE. this is where the CC tea comes from. πŸ“

⭐ RETURN VALUE ⭐

  • upon success β†’ returns 0 ✨ slay
  • upon failure β†’ the value of errno is returned 😭

🌈 SEE ALSO 🌈

go read those too, they're all part of the same friend group, fr fr. 🧚


πŸ‘‘ AUTHOR πŸ‘‘

  • Yochai Cohen <yochai@nvidia.com>
  • Patrisious Haddad <phaddad@nvidia.com>

two legends. we stan. πŸ’œ


and that's the whole page!! the header up top says mlx5dv_map_ah_to_qp(3) and the footer at the bottom just repeats mlx5dv_map_ah_to_qp(3) with no fancy source/version or date info attached β€” so like, no extra lore there, sorry bestie πŸŽ€ mwah, go map some AHs to some QPs, periodt. πŸ’…

πŸ“¦ where this page comes from