Skip to content

Commit 537e0ad

Browse files
committed
ocxl_memcpy: Remove hack for increment test case
The memcpy AFU has been fixed. We don't need to insert a COPY before a series of INCREMENT any more. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
1 parent b515b31 commit 537e0ad

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

afutests/memcpy/ocxl_memcpy.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -516,18 +516,7 @@ int test_afu_memcpy(struct memcpy_test_args *args)
516516
}
517517
rc = 0;
518518
gettimeofday(&start, NULL);
519-
/*
520-
* AFU bug (?):
521-
* With -l2 or more, the AFU completes Increment #1,
522-
* but hangs instead of returning from Increment #2.
523-
*
524-
* Workaround:
525-
* If we insert a Copy command with the same dst address
526-
* before Increment #1, then the AFU behaves as expected
527-
* and completes any number of subsequent Increments.
528-
*/
529-
if (args->increment)
530-
args->loop_count++;
519+
531520
for (i = 0; i < args->loop_count; i++) {
532521

533522
/* setup the work queue */
@@ -540,7 +529,7 @@ int test_afu_memcpy(struct memcpy_test_args *args)
540529
/* release lock */
541530
last_we = memcpy3_add_we(&weq, memcpy_we);
542531
last_we->cmd |= MEMCPY_WE_CMD_VALID;
543-
} else if (args->increment && i) {
532+
} else if (args->increment) {
544533
*(pid_t *)src = htole32(le32toh(*(pid_t *)src) + 1);
545534
first_we = last_we = memcpy3_add_we(&weq, increment_we);
546535
} else {
@@ -590,7 +579,7 @@ int test_afu_memcpy(struct memcpy_test_args *args)
590579

591580
if (args->atomic_cas) {
592581
; /* atomicity is checked at the end of main() */
593-
} else if (args->increment && i) {
582+
} else if (args->increment) {
594583
if (le32toh(*(pid_t *)dst)-le32toh(*(pid_t *)src)-1) {
595584
LOG_ERR(pid, "increment error on loop %d\n", i);
596585
goto err_status;

0 commit comments

Comments
 (0)