RDMA/efa: User/kernel compatibility handshake mechanism
authorGal Pressman <galpress@amazon.com>
Wed, 22 Jul 2020 14:03:11 +0000 (17:03 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 29 Jul 2020 12:23:40 +0000 (09:23 -0300)
commita5d87b698547233321466b2dc91271f5855a4df6
tree408b2b043ae9aef48aa894c5ec888913c5534b1f
parentda2924bdca99768442c5e0ed0a9024ae79d62765
RDMA/efa: User/kernel compatibility handshake mechanism

Introduce a mechanism that performs an handshake between the userspace
provider and kernel driver which verifies that the user supports all
required features in order to operate correctly.

The handshake verifies the needed functionality by comparing the reported
device caps and the provider caps. If the device reports a non-zero
capability the appropriate comp mask is required from the userspace
provider in order to allocate the context.

Link: https://lore.kernel.org/r/20200722140312.3651-4-galpress@amazon.com
Reviewed-by: Shadi Ammouri <sammouri@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/efa/efa_verbs.c
include/uapi/rdma/efa-abi.h