diff mbox series

[rdma-core,5/8] pyverbs: Expose MR's length property

Message ID 20191231091915.23874-6-noaos@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series pyverbs: Add support for the new post send API | expand

Commit Message

Noa Osherovich Dec. 31, 2019, 9:19 a.m. UTC
MR's length is needed for testing purposes.

Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Edward Srouji <edwards@mellanox.com>
---
 pyverbs/mr.pyx | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/pyverbs/mr.pyx b/pyverbs/mr.pyx
index 9b1277f0882f..234e864209a2 100644
--- a/pyverbs/mr.pyx
+++ b/pyverbs/mr.pyx
@@ -116,6 +116,10 @@  cdef class MR(PyverbsCM):
     def rkey(self):
         return self.mr.rkey
 
+    @property
+    def length(self):
+        return self.mr.length
+
 
 cdef class MWBindInfo(PyverbsCM):
     def __init__(self, MR mr not None, addr, length, mw_access_flags):