---
name: "mlx5dv_modify_qp_lag_port"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mlx5dv_modify_qp_lag_port"
---

# mlx5dv\_modify\_qp\_lag\_port(3)

Modify the lag port information of a given QP

## NAME

mlx5dv\_modify\_qp\_lag\_port - Modify the lag port information of a given QP

## SYNOPSIS

-

  ```
  #include <infiniband/mlx5dv.h>
  int mlx5dv_modify_qp_lag_port(struct ibv_qp *qp, uint8_t port_num);
  ```

## DESCRIPTION

This API enables modifying the configured port num of a given QP.

If the QP state is modified later, the port num may be implicitly re-configured.

Use query mlx5dv\_query\_qp\_lag\_port to check the configured and active port num values.

## ARGUMENTS

- *qp*

  The ibv\_qp object to issue the action on.

- *port\_num*

  The port\_num to set for the QP.

## RETURN VALUE

0 on success; EOPNOTSUPP if not in LAG mode, or other errno value on other failures.

## SEE ALSO

*[mlx5dv\_query\_qp\_lag\_port(3)](/mlx5dv_query_qp_lag_port/3.md)*

## AUTHOR

Aharon Landau ⟨aharonl@mellanox.com⟩\\c
