Fio 3.19 fails to build with Clang 11 because of
implicit-const-int-float-conversion error.
Disable -Werror checking for now.
Fixes#1848
Change-Id: I0f3922d7af412de35d9f79f3f5413af146996bf3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When a request is submitted, it may have incorrect iov
alignment that doesn't fit PRP requirements. In the
current version an internal function fails such a request
and returns a NULL pointer. This is mapped to -ENOMEM
error which is returned to generic bdev layer where
such a request is queued in a "nomem_io" queue and
later can be resubmitted. That is incorrect and such
a request must be completed immediately. To fail the
request, we need to differentiate between -ENOMEM and
other cases, so we pass a pointer to a result to
local nvme functions
Change-Id: I7120d49114d801497a71fca5a23b172732d088de
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7036
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This function will be used the next patch, current
behaviour remains unchanged
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie74c7395f67a08b0cac018eb5114f358a6b583cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7092
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Also, create a common dir which will hold symlinks to all existing
plugins used in the tests. Location of the actual lib is not changed
so the relation to the given test suite is clearly preserved.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icb70bbc61fbfa3325a357d5dd93f554ff132a3b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7146
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Put plugin parser into a separate function and use it to additionally
parse arguments passed to rpc.py via stdin.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I170d762ed9f5483d92b298f4804ee4e9f227a751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7145
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This allows to pass to rpc_cmd() sets of commands via stdin. E.g.:
rpc_cmd <<-CMDS
bdev_malloc_create -b Malloc0 32 512
bdev_malloc_create -b Malloc1 32 512
bdev_malloc_create -b Malloc2 32 512
CMDS
Since rpc.py is already running in a server mode, this is slightly
faster than grouping commands and running scripts/rpc.py directly.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I29fbcf3f2751400980d35b4de2cce2da1cd2bf2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Unittest job is now split into three smaller jobs, each of them
requires unit tests to be built.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ibc0dfbf6f7395a9dfe23242b532fb5cb1f8dd8f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6839
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This particular version reports plenty of false positives causing the
test to fail. Example:
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ctrlr_alloc_io_qpair()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ctrlr_get_ns()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_read()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_readv()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_read_with_md()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_write()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_writev()\ilinebr' not found
This is potentially a regression in caused by the following issue:
https://github.com/doxygen/doxygen/issues/7948
The above seems to be resolved in latest releases, however, until
they are shipped as part of distros we support, similar mitigation is
in order.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1e39c94f9f388de99e1106bcf15750e4b39384e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7160
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Next step would be to upgrade the entire Doxyfile to meet the new
specs. For now, prevent doxygen from generating warnings about
these opts.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I2761675a435beb49abede89bc520c12a2cdc2dff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7134
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
For some reason, newer versions of doxygen started to complain about
the following:
warning: multiple use of section label 'index' for main page
To mitigate, use alternative name for the label.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6387a7c644c6626dd646c9fdd0e9ed1d430881f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7132
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
The -p option was removed a while ago, all CUSE devices
are automatically created under /dev/spdk now.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iffc55e98957d5224bf15a435100610ce5a3cfb28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7152
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Moved the subsections on configuring SPDK's NVMe-oF target to be under
the appropriate section instead of being attached to the one on FC
transport support.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I56070fa7aec00b96b2c34cfa6f5ec0d64fd0aee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6773
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The max_io_size transport option should be a power of 2 and be >= 8KB.
Max data tranfer size is defined in NVMe-oF spec as 2^(mdts cmd field) * 4KB.
Mdts cmd field is calculated as spdk_u32log2(transport->opts.max_io_size / 4096),
so max_io_size < 8KB results in mdts=0, which means no size limit (according to spec).
User can set max_io_size = 0 explicitly to allow no size limit.
Signed-off-by: Maciej Szulik <maciej.szulik@intel.com>
Change-Id: Id88a77efce5f217e1fc7750f61c0bd330aaa3791
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6384
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ie436a4f02f774ec9128e6e0a0b3c6639d427d5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7103
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
The dbdf format is xxxx:xx:xx.x and with the wrong
format the rte_devargs_parse always fails.
Change-Id: Ia34bc5e68f6401bb25907d5d07c65636b4f491b5
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7140
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
We can send a message to repeat subsystem pause
and free a context that will be used later
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ia5e8b0ff43f5e38bd8e659a8a64d42926e1d3c6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6661
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
This is done in preparation for the RPM tests.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I93cd0d3d7ddeff54387e2a270e9713b2415845b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7142
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Optargs are missed about -G and -T
which are used to trace and debug.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I3624b80f52c1b603acf1bc96126b73d1042f1b34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
With this change, each polling group will use one
accel_engine channel. This change will be more suitable
to utlize the underlying accelerated device.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ibab183a1f65baff7e58529ee05e96b1b04731285
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7055
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: Aleksey Marchuk <alexeymar@mellanox.com>
Actually we already do this when removeing a memory region, but
the check for it is too strict, we should unmap queue pairs when
the queue pair is in the memory region.
Change-Id: Ia646a0255e32ecdd0a70537a8011ce622eb59195
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6861
Community-CI: Broadcom CI
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: Ben Walker <benjamin.walker@intel.com>
The error response should be processed at the beginning of this
function.
Change-Id: Id583951c82981cf58984ab68b23ad6f7ea80cd3f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6859
Community-CI: Broadcom CI
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When starting VM, there are error logs such as:
vfio_user.c: 510:acq_map: *ERROR*: Map ACQ failed, ACQ 3ffde000, errno -1
vfio_user.c:1043:map_admin_queue: *ERROR*: /var/run/muser/domain/muser1/1: failed to map CQ0: -1
vfio_user.c:1103:memory_region_add_cb: *NOTICE*: Failed to map SQID 1 0x3ffd8000-0x3ffdc000, will try again in next poll
This isn't the error case, because when the Guest memory hot add/remove from QEMU, vfio-user
target will stop and unmap all queue pairs and remap them again, so let's use a more friendly
log instead.
Also use a notice log when adding listener.
Change-Id: Iaa4dc29e02523b5e85ec716d200ec355f8a575ed
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6650
Community-CI: Broadcom CI
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We only need to create an empty directory for vfio-user device,
the softlink isn't required anymore, so remove it.
Change-Id: Ie3f9ce73d287be3651f4ac06483888ac0f693700
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6954
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The following changes will require nvme_bdev_ctrlr_create() to be
asynchronous. As a preparation, merge nvme_ctrlr_populate_namespaces()
and populate_namespaces_cb() into nvme_bdev_ctrlr_create().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I623f927da072d746b4bd83314c0f5bcb9cc34ef0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7043
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@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>
This will reduce the size of the following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I81d7c90d8676a42aff3ffe73932d5612642a4114
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7042
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@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>
Factor out the operation to destroy qpair into a helper function
bdev_nvme_destroy_qpair().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5ac9215407e0b4f4368a68bc58d8e3daac029393
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6783
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@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>
Pass nvme_bdev_ctrlr to callback to each spdk_for_each_channel() call
in reset processing.
The following patches will register nvme_bdev_subsystem instead of
nvme_bdev_ctrlr as io_device. Hence we need a different way to pass
nvme_bdev_ctrlr to the completion functions of spdk_for_each_channel().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ief31dbbc145b5850e4e5b2e4c9ad7287128ce870
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6950
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Hold the bdev_io which submits the reset request into the nvme_bdev_ctrlr.
as reset_bio. Then differentiate the callback function between
_bdev_nvme_complete_pending_resets() and _bdev_nvme_abort_pending_resets()
to spdk_for_each_channel() in _bdev_nvme_reset_complete().
The next patch will pass nvme_bdev_ctrlr to for_each_channel() instead.
The following patches will register nvme_bdev_subsystem instead of
nvme_bdev_ctrlr as io_device. Hence we need a different way to pass
nvme_bdev_ctrlr to the completion functions of spdk_for_each_channel().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7a3386815429e8ed44f4e9e5365a21bd97e7fb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6913
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@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>
The API spdk_nvme_ctrlr_free_io_qpair() returns immediately if the
passed qpair is NULL, but calling spdk_nvme_ctrlr_free_io_qpair()
with NULL should be avoided.
This patch cleans up the code to ensure that nvme_ch->qpair is NULL if
disconnected and spdk_nvme_ctrlr_free_io_qpair() is called only if
nvme_ch->qpair is not NULL.
Then add a test scenario that two reset requests were submitted
simultaneously and the first reset request failed and then the second
reset request also failed. This verifies the refactoring done in the
next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iae461f7f826b0e1a4607a17e528c04a642242d6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7041
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add support for zoned namespaces in the bdev/nvme module.
Query the namespace type, and if a zoned namespace is found, set the
bdev struct members needed by the bdev_zone.h APIs.
Note that while vbdev_zone_block and bdev_ocssd have zone locks,
bdev/nvme does not need any kind of zone lock, because NVMe ZNS
supports append natively.
The whole point of the zone append command is that you don't need any
locks, even when having multiple writers, since the drive will return
back the Assigned LBA where the blocks were actually written.
If a SPDK application will utilize writes instead of zone appends,
the SPDK application itself will need a per zone lock in order to
make sure that there is only one outstanding write.
Adding zone locks in bdev/nvme would reduce the performance of zone
appends, for no reason at all.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ibacdb9b6e839624aba869c9949231343db5914be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6911
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Add support in bdev_zone.h for getting the maximum zone append data
transfer size.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I61203e64d51601232c6578a090fa52975364c1f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6910
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
spdk_nvme_zns_report_zones() is implemented using
nvme_allocate_request_user_copy(), which under the hood will do
a spdk_zmalloc() with the SPDK_MALLOC_DMA flag set, and will copy
over the result to our buffer.
Therefore, it is redundant for us to use spdk_dma_zmalloc(),
because it will cause us to allocate twice the amount of memory
from the precious DMA pool than needed.
Changing this zone report buffer allocation to a calloc also
has the benefit of making the code uniform with all other
spdk_nvme_zns_report_zones() call sites in the SPDK codebase.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia354fa51c66ae07a38a9a57b07c15d145dd609f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7005
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When support for printing the zone report was added,
the zone report buffer was allocated using calloc().
This was intentionally changed to a malloc in commit
5ef79a17ec ("examples/nvme/identify: add an option to dump
the full zns zone report").
While we shouldn't need to zero the buffer, since the drive
should write the "Number of Zones" field in zone report header,
and we should never read zone descriptors beyond this value,
the ZNS spec also states that reading beyond the last zone
descriptor has undefined results.
Considering that "Number of Zones" field in the zone report
header will only represent the number of zone descriptors
in the buffer when the partial bit was set to true,
always use calloc(), to avoid the chance that someone might
copy this code and call spdk_nvme_zns_report_zones() with the
partial bit set to false.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia39c5235aa5c62a4ec42285f53f4bc80f7ec370f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7004
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
If the bdev is a zoned bdev, reset zone 0 (containing offset 0),
before doing the "Hello world!" write to offset 0.
This is done to ensure that the write pointer for the first zone
is at offset 0.
If we don't do a zone reset before doing the write, the write
would fail if there already were data written to the first zone.
(E.g. if the user ran the hello_bdev example twice.)
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52b6fc9cf6e86fef9aeb19482eafd1f857ba1478
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6943
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Currently there is possibility of adding a sock to pending_recv
list again if sock->pending_recv is true. Check if flag is false
before adding to the list.
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: Ie23e1e8dbe1aa5594d9ddea30e7f235e3bf8ddad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6381
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Add CHANGELOG entry for
(f3fd56fc)lib/iscsi: return immediately from iscsi_parse_params if len is 0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I96500e26dba231b4e5d60ae8f95011b071a78cd0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>