]> git.proxmox.com Git - mirror_iproute2.git/commit
rdma: Relax requirement to have PID for HW objects
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 2 Oct 2019 13:49:34 +0000 (16:49 +0300)
committerDavid Ahern <dsahern@kernel.org>
Mon, 7 Oct 2019 21:54:30 +0000 (21:54 +0000)
commitf93134841ea8a75fde92615c0c223afc99396ff1
tree7ada753a7deefc608622772a6063037aeca2acd0
parent9dcd8788fe6bcee4b8def319c51578b469686fd6
rdma: Relax requirement to have PID for HW objects

RDMA has weak connection between PIDs and HW objects, because
the latter tied to file descriptors for their lifetime management.

The outcome of such connection is that for the following scenario,
the returned PID will be 0 (not-valid):
 1. Create FD and context
 2. Share it with ephemeral child
 3. Create any object and exit that child

This flow was revealed in testing environment and of course real users
are not running such scenario, because it makes no sense at all in RDMA
world.

Let's do two changes in the code to support such workflow anyway:
 1. Remove need to provide PID/kernel name. Code already supports it,
    just need to remove extra validation.
 2. Ball-out in case PID is 0.

Link: https://lore.kernel.org/linux-rdma/20191002123245.18153-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
rdma/res-cmid.c
rdma/res-cq.c
rdma/res-mr.c
rdma/res-pd.c
rdma/res-qp.c
rdma/res.c