From 4707d4b89fcdab09d568a823ddf521f835a47fe9 Mon Sep 17 00:00:00 2001 From: Ido Kalir Date: Thu, 6 Aug 2020 14:44:31 +0300 Subject: [PATCH] pyverbs: Add mlx5dv CQ support Support the creation of QPInitAttr and QPInitAttrEx with a DV CQ instance. Signed-off-by: Ido Kalir Signed-off-by: Edward Srouji --- pyverbs/qp.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyverbs/qp.pyx b/pyverbs/qp.pyx index 24dfc667227a..09d1c55af835 100644 --- a/pyverbs/qp.pyx +++ b/pyverbs/qp.pyx @@ -119,7 +119,7 @@ cdef class QPInitAttr(PyverbsObject): if scq is not None: if type(scq) is CQ: self.attr.send_cq = (scq).cq - elif type(scq) is CQEX: + elif isinstance(scq, CQEX): self.attr.send_cq = (scq).ibv_cq else: raise PyverbsUserError('Expected CQ/CQEX, got {t}'.\ @@ -129,7 +129,7 @@ cdef class QPInitAttr(PyverbsObject): if rcq is not None: if type(rcq) is CQ: self.attr.recv_cq = (rcq).cq - elif type(rcq) is CQEX: + elif isinstance(rcq, CQEX): self.attr.recv_cq = (rcq).ibv_cq else: raise PyverbsUserError('Expected CQ/CQEX, got {t}'.\ @@ -282,7 +282,7 @@ cdef class QPInitAttrEx(PyverbsObject): if scq is not None: if type(scq) is CQ: self.attr.send_cq = (scq).cq - elif type(scq) is CQEX: + elif isinstance(scq, CQEX): self.attr.send_cq = (scq).ibv_cq else: raise PyverbsUserError('Expected CQ/CQEX, got {t}'.\ @@ -292,7 +292,7 @@ cdef class QPInitAttrEx(PyverbsObject): if rcq is not None: if type(rcq) is CQ: self.attr.recv_cq = (rcq).cq - elif type(rcq) is CQEX: + elif isinstance(rcq, CQEX): self.attr.recv_cq = (rcq).ibv_cq else: raise PyverbsUserError('Expected CQ/CQEX, got {t}'.\ -- 2.25.4