From 390a08f1f9ecdff40988ace42ad748db5e683a53 Mon Sep 17 00:00:00 2001 From: Peter Rudenko Date: Thu, 13 Dec 2018 16:45:41 +0200 Subject: [PATCH] Fix RdmavsTcpBenchmark issue. --- .../com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkClient.java | 4 ++-- .../com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkServer.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkClient.java b/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkClient.java index 4f1df397..cabf0761 100644 --- a/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkClient.java +++ b/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkClient.java @@ -93,15 +93,15 @@ public void runRDMA() throws Exception { SVCPostSend postSend = endpoint.postSend(endpoint.getWrList_send()); SVCPostRecv postRecv = endpoint.postRecv(endpoint.getWrList_recv()); long startTime = System.nanoTime(); - for (int i = 0; i < loopCount + 1; i++) { + for (int i = 0; i < loopCount; i++) { // Send PING sendBuf.clear(); postSend.execute(); endpoint.getWcEvents().take(); // Recv PONG - postRecv.execute(); endpoint.getWcEvents().take(); + postRecv.execute(); recvBuf.clear(); } System.out.println("RDMA result:"); diff --git a/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkServer.java b/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkServer.java index c71b5af0..6614138c 100644 --- a/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkServer.java +++ b/src/test/java/com/ibm/disni/benchmarks/RDMAvsTcpBenchmarkServer.java @@ -91,10 +91,10 @@ public void runRDMA() throws Exception { ByteBuffer recvBuf = clientEndpoint.getRecvBuf(); SVCPostSend postSend = clientEndpoint.postSend(clientEndpoint.getWrList_send()); SVCPostRecv postRecv = clientEndpoint.postRecv(clientEndpoint.getWrList_recv()); - for (int i = 0; i < loopCount + 1; i++){ + for (int i = 0; i < loopCount; i++){ // Recv PING - postRecv.execute(); clientEndpoint.getWcEvents().take(); + postRecv.execute(); recvBuf.clear(); //Send PONG