Skip to content

Commit

Permalink
tests: Fix rdmacm async udp
Browse files Browse the repository at this point in the history
[ Upstream commit 02e31cf ]

In case of dual port the wrong port was used for AH creation.

Fixes: c557b83 ("tests: Add RDMACM UDP test")
Signed-off-by: Maxim Chicherin <[email protected]>
Signed-off-by: Edward Srouji <[email protected]>
Signed-off-by: Nicolas Morey <[email protected]>
  • Loading branch information
Maxim Chicherin authored and nmorey committed Aug 4, 2023
1 parent 675c438 commit ceb60e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/base_rdmacm.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, addr=None, passive=None, **kwargs):
self.passive = passive
self.with_ext_qp = kwargs.get('with_ext_qp', False)
self.port = kwargs.get('port') if kwargs.get('port') else '7471'
self.ib_port = int(kwargs.get('ib_port', '1'))
self.port_space = kwargs.get('port_space', ce.RDMA_PS_TCP)
self.remote_operation = kwargs.get('remote_op')
self.qp_type = qp_type_per_ps[self.port_space]
Expand Down
2 changes: 1 addition & 1 deletion tests/rdmacm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _cmid_server_traffic(self):
self.cm_res.mr.write(send_msg, self.cm_res.msg_size)
cmid.post_send(self.cm_res.mr)
else:
ah = AH(cmid.pd, wc=wc, port_num=1, grh=self.cm_res.mr.buf)
ah = AH(cmid.pd, wc=wc, port_num=self.cm_res.ib_port, grh=self.cm_res.mr.buf)
rqpn = self.cm_res.remote_qpn
self.cm_res.mr.write(send_msg, self.cm_res.msg_size + GRH_SIZE)
cmid.post_ud_send(self.cm_res.mr, ah, rqpn=rqpn,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rdmacm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_rdmacm_async_traffic_external_qp(self):

def test_rdmacm_async_udp_traffic(self):
self.two_nodes_rdmacm_traffic(CMAsyncConnection, self.rdmacm_traffic,
port_space=self.get_port_space())
port_space=self.get_port_space(), ib_port=self.ib_port)

def test_rdmacm_async_read(self):
self.two_nodes_rdmacm_traffic(CMAsyncConnection,
Expand Down

0 comments on commit ceb60e1

Please sign in to comment.