Skip to content

Commit 40ebdac

Browse files
Konstantin Taranovrleon
authored andcommitted
RDMA/mana_ib: implement req_notify_cq
Arm a CQ when req_notify_cq is called. Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://patch.msgid.link/1737394039-28772-11-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Shiraz Saleem <shirazsaleem@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent c8017f5 commit 40ebdac

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

drivers/infiniband/hw/mana/cq.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,15 @@ void mana_ib_remove_cq_cb(struct mana_ib_dev *mdev, struct mana_ib_cq *cq)
168168
kfree(gc->cq_table[cq->queue.id]);
169169
gc->cq_table[cq->queue.id] = NULL;
170170
}
171+
172+
int mana_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
173+
{
174+
struct mana_ib_cq *cq = container_of(ibcq, struct mana_ib_cq, ibcq);
175+
struct gdma_queue *gdma_cq = cq->queue.kmem;
176+
177+
if (!gdma_cq)
178+
return -EINVAL;
179+
180+
mana_gd_ring_cq(gdma_cq, SET_ARM_BIT);
181+
return 0;
182+
}

drivers/infiniband/hw/mana/device.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static const struct ib_device_ops mana_ib_dev_ops = {
4747
.query_pkey = mana_ib_query_pkey,
4848
.query_port = mana_ib_query_port,
4949
.reg_user_mr = mana_ib_reg_user_mr,
50+
.req_notify_cq = mana_ib_arm_cq,
5051

5152
INIT_RDMA_OBJ_SIZE(ib_ah, mana_ib_ah, ibah),
5253
INIT_RDMA_OBJ_SIZE(ib_cq, mana_ib_cq, ibcq),

drivers/infiniband/hw/mana/mana_ib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,4 +595,6 @@ int mana_ib_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
595595
const struct ib_recv_wr **bad_wr);
596596
int mana_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
597597
const struct ib_send_wr **bad_wr);
598+
599+
int mana_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags);
598600
#endif

drivers/net/ethernet/microsoft/mana/gdma_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void mana_gd_ring_cq(struct gdma_queue *cq, u8 arm_bit)
344344
mana_gd_ring_doorbell(gc, cq->gdma_dev->doorbell, cq->type, cq->id,
345345
head, arm_bit);
346346
}
347+
EXPORT_SYMBOL_NS(mana_gd_ring_cq, "NET_MANA");
347348

348349
static void mana_gd_process_eqe(struct gdma_queue *eq)
349350
{

0 commit comments

Comments
 (0)