OSDN Git Service

RDMA/rtrs: Check device max_qp_wr limit when create QP
authorJack Wang <jinpu.wang@ionos.com>
Mon, 14 Jun 2021 09:03:37 +0000 (11:03 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 18 Jun 2021 16:47:13 +0000 (13:47 -0300)
commita95fbe2abafdad800cc9a1ee6a08501c6835c8ba
tree6fb05ac9ef19b655bd7d92d40f6f204e77f9b136
parent354462eb7f528dadd68e8a0e7e6d69794b801f95
RDMA/rtrs: Check device max_qp_wr limit when create QP

Currently we only check device max_qp_wr limit for IO connection, but not
for service connection. We should check for both.

So save the max_qp_wr device limit in wr_limit, and use it for both IO
connections and service connections.

While at it, also remove an outdated comments.

Link: https://lore.kernel.org/r/20210614090337.29557-6-jinpu.wang@ionos.com
Suggested-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/infiniband/ulp/rtrs/rtrs-srv.c