[d/azure][PATCH 2/2] UBUNTU: SAUCE: Expose extended attributes for user IB verbs QUERY_DEVICE, CREATE_CQ and CREATE_QP

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Wed Aug 14 18:08:04 UTC 2019

From: Long Li <longli at microsoft.com>

BugLink: https://bugs.launchpad.net/bugs/1839673

The user-mode driver may call this IB verbs to get extended data. The RDMA layer
checks if those data are available in lower layer, and copy those data back to user
mode. There is no need to change lower layer driver as those data have already been
returned in RDMA-lower driver interfaces.

Signed-off-by: Long Li <longli at microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
 drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c
index 3ad27e9d6a5d..1877cf60853b 100644
--- a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c
+++ b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c
@@ -2669,6 +2669,11 @@ int hvnd_register_device(struct hvnd_dev *dev, char *ip_addr, char *mac_addr)
 	dev->ibdev.ops.get_port_immutable = hvnd_get_port_immutable;
+	dev->ibdev.uverbs_ex_cmd_mask |=
+                (1ull << IB_USER_VERBS_EX_CMD_QUERY_DEVICE) |
+                (1ull << IB_USER_VERBS_EX_CMD_CREATE_CQ) |
+                (1ull << IB_USER_VERBS_EX_CMD_CREATE_QP);
 	//DMA ops for mapping all possible addresses
 	dev->ibdev.dev.parent = &(dev->hvdev->device);
 	dev->ibdev.dev.dma_ops = &vmbus_dma_ops;

More information about the kernel-team mailing list