mlx5dv_query_qp_lag_port(3)
π mlx5dv_query_qp_lag_port β the tea on your QP's LAG port β¨
Okay bestie, this one's a mlx5dv man page (yes, the mlx5 girlies stay winning π), and it's literally about asking a QP which port it's vibing on in a LAG setup. Let's get into it π¦
πΈ SYNOPSIS πΈ
#include <infiniband/mlx5dv.h>
int mlx5dv_query_qp_lag_port(struct ibv_qp *qp, uint8_t *port_num,
uint8_t *active_port_num);
Iconic signature, no notes π
π DESCRIPTION π
So this API returns the configured port num and the active port num of a given QP on mlx5 devices. Two ports, two answers, one function call β it's giving efficiency π
The active port num is the one that tells you which port the QP actually sends traffic out on in a LAG configuration. Like, the configured one is what you said, and the active one is what it's actually doing. Main character energy vs. what the group chat thinks you're doing π
And quick vibe check: if the num_lag_ports field of struct mlx5dv_context is greater than 1, that means LAG is supported on this device. No cap π₯
β¨ ARGUMENTS β¨
qpβ theibv_qpobject you're issuing the action on. The QP in question, the subject of the whole investigation π΅οΈββοΈport_numβ the configured port num of the QP. What it's supposed to be, bestie πactive_port_numβ the current port num of the QP, which may differ from the configured value because of the bonding status. Yeah, things change, it's a whole situation π
π₯ RETURN VALUE π₯
0on success β we love a clean win πEOPNOTSUPPif you're not in LAG mode β no LAG, no info, sorry bestie π- or any other
errnovalue on other failures β the usual suspects π
π¦ SEE ALSO π¦
mlx5dv_modify_qp_lag_port(3)β the sibling function, the one that actually changes stuff. Go read that one too, iykyk β¨
π AUTHOR π
Aharon Landau <aharonl@mellanox.com> β thank you for your service, king π«Ά
ngl this page is short and sweet, but LAG configs are where the drama lives. If active_port_num surprises you, blame the bonding status, not me π
Okay that's the whole page, bestie β go forth and query those ports π
πβ¨ xoxo, your local mlx5 unix girlie β¨π
sign-off tea: this page comes from the mlx5dv_query_qp_lag_port(3) manual (source/version as shipped, dated as in the original header/footer) β periodt, that's the lore ππΈ
π¦ 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