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