OSDN Git Service

RDMA/restrack: Support all QP types
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 17 Nov 2020 07:01:48 +0000 (09:01 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Nov 2020 15:38:46 +0000 (11:38 -0400)
commit66f57b871efc576dfe8117b65af4e805e03ea689
tree3ce474e835d5839377360844eaca24f02dc06225
parent2b1f747071c5ce5ad571d80c1541b732cf07f9c1
RDMA/restrack: Support all QP types

The latest changes in restrack name handling allowed to simplify the QP
creation code to support all types of QPs.

For example XRC QP are presented with rdmatool.

$ ibv_xsrq_pingpong &
$ rdma res show qp
link ibp0s9/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core]
link ibp0s9/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link ibp0s9/1 lqpn 7 type UD state RTS sq-psn 0 comm [mlx5_ib]
link ibp0s9/1 lqpn 42 type XRC_TGT state INIT sq-psn 0 path-mig-state MIGRATED comm [ib_uverbs]
link ibp0s9/1 lqpn 43 type XRC_INI state INIT sq-psn 0 path-mig-state MIGRATED pdn 197 pid 419 comm ibv_xsrq_pingpong

Link: https://lore.kernel.org/r/20201117070148.1974114-4-leon@kernel.org
Reviewed-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_std_types_qp.c
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h