Skip to content

Commit e83e621

Browse files
authored
Merge pull request #73 from firasj/bw_fixes
Misc. bandwidth fixes for post_list
2 parents cdb1db7 + 1b1bfec commit e83e621

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/perftest_resources.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4539,7 +4539,7 @@ int run_iter_bi(struct pingpong_context *ctx,
45394539

45404540
for (index=0; index < num_of_qps; index++) {
45414541
while (before_first_rx == OFF && (ctx->scnt[index] < iters || user_param->test_type == DURATION) &&
4542-
((ctx->scnt[index] + scredit_for_qp[index] - ctx->ccnt[index]) < user_param->tx_depth)) {
4542+
((ctx->scnt[index] + scredit_for_qp[index] - ctx->ccnt[index] + user_param->post_list) <= user_param->tx_depth)) {
45434543
if (ctx->send_rcredit) {
45444544
uint32_t swindow = ctx->scnt[index] + user_param->post_list - ctx->credit_buf[index];
45454545
if (swindow >= user_param->rx_depth)
@@ -4708,7 +4708,7 @@ int run_iter_bi(struct pingpong_context *ctx,
47084708
ctx->ccnt[(int)credit_wc.wr_id] += user_param->cq_mod;
47094709

47104710
if (user_param->noPeak == OFF) {
4711-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
4711+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
47124712
user_param->tcompleted[tot_iters - 1] = get_cycles();
47134713
else
47144714
user_param->tcompleted[totccnt-1] = get_cycles();
@@ -4770,7 +4770,7 @@ int run_iter_bi(struct pingpong_context *ctx,
47704770

47714771
if (user_param->noPeak == OFF) {
47724772

4773-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
4773+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
47744774
user_param->tcompleted[tot_iters - 1] = get_cycles();
47754775
else
47764776
user_param->tcompleted[totccnt-1] = get_cycles();

src/raw_ethernet_resources.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ int run_iter_fw(struct pingpong_context *ctx,struct perftest_parameters *user_pa
10921092
for (index = 0; index < user_param->num_of_qps; index++) {
10931093

10941094
while (((ctx->scnt[index] < iters) || ((firstRx == OFF) && (user_param->test_type == DURATION))) &&
1095-
((ctx->scnt[index] - ctx->ccnt[index]) < user_param->tx_depth) && (rcnt_for_qp[index] - ctx->scnt[index] > 0)) {
1095+
((ctx->scnt[index] - ctx->ccnt[index] + user_param->post_list) <= user_param->tx_depth) && (rcnt_for_qp[index] - ctx->scnt[index] > 0)) {
10961096

10971097
if (user_param->post_list == 1 && (ctx->scnt[index] % user_param->cq_mod == 0 && user_param->cq_mod > 1)) {
10981098
#ifdef HAVE_VERBS_EXP
@@ -1251,7 +1251,7 @@ int run_iter_fw(struct pingpong_context *ctx,struct perftest_parameters *user_pa
12511251

12521252
if (user_param->noPeak == OFF) {
12531253

1254-
if ((user_param->test_type == ITERATIONS && (totccnt >= tot_iters - 1)))
1254+
if ((user_param->test_type == ITERATIONS && (totccnt > tot_iters)))
12551255
user_param->tcompleted[tot_iters - 1] = get_cycles();
12561256
else
12571257
user_param->tcompleted[totccnt - 1] = get_cycles();

0 commit comments

Comments
 (0)