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 β€” the ibv_qp object 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 πŸ”₯

  • 0 on success β€” we love a clean win πŸ’–
  • EOPNOTSUPP if you're not in LAG mode β€” no LAG, no info, sorry bestie πŸ’€
  • or any other errno value on other failures β€” the usual suspects 😭

πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ 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