Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accel_perf: check accel engine usage in accel_perf_start function.
In accel_done function, we use g_using_sw_engine to determine to directly call _accel_done or use thread message passing way. However when we get the capability and determine the value of g_using_sw_engine in mulitple cases. We do not protect the value of g_num_workers. Then if we use CPU mode to do test, g_using_sw_engine will not set to be false in racing condition. Since the value of g_num_workers can be > 1 when we do the check, i.e., it is a TOC2TOU issue. The solution is that we check the g_using_sw_engine in accel_perf_start function. Fixes issue spdk#2084 Change-Id: I55c18e0443120adb698d5bd27d4522df09f6dcab Signed-off-by: Ziye Yang <[email protected]> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9151 Community-CI: Broadcom CI <[email protected]> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <[email protected]> Reviewed-by: Jim Harris <[email protected]> Reviewed-by: Ben Walker <[email protected]>
- Loading branch information