diff mbox series

[rdma-core,4/8] tests: Use post_recv in the right place

Message ID 20191231091915.23874-5-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
In traffic() helper method, do post_recv after a recv WQE was consumed
by the hardware.

Fixes: 6fb2b9bade55 ('tests: Add traffic helper methods')
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Edward Srouji <edwards@mellanox.com>
---
 tests/utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/utils.py b/tests/utils.py
index d4d0d1ef49ef..47eacfee35e5 100755
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -420,14 +420,14 @@  def traffic(client, server, iters, gid_idx, port, is_cq_ex=False):
         post_send(client, c_send_wr, gid_idx, port)
         poll(client.cq)
         poll(server.cq)
-        post_recv(client.qp, c_recv_wr)
+        post_recv(server.qp, s_recv_wr)
         msg_received = server.mr.read(server.msg_size, read_offset)
         validate(msg_received, True, server.msg_size)
         s_send_wr = get_send_wr(server, True)
         post_send(server, s_send_wr, gid_idx, port)
         poll(server.cq)
         poll(client.cq)
-        post_recv(server.qp, s_recv_wr)
+        post_recv(client.qp, c_recv_wr)
         msg_received = client.mr.read(client.msg_size, read_offset)
         validate(msg_received, False, client.msg_size)