Commit 4778d342 authored by Marcin Spiewak's avatar Marcin Spiewak Committed by Jim Harris
Browse files

test/nvmf_perf_adq: use proper sock implementation



In ADQ tests, the sock_impl_set_options RPC call
is used to configure placement for given sock implementation
to test Application Device Queues (ADQ) functionality.
However, the test script configured placement always for
posix sockets, while by default uring sockets are enabled.
This caused the tests were failing.

Before the sock_impl_set_options is used to configure options,
we must retrieve current default socket implementation by
a call to sock_get_default_impl() RPC function. Then use it
in sock_set_default_impl RPC call.

nvmf statistics reading is now done in a separate line,
so they are now visible in the build log. Can speed up
debugging in the future.

Fixes #3090

Change-Id: I5e50ee79a9ab6bfa41d4c87c6b746e4985ac3f22
Signed-off-by: default avatarMarcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22881


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 588e20ee
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@ function adq_configure_driver() {
}

function adq_configure_nvmf_target() {
	$rpc_py sock_impl_set_options --enable-placement-id $1 --enable-zerocopy-send-server -i posix
	socket_impl=$("$rpc_py" sock_get_default_impl | jq -r '.impl_name')
	$rpc_py sock_impl_set_options --enable-placement-id $1 --enable-zerocopy-send-server -i $socket_impl
	$rpc_py framework_start_init
	$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS --io-unit-size 8192 --sock-priority $1
	$rpc_py bdev_malloc_create 64 512 -b Malloc1
@@ -73,7 +74,8 @@ $perf -q 64 -o 4096 -w randread -t 10 -c 0xF0 \
perfpid=$!
sleep 2

count=$("$rpc_py" nvmf_get_stats | jq -r '.poll_groups[] | select(.current_io_qpairs == 1) | length' | wc -l)
nvmf_stats=$("$rpc_py" nvmf_get_stats)
count=$(jq -r '.poll_groups[] | select(.current_io_qpairs == 1) | length' <<< $nvmf_stats | wc -l)
if [[ "$count" -ne 4 ]]; then
	echo "ERROR: With ADQ disabled, connections were not evenly distributed amongst poll groups!"
	exit 1
@@ -94,7 +96,8 @@ $perf -q 64 -o 4096 -w randread -t 10 -c 0xF0 \
perfpid=$!
sleep 2

count=$("$rpc_py" nvmf_get_stats | jq -r '.poll_groups[] | select(.current_io_qpairs == 0) | length' | wc -l)
nvmf_stats=$("$rpc_py" nvmf_get_stats)
count=$(jq -r '.poll_groups[] | select(.current_io_qpairs == 0) | length' <<< $nvmf_stats | wc -l)
if [[ "$count" -lt 2 ]]; then
	echo "ERROR: With ADQ enabled, did not find 0 connections on 2 of the poll groups!"
	exit 1