Skip to content

Commit 3ba386a

Browse files
author
Nitzan Lavy
committed
Perftest: Fix address cycling bug in local address increment logic
The increase_loc_addr() function manages circular buffer addressing. One of the input argument is rcnt, which represents the number of post_send/post_receive operations that were called per QP. Based on rcnt, it internally calculates the local address for the next operation. When setting up receive WQEs, this function is being called with the index of the current operation instead of the amount that was already called. This incorrect indexing caused the last WQE in the buffer to incorrectly point to the first WQE's address in the QP. This bug affects the cyclic address calculation used for cache-efficient data placement. The fix ensures proper address cycling by passing the correct index to the function. Reviewed-by: Firas Jahjah <firasj@amazon.com> Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com> Signed-off-by: Nitzan Lavy <nlavy@amazon.com>
1 parent 5be2b4e commit 3ba386a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/perftest_resources.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3369,7 +3369,7 @@ int ctx_set_recv_wqes(struct pingpong_context *ctx,struct perftest_parameters *u
33693369
if ((user_param->tst == BW || user_param->tst == LAT_BY_BW) && user_param->size <= (ctx->cycle_buffer / 2)) {
33703370
increase_loc_addr(&ctx->recv_sge_list[i * user_param->recv_post_list + j],
33713371
user_param->size,
3372-
j,
3372+
j-1,
33733373
ctx->rx_buffer_addr[i],
33743374
user_param->connection_type,ctx->cache_line_size,ctx->cycle_buffer);
33753375
}

0 commit comments

Comments
 (0)