numam-spdk/test/unit/lib
Shuhei Matsumoto 07bfc3cbe9 nvmf: Add anagrpid to ns and count number of ns per ANA group in subsystem
This is the first patch in the patch series to control ANA states not only
as a unit of subsystem listener but also as a unit of ANA group and create
user preferred mapping between namespaces and ANA groups within a single
subsystem.

This patch adds anagrpid to both spdk_nvmf_ns and spdk_nvmf_ns_opts, and adds
ana_group array to spdk_nvmf_subsystem to count number of namespaces per ANA
group within a single subsystem. The size of the ana_group array is equal
with the size of the namespaces.

For each subsystem, allocate ana_group array regardless of the value of
ana_reporting of the subsystem.

For each namespace, at its creation, initialize anagrpid explicitly to be equal
with nsid by default and increments the corresponding entry of the ana_group
array of the subsystem regardless of teh value of the ana_reporting of thee
subsystem.

Hence the contents of the created ANA log page is not changed even if the
algorithm to crete ANA log page is changed.

Additionally this patch adds a unit test case that one ANA group
has multiple namespaces.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I78539db4e7248c2953c6927ff8128cb5a7e34b96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9102
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-09-06 09:47:01 +00:00
..
accel test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
bdev bdev/nvme: Remove OCSSD support 2021-09-03 08:07:25 +00:00
blob test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
blobfs test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
dma dma: Introduce memory domain 2021-08-20 07:26:10 +00:00
env_dpdk test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
event lib/event: cleanup and document governor API 2021-08-31 08:39:55 +00:00
ftl test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
idxd test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
init test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
ioat test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
iscsi test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
json test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
jsonrpc test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
log test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
lvol test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
notify test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme nvme: No longer allocate arrays of size NN in cuse handling 2021-09-03 08:07:25 +00:00
nvmf nvmf: Add anagrpid to ns and count number of ns per ANA group in subsystem 2021-09-06 09:47:01 +00:00
reduce test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
scsi test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
sock test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
thread test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
util test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
vhost test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
json_mock.c ut/json_mock: Add spdk_json_write_string_fmt() 2021-02-09 11:29:53 +00:00
Makefile dma: Introduce memory domain 2021-08-20 07:26:10 +00:00