diff options
| author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2026-02-02 19:04:12 +0530 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-02-02 08:37:59 -0500 |
| commit | cae42d97d94e9c9803554ca6d577297a2270d471 (patch) | |
| tree | 197489d1a9e7feeaec93c3b9e62eb8544e433445 | |
| parent | 949e7c062d3769d9522e8a4abe080fb92ddd61bf (diff) | |
RDMA/mlx5: Support rate limit only for Raw Packet QP
mlx5 based hardware supports rate limiting only on Raw ethernet QPs.
Added an explicit check to fail the operation on any other QP types.
The rate limit support has been enahanced in the stack for RC QPs too.
Compile tested only.
CC: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/20260202133413.3182578-5-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
| -rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 69af20790481..0324909e3151 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -4362,6 +4362,11 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, optpar |= ib_mask_to_mlx5_opt(attr_mask); optpar &= opt_mask[mlx5_cur][mlx5_new][mlx5_st]; + if (attr_mask & IB_QP_RATE_LIMIT && qp->type != IB_QPT_RAW_PACKET) { + err = -EOPNOTSUPP; + goto out; + } + if (qp->type == IB_QPT_RAW_PACKET || qp->flags & IB_QP_CREATE_SOURCE_QPN) { struct mlx5_modify_raw_qp_param raw_qp_param = {}; |
