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β theibv_qpobject 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
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms