提交 91bff997 编写于 作者: R Ram Amrani 提交者: Doug Ledford

RDMA/qedr: Remove CQ spinlock from CM completion handlers

There is only a single event queue that triggers the completion
events for the RDMA CM and it is being processed serially. This means
that inherently there can no parallelism of CQ completion handler
callbacks, hence the lock is redundant.
Signed-off-by: NRam Amrani <Ram.Amrani@cavium.com>
Signed-off-by: NMichal Kalderon <Michal.Kalderon@cavium.com>
Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 59e8970b
...@@ -251,9 +251,6 @@ struct qedr_cq { ...@@ -251,9 +251,6 @@ struct qedr_cq {
u16 icid; u16 icid;
/* Lock to protect completion handler */
spinlock_t comp_handler_lock;
/* Lock to protect multiplem CQ's */ /* Lock to protect multiplem CQ's */
spinlock_t cq_lock; spinlock_t cq_lock;
u8 arm_flags; u8 arm_flags;
......
...@@ -87,11 +87,8 @@ void qedr_ll2_tx_cb(void *_qdev, struct qed_roce_ll2_packet *pkt) ...@@ -87,11 +87,8 @@ void qedr_ll2_tx_cb(void *_qdev, struct qed_roce_ll2_packet *pkt)
qedr_inc_sw_gsi_cons(&qp->sq); qedr_inc_sw_gsi_cons(&qp->sq);
spin_unlock_irqrestore(&qp->q_lock, flags); spin_unlock_irqrestore(&qp->q_lock, flags);
if (cq->ibcq.comp_handler) { if (cq->ibcq.comp_handler)
spin_lock_irqsave(&cq->comp_handler_lock, flags);
(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context); (*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
spin_unlock_irqrestore(&cq->comp_handler_lock, flags);
}
} }
void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt, void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt,
...@@ -113,11 +110,8 @@ void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt, ...@@ -113,11 +110,8 @@ void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt,
spin_unlock_irqrestore(&qp->q_lock, flags); spin_unlock_irqrestore(&qp->q_lock, flags);
if (cq->ibcq.comp_handler) { if (cq->ibcq.comp_handler)
spin_lock_irqsave(&cq->comp_handler_lock, flags);
(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context); (*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
spin_unlock_irqrestore(&cq->comp_handler_lock, flags);
}
} }
static void qedr_destroy_gsi_cq(struct qedr_dev *dev, static void qedr_destroy_gsi_cq(struct qedr_dev *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册