numam-spdk/test/iscsi_tgt
Shuhei Matsumoto 89ae0e3c62 lib/iscsi: Manage free connections not by array but by TAILQ
Previously free connections had been managed by g_conns_array,
and allocate_conn() gets the lowest free connection. This had worked
almost as LIFO, and the just freed connection had been reused
immediately to the new connection.

Using TAILQ makes management of free connections FIFO, and this will
be more intuitive and simpler, and avoid potential issues due to the
fact that we do not know the state INVALID is the current connection
or the current connection is exited and the new connection is allocated.

This patch includes following updates.

Remove the test condition that the connection ID should be zero.
Connection ID is used as Target Transfer Tag (TTT) and TTT is opaque
number. Hence requiring connection ID to be zero is not meaningful.

iscsi_conn_free() calls free_conn() while holding g_conns_mutex, but
iscsi_conn_construct() does not call free_conn() without holding
g_conns_mutex. Hence add g_conns_mutex to the latter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I204f66469f0bf54845c773da5b4ac86f3c8dca60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-13 08:39:50 +00:00
..
bdev_io_wait test/iscsi_tgt: Drop .ini config in favor of json 2020-04-20 14:28:56 +00:00
calsoft iscsi: Add DataSequenceInOrder in discovery_ignored_param 2020-06-11 19:51:04 +00:00
digests test/common: Source *_APP from a common place 2020-02-27 10:15:40 +00:00
ext4test check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
filesystem check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
fio check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
fuzz check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
initiator check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
ip_migration iscsi migration test: Extend the execution time of fio. 2020-06-10 13:55:40 +00:00
lvol check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
multiconnection test/common: Source *_APP from a common place 2020-02-27 10:15:40 +00:00
nvme_remote test/common: Source *_APP from a common place 2020-02-27 10:15:40 +00:00
perf build: Output executables from the app directory to build/bin 2020-06-15 15:27:16 +00:00
pmem test/common: Source *_APP from a common place 2020-02-27 10:15:40 +00:00
qos check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
rbd check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
reset test/common: Source *_APP from a common place 2020-02-27 10:15:40 +00:00
rpc_config lib/iscsi: Manage free connections not by array but by TAILQ 2020-07-13 08:39:50 +00:00
sock build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
trace_record build: Output executables from the app directory to build/bin 2020-06-15 15:27:16 +00:00
common.sh check_format: Reformat the Bash code in compliance with shfmt 2020-05-07 20:52:21 +00:00
iscsi_tgt.sh test/iscsi: run cleanup once before running the tests 2020-03-31 07:58:11 +00:00