|
|
bbe12a |
From 252e5a0f63663da5128fe714a1e9ea8a35995696 Mon Sep 17 00:00:00 2001
|
|
|
bbe12a |
From: Maxim Chicherin <maximc@mellanox.com>
|
|
|
bbe12a |
Date: Mon, 19 Aug 2019 11:11:12 +0300
|
|
|
bbe12a |
Subject: [PATCH rdma-core 04/13] pyverbs: Fix WC creation process
|
|
|
bbe12a |
|
|
|
bbe12a |
[ Upstream commit e83c7ff811544302ca3ecbcec23df0bb5b68d23f ]
|
|
|
bbe12a |
|
|
|
bbe12a |
In WC constructor, parameters assignment was incorrect and values
|
|
|
bbe12a |
were not stored properly.
|
|
|
bbe12a |
In addition, imm_data attribute was not initiated. imm_data represents
|
|
|
bbe12a |
immediate data in network byte order if wc_flags & IBV_WC_WITH_IMM or
|
|
|
bbe12a |
stores the invalidated rkey if wc_flags & IBV_WC_WITH_INV.
|
|
|
bbe12a |
|
|
|
bbe12a |
Fixes: 32165065ffbe ("pyverbs: Introducing completions related classes")
|
|
|
bbe12a |
Signed-off-by: Maxim Chicherin <maximc@mellanox.com>
|
|
|
bbe12a |
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
|
|
|
bbe12a |
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
|
|
bbe12a |
---
|
|
|
bbe12a |
pyverbs/cq.pyx | 33 +++++++++++++++++++++------------
|
|
|
bbe12a |
1 file changed, 21 insertions(+), 12 deletions(-)
|
|
|
bbe12a |
mode change 100644 => 100755 pyverbs/cq.pyx
|
|
|
bbe12a |
|
|
|
bbe12a |
diff --git a/pyverbs/cq.pyx b/pyverbs/cq.pyx
|
|
|
bbe12a |
old mode 100644
|
|
|
bbe12a |
new mode 100755
|
|
|
bbe12a |
index dc09924e..3ac5f704
|
|
|
bbe12a |
--- a/pyverbs/cq.pyx
|
|
|
bbe12a |
+++ b/pyverbs/cq.pyx
|
|
|
bbe12a |
@@ -366,18 +366,19 @@ cdef class WC(PyverbsObject):
|
|
|
bbe12a |
def __cinit__(self, wr_id=0, status=0, opcode=0, vendor_err=0, byte_len=0,
|
|
|
bbe12a |
qp_num=0, src_qp=0, imm_data=0, wc_flags=0, pkey_index=0,
|
|
|
bbe12a |
slid=0, sl=0, dlid_path_bits=0):
|
|
|
bbe12a |
- self.wr_id = wr_id
|
|
|
bbe12a |
- self.status = status
|
|
|
bbe12a |
- self.opcode = opcode
|
|
|
bbe12a |
- self.vendor_err = vendor_err
|
|
|
bbe12a |
- self.byte_len = byte_len
|
|
|
bbe12a |
- self.qp_num = qp_num
|
|
|
bbe12a |
- self.src_qp = src_qp
|
|
|
bbe12a |
- self.wc_flags = wc_flags
|
|
|
bbe12a |
- self.pkey_index = pkey_index
|
|
|
bbe12a |
- self.slid = slid
|
|
|
bbe12a |
- self.sl = sl
|
|
|
bbe12a |
- self.dlid_path_bits = dlid_path_bits
|
|
|
bbe12a |
+ self.wc.wr_id = wr_id
|
|
|
bbe12a |
+ self.wc.status = status
|
|
|
bbe12a |
+ self.wc.opcode = opcode
|
|
|
bbe12a |
+ self.wc.vendor_err = vendor_err
|
|
|
bbe12a |
+ self.wc.byte_len = byte_len
|
|
|
bbe12a |
+ self.wc.qp_num = qp_num
|
|
|
bbe12a |
+ self.wc.src_qp = src_qp
|
|
|
bbe12a |
+ self.wc.wc_flags = wc_flags
|
|
|
bbe12a |
+ self.wc.pkey_index = pkey_index
|
|
|
bbe12a |
+ self.wc.slid = slid
|
|
|
bbe12a |
+ self.wc.imm_data = imm_data
|
|
|
bbe12a |
+ self.wc.sl = sl
|
|
|
bbe12a |
+ self.wc.dlid_path_bits = dlid_path_bits
|
|
|
bbe12a |
|
|
|
bbe12a |
@property
|
|
|
bbe12a |
def wr_id(self):
|
|
|
bbe12a |
@@ -456,6 +457,13 @@ cdef class WC(PyverbsObject):
|
|
|
bbe12a |
def sl(self, val):
|
|
|
bbe12a |
self.wc.sl = val
|
|
|
bbe12a |
|
|
|
bbe12a |
+ @property
|
|
|
bbe12a |
+ def imm_data(self):
|
|
|
bbe12a |
+ return self.wc.imm_data
|
|
|
bbe12a |
+ @imm_data.setter
|
|
|
bbe12a |
+ def imm_data(self, val):
|
|
|
bbe12a |
+ self.wc.imm_data = val
|
|
|
bbe12a |
+
|
|
|
bbe12a |
@property
|
|
|
bbe12a |
def dlid_path_bits(self):
|
|
|
bbe12a |
return self.wc.dlid_path_bits
|
|
|
bbe12a |
@@ -476,6 +484,7 @@ cdef class WC(PyverbsObject):
|
|
|
bbe12a |
print_format.format('pkey index', self.pkey_index) +\
|
|
|
bbe12a |
print_format.format('slid', self.slid) +\
|
|
|
bbe12a |
print_format.format('sl', self.sl) +\
|
|
|
bbe12a |
+ print_format.format('imm_data', self.imm_data) +\
|
|
|
bbe12a |
print_format.format('dlid path bits', self.dlid_path_bits)
|
|
|
bbe12a |
|
|
|
bbe12a |
|
|
|
bbe12a |
--
|
|
|
bbe12a |
2.20.1
|
|
|
bbe12a |
|