[PATCH rdma-core 3/4] pyverbs: Add query QP data in order support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shachar Kagan <skagan@xxxxxxxxxx>

Add the ability to check if QP data is guaranteed to be in order.

Signed-off-by: Shachar Kagan <skagan@xxxxxxxxxx>
Reviewed-by: Ido Kalir <idok@xxxxxxxxxx>
Signed-off-by: Edward Srouji <edwards@xxxxxxxxxx>
---
 pyverbs/libibverbs.pxd | 1 +
 pyverbs/qp.pyx         | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/pyverbs/libibverbs.pxd b/pyverbs/libibverbs.pxd
index 35e47aa..4c84c18 100644
--- a/pyverbs/libibverbs.pxd
+++ b/pyverbs/libibverbs.pxd
@@ -723,6 +723,7 @@ cdef extern from 'infiniband/verbs.h':
     int ibv_query_rt_values_ex(ibv_context *context, ibv_values_ex *values)
     int ibv_get_async_event(ibv_context *context, ibv_async_event *event)
     void ibv_ack_async_event(ibv_async_event *event)
+    int ibv_query_qp_data_in_order(ibv_qp *qp, ibv_wr_opcode op, uint32_t flags)
 
 
 cdef extern from 'infiniband/driver.h':
diff --git a/pyverbs/qp.pyx b/pyverbs/qp.pyx
index 0b117df..88516f8 100644
--- a/pyverbs/qp.pyx
+++ b/pyverbs/qp.pyx
@@ -1229,6 +1229,15 @@ cdef class QP(PyverbsCM):
         if rc != 0:
             raise PyverbsRDMAError('Failed to Bind MW', rc)
 
+    def query_data_in_order(self, op, flags=0):
+        """
+        Query if QP data is guaranteed to be in order.
+        :param op: Operation type.
+        :param flags: Extra field for future input. For now must be 0.
+        :return: 1 in case the data is guaranteed to be in order, 0 otherwise.
+        """
+        return v.ibv_query_qp_data_in_order(self.qp, op, flags)
+
     @property
     def qp_type(self):
         return self.qp.qp_type
-- 
1.8.3.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux