Commit f72ececf authored by Long Li's avatar Long Li Committed by Leon Romanovsky

net: mana: Define data structures for allocating doorbell page from GDMA

The RDMA device needs to allocate doorbell pages for each user context.
Define the GDMA data structures for use by the RDMA driver.
Reviewed-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarLong Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1667502990-2559-11-git-send-email-longli@linuxonhyperv.comAcked-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent de372f2a
...@@ -24,11 +24,15 @@ enum gdma_request_type { ...@@ -24,11 +24,15 @@ enum gdma_request_type {
GDMA_GENERATE_TEST_EQE = 10, GDMA_GENERATE_TEST_EQE = 10,
GDMA_CREATE_QUEUE = 12, GDMA_CREATE_QUEUE = 12,
GDMA_DISABLE_QUEUE = 13, GDMA_DISABLE_QUEUE = 13,
GDMA_ALLOCATE_RESOURCE_RANGE = 22,
GDMA_DESTROY_RESOURCE_RANGE = 24,
GDMA_CREATE_DMA_REGION = 25, GDMA_CREATE_DMA_REGION = 25,
GDMA_DMA_REGION_ADD_PAGES = 26, GDMA_DMA_REGION_ADD_PAGES = 26,
GDMA_DESTROY_DMA_REGION = 27, GDMA_DESTROY_DMA_REGION = 27,
}; };
#define GDMA_RESOURCE_DOORBELL_PAGE 27
enum gdma_queue_type { enum gdma_queue_type {
GDMA_INVALID_QUEUE, GDMA_INVALID_QUEUE,
GDMA_SQ, GDMA_SQ,
...@@ -587,6 +591,26 @@ struct gdma_register_device_resp { ...@@ -587,6 +591,26 @@ struct gdma_register_device_resp {
u32 db_id; u32 db_id;
}; /* HW DATA */ }; /* HW DATA */
struct gdma_allocate_resource_range_req {
struct gdma_req_hdr hdr;
u32 resource_type;
u32 num_resources;
u32 alignment;
u32 allocated_resources;
};
struct gdma_allocate_resource_range_resp {
struct gdma_resp_hdr hdr;
u32 allocated_resources;
};
struct gdma_destroy_resource_range_req {
struct gdma_req_hdr hdr;
u32 resource_type;
u32 num_resources;
u32 allocated_resources;
};
/* GDMA_CREATE_QUEUE */ /* GDMA_CREATE_QUEUE */
struct gdma_create_queue_req { struct gdma_create_queue_req {
struct gdma_req_hdr hdr; struct gdma_req_hdr hdr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment