diff mbox series

[rdma-core,3/7] pyverbs: Add default values for CQ creation

Message ID 20191117133030.10784-4-noaos@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series pyverbs/mlx5: Support mlx5 CQ and QP | expand

Commit Message

Noa Osherovich Nov. 17, 2019, 1:30 p.m. UTC
When creating a CQ, set CQ context and completion channel to None and
completion vector to 0 by default, to make the simple CQ creation
shorter.

Signed-off-by: Noa Osherovich <noaos@mellanox.com>
---
 pyverbs/cq.pyx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/pyverbs/cq.pyx b/pyverbs/cq.pyx
index 6a96347ee979..ecfef6d7fdb9 100755
--- a/pyverbs/cq.pyx
+++ b/pyverbs/cq.pyx
@@ -67,8 +67,8 @@  cdef class CQ(PyverbsCM):
     A Completion Queue is the notification mechanism for work request
     completions. A CQ can have 0 or more associated QPs.
     """
-    def __cinit__(self, Context context not None, cqe, cq_context,
-                  CompChannel channel, comp_vector):
+    def __cinit__(self, Context context not None, cqe, cq_context=None,
+                  CompChannel channel=None, comp_vector=0):
         """
         Initializes a CQ object with the given parameters.
         :param context: The device's context on which to open the CQ