diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2024-03-26 13:08:05 -0700 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2024-04-02 11:30:22 +0300 |
commit | 46f5be7cd4bceb3a503c544b3dab7b75fe4bb96b (patch) | |
tree | 08b653b631c7ac25818c016d66fc28a446dc8be7 /drivers/infiniband/hw/mana/mana_ib.h | |
parent | ca537a34775c103f7b14d7bbd976403f1d1525d8 (diff) |
RDMA/mana_ib: Introduce helpers to create and destroy mana queues
Intoduce helpers to work with mana ib queues (struct mana_ib_queue).
A queue always consists of umem, gdma_region, and id.
A queue can become a WQ or a CQ.
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1711483688-24358-2-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mana/mana_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mana/mana_ib.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mana/mana_ib.h b/drivers/infiniband/hw/mana/mana_ib.h index f83390eebb7d..859fd3bfc764 100644 --- a/drivers/infiniband/hw/mana/mana_ib.h +++ b/drivers/infiniband/hw/mana/mana_ib.h @@ -45,6 +45,12 @@ struct mana_ib_adapter_caps { u32 max_inline_data_size; }; +struct mana_ib_queue { + struct ib_umem *umem; + u64 gdma_region; + u64 id; +}; + struct mana_ib_dev { struct ib_device ib_dev; struct gdma_dev *gdma_dev; @@ -169,6 +175,10 @@ int mana_ib_create_dma_region(struct mana_ib_dev *dev, struct ib_umem *umem, int mana_ib_gd_destroy_dma_region(struct mana_ib_dev *dev, mana_handle_t gdma_region); +int mana_ib_create_queue(struct mana_ib_dev *mdev, u64 addr, u32 size, + struct mana_ib_queue *queue); +void mana_ib_destroy_queue(struct mana_ib_dev *mdev, struct mana_ib_queue *queue); + struct ib_wq *mana_ib_create_wq(struct ib_pd *pd, struct ib_wq_init_attr *init_attr, struct ib_udata *udata); |