There are many duplicated codes about sending response for writing bool result.
That we need a function to do this.
Then we can reduce many codes.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic439111b1e9ca1013f8c657ab925f0c27a7be699
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5033
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Following a previous patch, cache pointers to spdk_nvme_ctrlr and
spdk_nvme_ns in bdev_nvme_dump_info_json().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I769d112f815e29262d52faee5ec17ccb914a7154
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5104
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
bdev_nvme_failover() updates trid of spdk_nvme_ctrlr using
spdk_nvme_ctrlr_set_trid(). Hence trid of spdk_nvme_ctrlr is always
up-to-date.
Hence bdev_nvme_dump_info_json() can query trid simply by calling
spdk_nvme_ctrlr_get_transport_id(). The queried trid is a const
parameter. Hence add const to nvme_bdev_dump_trid_json().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id04881f9e7596b910bdf26c4f14f1ebcb3cdbbee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5103
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
bdev_nvme_io_type_supported() queries NVMe driver to return if the
specified IO type is supported. To clarify it, cache pointers to
struct spdk_nvme_ctrlr and spdk_nvme_ns.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0956506e720722216e03cb808f61737ada617329
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
In the following patches, nvme_bdev_subsystem will be added and nvme_bdev_ns
will be added to not nvme_bdev but nvme_bdev_subsystem.
To do it easier, factor out creating an NVMe bdev into an new helper
function nvme_bdev_create().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa902912ba1ea979153b04ef4ac9fae10c09b7e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5018
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
bdev_nvme_reset() has been called only by a single caller now.
Hence pass nvme_ch to bdev_nvme_reset() to queue I/O easily.
This will improve readability and clarify the logic.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idc22cb499fcf8455a2b04d44688f999344abc352
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4992
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Factor out the common operation between internal calls and bdev I/O
calls of bdev_nvme_reset() into an new helper function
_bdev_nvme_reset().
This is to improve readability and to clean-up the operation only
for bdev I/O calls in the next patch.
Replace bdev_nvme_reset() by _bdev_nvme_reset() for internal calls.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7580a8fb40d5a1d694d5f913cde770ca95a0b0c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4991
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
_bdev_nvme_reset_ctrlr will figure out what it really does.
_bdev_nvme_reset will be used by an new helper function in the
next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I890f962529a663ea412bcd416ef9ba31fadfbf61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4990
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
bdev_nvme_delete() had called nvme_bdev_ctrlr_get_by_name() and
then called remove_cb(). But nvme_bdev_ctrlr_get_by_name() had not
been guarded by lock and remove_cb() parsed the list again by using
spdk_nvme_ctrlr as a key.
These were not safe and efficient.
This patch refines bdev_nvme_delete() to inline remove_cb() into
it and acquire mutex before calling nvme_bdev_ctrlr_get_by_name().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf39859809efa6f22899353c53b7b1eef58aa470
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4842
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add the second parameter remove and include path removal into
bdev_nvme_failover(). Additionally, bdev_nvme_failover() returns
only two return values, 0 or -EAGAIN, and hence change
bdev_nvme_remove_trid() to return the return value of
bdev_nvme_failover() directly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife560f886e32ecec23691e01e87069502e27cc0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4867
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
nvme_bdev_ctrlr_destruct() had checked first if poller is already
registered. On the other hand, nvme_bdev_ctrlr_destruct() had been
used as a poller function.
Hence nvme_bdev_ctrlr_destruct() had no way to unregister poller
if destruct and reset controller were raced.
This patch fixes the issue. The previous patch ensures nvme_bdev_ctrlr_destruct()
is called only once.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iba5424c42a4a3e5f03575df2616ec2a817e38f51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4827
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Previously local boolean variable empty was used to destruct a
controller in delete_nvme_bdev_controller(). However, it was hard
to understand and did not work well with refactoring.
Using reference count is more sophisticated and works well, and hence
done in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I59d0552c16653495fa55e9bfe4a2c0a316a204c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4355
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Checking if destruct is false and setting destruct to true are
separated by mutex in remove_cb() and bdev_nvme_library_fini().
It was possible that multiple threads called nvme_bdev_ctrlr_destruct()
because the caller could call nvme_bdev_ctrlr_destruct() before
setting destruct to true after knowing it was false.
This patch ensures that nvme_bdev_ctrlr_destruct() is called only once.
Set ctrlr->destruct to true without releasing mutex after checking
if ctrlr->destruct is false.
If destruct is set to true before calling nvme_ctrlr_depopulate_namespaces(),
nvme_ctrlr_depopulate_namespace_done() may call nvme_bdev_ctrlr_destruct()
because it is likely that reference count is zero and destruct is true.
In this case, remove_cb() or bdev_nvme_library_fini() cannot call
nvme_bdev_destruct() after returning from nvme_ctrlr_depopulate_namespaces().
On the other hand, if a controller has no namespace,
nvme_ctrlr_depopulate_namespaces() does nothing and
nvme_ctrlr_depopulate_namespace_done() is not called. Hence
remove_cb() or bdev_nvme_library_fini() has to call nvme_bdev_destruct()
after returning nvme_ctrlr_depopulate_namespaces().
To unify both cases, initialize reference count to one as a sentinel value
and remove_cb() and bdev_nvme_library_fini() decrement reference count
and then calls nvme_bdev_ctrlr_destruct() if reference count is zero
after returning from nvme_ctrlr_depopulate_namespaces().
Additionally, add assert to check if reference count is not negative
to find bug in future.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a617b5aa4d0a9faff832e63c2ed4b353341dd6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4817
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
subnqn will be used to manage subsystem, and so add it to the output
of bdev_nvme_dump_info_json().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id28023754fa19d14aa9297f4e6676d235f024e0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4974
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
To improve readability and make the following patches easier,
factor out the common operation of bdev_nvme_create_cb() and
_bdev_nvme_reset_create_qpair() into bdev_nvme_create_qpair(),
and factor out the main operation of bdev_nvme_destroy_cb()
into bdev_nvme_destroy_qpair(). bdev_nvme_destroy_qpair() is used
in the error path of bdev_nvme_create_qpair().
Updating g_opts.io_queue_requests again is no harm and so is done
in bdev_nvme_create_qpair().
Use the term nvme_ch in bdev_nvme_create_cb() and bdev_nvme_destroy_cb()
for clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie0a4251023037958d122fbb5d7ee72d42238b3ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4981
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This change will make the next patch smaller and its review easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2784fa74dce98676958180bbf80a9a4f938454db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5101
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
When ANA is enabled, if a new namespace is hot-added to the subsystem on
the target side, the Linux host will expect to receive an ANA change
notification after the namespace change one. Without the knowledge of
the namespace's ANA state, the host will not register the associated
block device, so users cannot see the nvme device.
In this patch, ANA change is notified right after namespace change, so
host will get ANA log, update the namespace's ANA state and then
register the block device if it is alive.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I2faf61d344eb6de7efb2fde3cb1013cf0efd3c2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5097
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Since spdk_sock_group_poll should do level trigger to
the callback func registered in spdk_sock_group_add_sock,
if there is data in pipe, but not event occurs, poll func
should still reap sock who has data in pipe.
Change-Id: If3a983f80fd04708e45ad0398c7d34018ec52bc7
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5072
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Having a brief gitlog of build external DPDK makes it
easier to track what has changed in case of failures
detected in CI.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I549405b017c38bb5706d64a00022a2521d950a3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
The original entry was wrong - the path has always been
/var/tmp/spdk.sock.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I24febd74c5eac31b1c56f2e053636660a641fbc0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reference the struct members only when it is necessary.
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I44208dfde20f74ab96e494445a464bf45f7ab408
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5070
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
When call spdk_thread_get_by_id function to use thread->id to get thread point, if the id value is invaild, just return NULL before search from g_threads tailq.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Ic6c35d2c2b5093c9b513618742b8b9835599ba63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5031
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The allocated size of buf is too large,i.e., 4096. And we will
have host to be assigned with buf, host = buf. But the tmp_buf (destination)
buffer is not so big. So restrict the buf size and make the vagrant happy.
The max size of conn->target_addr is MAX_TARGET_ADDR, so add additional 2 is enough
according the format to print.
The warning is:
/home/vagrant/spdk_repo/spdk/lib/iscsi/tgt_node.c:377:47: warning: ‘%s’ directive output may be
truncated writing up to 4095 bytes into a region of size 301 [-Wformat-truncation=]
00:03:02.381 377 | snprintf(tmp_buf, len + 1, "TargetAddress=%s:%s,%d", host, p->port, pg->tag);
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ib64e7140d5e14909d2a86dd2d47413abe5cd027e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5092
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Remove linkbreak related code that is not being used anywhere.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I8ab2a8337fd5615bdb75744a7abcd28ec3d41f2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4977
Community-CI: Broadcom CI
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This test script is based around only a strict
subset of the SPDK configuration options. If we don't
clean before building, we could still have libraries
in build/lib from previous tests that the external_code
Makefiles do not account for when linking libspdk.so,
which will include *all* libraries in build/lib.
Fixes issue #1662.
Fixes issue #1665.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I525ea1740313048fc44f26b5b0db9ab38161725e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4970
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Our check_so_deps.sh test script removes the spdk.lib_deps.mk
include from spdk.lib.mk so that we can check which symbols
the libraries depend on. But modifying the code like this
is a bit kludgy. So instead add a Makefile variable that
check_so_deps.sh can set to get the same behavior.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5622f4c3adb2d5ccd5ae33cb4cd116716134a9b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4512
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
When use newwin or new_panel function, the return value maybe NULL. Check the return value before use it will be more safe.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: linfeilong <linfeilong@huawei.com>
Signed-off-by: liuzhqiang <liuzhiqiang26@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: Ifef8ed91b778cc4577cec1834f6596c58643e5c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5050
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We don't use this script to create qcow2 images for our tests in CI.
Also this script is using random vagrant box images, and we don't know
what is inside them.
Script maintenance is a tedious affair because fedora boxes use xfs file
system, and we can not shrink them virtual disk to minimal size, and this
will caused fails in tests in future.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I7b35f16bbfd6135377995f7b20e1402d14b2b1b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4738
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Added asynchronous event notices for discovery log change
as per nvme fabrics spec 1.1. This allows a host with persistent
connection to discovery controller to automatically connect to any
new subsystem available to the host automatically.
According to nvme fabrics spec 1.1, if the connect command specifies a
non-zero keep alive timer value and the discovery controller does not
support asynchronous events then we need to return Connect Invalid.
Since SPDK does not implement this check instead added support
for asynchronous events in discovery controller.
Change-Id: I4cade5f7d24826ce97a2fa2b4ca688a1d728c1db
Signed-off-by: Madhu Adav MJ <madhu.adav@flipkart.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
This patch adds the support for long text response.
Change-Id: I8ef146069c9b8d86eb6df4c9e60cc6a3b2ff1ad7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4993
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Section 7.9 of the NVMe spec says that all nqns must
start with "nqn.".
Fixes issue #1669.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7fd0e6a0a397e831c4fa2377126b6b1e1b127d88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5017
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This change removes the necessity to get nvme_bdev_ctrlr by calling
nvme_bdev_ctrlr_get_by_name() and simplifies the code.
bdev_nvme_reset() checks if nvme_bdev_ctrlr->destruct is false first.
Hence we will not degrade stability.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7a3baab666644c3063af404905284c3e16bc62ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4843
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
OCF metadata updater is handling all the requests at once and when
it finishes the cache can deinitialize, so in the rare circumstances
when the thread is not aware of cache not existing any more, there
is another metadata kick request and check for the random pointer
is performed instead of expected cache.
The solution is to increase/decrease cache ref count prior sending
a message to a thread and after metadata has been updated.
Fixes#1533
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I77d2ae400110fcb4d491350e5fec334245f4bb90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5030
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
When call _free_thread in the exit process, print poller type information to identify which type poller is not free.
Even if the fuction spdk_poller_register_named called, we don't konw what type the poller is.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: I43f8d51b08a01169d418e6a6a46266887f9a85dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Calling spdk_nvme_ns_get_data(ns) on an inactive namespace will crash.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib8cfa84e785a4a04dc3b1826c700a22eeec51e3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
clang-9 is a bit more onerous on stubs required in
the unit test file. app_ut specifically needs
spdk_reactors_init and spdk_reactors_fini added.
Fixes issue #1613.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa219829e933405ddb662f5b991204ef05b3bd75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
When user used CUSTOM transport, follow this step can reproduce:
1. run ./nvmf_tgt
2. ./rpc.py nvmf_create_transport -t ABC (ABC is the transport name)
3. ./rpc.py save_config >> config.json
Then in config.json :
{
"subsystem": "nvmf",
...
"config": [
{
"method": "nvmf_create_transport",
"params": {
"trtype": "CUSTOM",
...
}
]
}
trtype should be ABC , because nvmf_create_transport need pass
the transport name to create transport.
Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: Iaf24837b649a1736568902f898d48135dac0882d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4973
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Also, disable docs building since it fails on newer GCCs (>=10).
Last but not least, move all the -Wno-error flags to a separate
array to make code a bit clearer.
Change-Id: Ieb6d30778140c745a8c9f0ccd83bf4acd3a0acd5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5004
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is done to avoid conflicting parameters being passed to
./configure via get_config_params(). Originally, if all previous
conditions were met, get_config_params() would return "--with-reduce"
in the string. ./configure would lookup the NASM version on its own
and disable the --with-reduce and --with-isal parameters. However,
--with-reduce would be set again by ./configure while looking up
the cmdline. This would end up with --with-reduce and --without-isal
being set together, failing the configuration.
Change-Id: I81fa1dfd4bc5b41b82525e911b1c75fc7e15fd14
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5003
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It could potentially override cmp binary, causing failures in some
of the tests.
Change-Id: Ia0bd88222c60e5b8a13d3809a6213b457b887b41
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5005
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>