mlx5dv_modify_qp_udp_sport(3)

πŸ’– mlx5dv_modify_qp_udp_sport(3) β€” the girlies' guide πŸ’–

okay so bestie, this one lives in manual section 3, and the whole page is literally called mlx5dv_modify_qp_udp_sport. say it with me: mlx5-dv-modify-qp-udp-sport. iconic name, honestly. it's giving "i know exactly what i'm doing." πŸŽ€


🌸 NAME 🌸

mlx5dv_modify_qp_udp_sport β€” changes up the UDP source port on a QP you already have. that's the whole vibe check. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <infiniband/mlx5dv.h>

int mlx5dv_modify_qp_udp_sport(struct ibv_qp *qp, uint16_t udp_sport)

like, one include, one function, two arguments. we love a low-maintenance queen. πŸ’…


πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” the UDP source port is what creates entropy for network routers (that's ECMP btw), for load balancers, and for 802.3ad link aggregation switching. and like… those things are literally not aware of RoCE IB headers, so they need this port to spread traffic around properly. no cap. 🌈

this API lets you modify the configured UDP source port of a given RC/UC QP, but ✨only✨ when that QP is in RTS state. that's the condition, bestie, don't come at it any other way. πŸ™ˆ


πŸ’œ ARGUMENTS πŸ’œ

  • qp β€” the ibv_qp object you're issuing the action on. your main character, fr fr. 🫢
  • udp_sport β€” the UDP source port you wanna set for the QP. pick your number, bestie. πŸ”’

⭐ RETURN VALUE ⭐

returns 0 on success πŸŽ‰ β€” or the value of errno on failure, which is literally the universe telling you the failure reason. read it. learn from it. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Maor Gottlieb <maorg@nvidia.com> β€” thank you for this gift, we are obsessed. πŸ’–


lowkey reminder: RC/UC QP, RTS state, uint16_t port. get those three right and you're golden. 🧚

and that's a wrap on mlx5dv_modify_qp_udp_sport(3) from the mlx5dv manual, section 3, brought to you with love β€” periodt. πŸ“πŸ’…πŸŒΈ

πŸ“¦ where this page comes from