* [PATCH rdma-rc] RDMA/mlx5: Set user priority for DCT
@ 2021-10-06 9:31 Leon Romanovsky
2021-10-06 19:41 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2021-10-06 9:31 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Patrisious Haddad, linux-kernel, linux-rdma, Maor Gottlieb,
Moni Shoua, Yishai Hadas
From: Patrisious Haddad <phaddad@nvidia.com>
Currently, the driver doesn't set the PCP-based priority for DCT,
hence DCT response packets are transmitted without user priority.
Fix it by setting user provided priority in the eth_prio field
in the DCT context, which in turn sets the value in the transmitted packet.
Fixes: 776a3906b692 ("IB/mlx5: Add support for DC target QP")
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/qp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index b2fca110346c..e5abbcfc1d57 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -4458,6 +4458,8 @@ static int mlx5_ib_modify_dct(struct ib_qp *ibqp, struct ib_qp_attr *attr,
MLX5_SET(dctc, dctc, mtu, attr->path_mtu);
MLX5_SET(dctc, dctc, my_addr_index, attr->ah_attr.grh.sgid_index);
MLX5_SET(dctc, dctc, hop_limit, attr->ah_attr.grh.hop_limit);
+ if (attr->ah_attr.type == RDMA_AH_ATTR_TYPE_ROCE)
+ MLX5_SET(dctc, dctc, eth_prio, attr->ah_attr.sl & 0x7);
err = mlx5_core_create_dct(dev, &qp->dct.mdct, qp->dct.in,
MLX5_ST_SZ_BYTES(create_dct_in), out,
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH rdma-rc] RDMA/mlx5: Set user priority for DCT
2021-10-06 9:31 [PATCH rdma-rc] RDMA/mlx5: Set user priority for DCT Leon Romanovsky
@ 2021-10-06 19:41 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-10-06 19:41 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, Patrisious Haddad, linux-kernel, linux-rdma,
Maor Gottlieb, Moni Shoua, Yishai Hadas
On Wed, Oct 06, 2021 at 12:31:53PM +0300, Leon Romanovsky wrote:
> From: Patrisious Haddad <phaddad@nvidia.com>
>
> Currently, the driver doesn't set the PCP-based priority for DCT,
> hence DCT response packets are transmitted without user priority.
>
> Fix it by setting user provided priority in the eth_prio field
> in the DCT context, which in turn sets the value in the transmitted packet.
>
> Fixes: 776a3906b692 ("IB/mlx5: Add support for DC target QP")
> Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
> Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> drivers/infiniband/hw/mlx5/qp.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied to for-rc, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-06 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 9:31 [PATCH rdma-rc] RDMA/mlx5: Set user priority for DCT Leon Romanovsky
2021-10-06 19:41 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).