The only reason the qpair ever uses the port is to get to
the device attributes so skip the middle man.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib14a97ceaa0c49176027d6c35c5cb2787a845cc1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478961
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Here should add close(kickfd) and close(callfd) when abnornal
return of failed to send VHOST_USER_SET_VRING_ENABLE.
Do this as the same with upper abnormal return.
Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Ic61fc3f398f582f64da6b3f6ca7e237a3d411a8f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479123
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
Features are not saveable by the controller as indicated
by ONCS field of the Identify Controller data.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I7e5bc2c701f5857e2c1481e8370b070089f88111
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479128
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
UT also added for the block aligned write and verification
of the written data.
Change-Id: I8751f437c71dd7f3a4556fee420460d6dffdd4e5
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478424
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
It is useful to have sct and sc on request completion explicitly.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If429123589694ba36111330699fee22238f8a557
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478602
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
There are for loops to do these calculations for vhost session memory region.
we can inline these for both in vhost_session_mem_register and
vhost_session_mem_unregister.
It not only removed the duplicated codes but also reduced the stack consumption.
Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Idb9f5ea13e09aef6b24fa27a2bb809b15ece50e2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Ben Walker <benjamin.walker@intel.com>
Replace usage of fprintf(err, *MSG*) by SPDK_ERRLOG(*MSG*)
since in SPDK we always prefer later
Change-Id: I3e2b5c12caa572b32236f5ede01b754b2e1e2a53
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478940
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Always when creating a snapshot, new blob is created.
That blob is explcitly set as thin provisioned with size of
the original blob in _spdk_bs_snapshot_origblob_open_cpl().
Thus it should always contain empty cluster map,
as API user has to interaction with it yet.
As sanity check for debug builds, verification if all clusters
are 0's is added.
This empty cluster map is later swapped into the original blob
in _spdk_bs_snapshot_swap_cluster_maps().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4b935c0cf08917e9ad7b9bbedac4781890626eec
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478974
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Refactor blob loading when snapshot is present.
All paths now go through _spdk_blob_load_final().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifc927de6800501cdf62dba8d73e950af2a46d568
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Since all error paths for blob load are now the same,
they can go through common function to handle
freeing and calling the original cb.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib3afc7e62b6f9c872bb1d5f72ef61170aee966d7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479142
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Originally the code was suposed to determine if
loading the blob succeeded, based on passing the
cb_arg.
This breaks the logic of always getting the cb_arg in
cb_fn, and basing the success on bserrno.
In order to fix this, cb_fn always gets the passed
cb_arg. Meanwhile the cb_fn (_spdk_bs_open_blob_cpl(),
now checks the bserrno to determine failure.
In addition since _spdk_bs_open_blob() was the original
caller allocating the blob structure,
the _spdk_bs_open_blob_cpl() is now responsible for freeing it.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic7eb09f05e04b08dc54fc43243fd576f493cbeb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479141
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The sequence was saved into the load context much later
into the loading, instead of right when ctx is allocated.
This will come in handy in later patches that refer to
sequence earlier (in error paths).
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibe513dbd919f36874fcde763fc96d46973b60446
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479140
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Match DPDK's iova assignment strategy so there are never
any conflicts.
Change-Id: I3863487f9bd247c40edbf0d0d3a8c880bdad1708
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
spdk_reactor_enable_framework_monitor_context_switch and
spdk_reactor_framework_monitor_context_switch_enabled had been
a little long and not easy to get the meaning.
spdk_framework_enable_context_switch_monitor and
spdk_framework_context_switch_monitor_enabled will be a little
more concise, and hence change the names accordingly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f1d50e8b62846cbd0f91b94f94cbaf16fefa39b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Following the last patch, this is also a preparation to add
reactor_get_stats RPC.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I18c260bb10bdf1c7aa5e00aa81a171f2ff50c7d5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478026
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Following the last patch, this is also a preparation to add
reactor_get_stats RPC.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia6dc29f591f7112512be8a67b180b056150f467b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This API will be used in the upcoming reactor_get_stats RPC first.
This API is not public but internal in SPDK. Add necessary unit test
together.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I761ffe3c8d6d8da4594c0d728b479f9f40275fc9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Add check if reactor scheduled the thread to one of the allowed
cores correctly to _schedule_thread().
This check will be useful in the next patch and may be helpful
when we schedule SPDK thread dynamically.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibea8e8315187ae8a3a421007d8865bbee2d7e037
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478156
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Following the recent effort, use local instance of cpuset instead
of using cpuset pointer and allocating dynamically to it in
spdk_app_start(). This change will avoid potential out of memory
failure for application startup too.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I22b529da13e893db16296167f2d8d4c296dec31f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478580
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Following the recent effort and the last patch, allocate g_tmp_cpuset
statically in lib/vhost/vhost.c.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5ed6179f9d5942cd868be008c3be6c35d755b455
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478579
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Following the recent effort, allocate struct spdk_cpuset statically
for struct spdk_vhost_dev. In vhost_dev_register(), a dynamically
allocated cpumask had been set to spdk_vhost_dev, but change it
to spdk_cpuset_copy(). So use local cpuset instance in vhost_dev_register()
accordingly.
To reduce the size of patch, this patch doesn't include the change
for g_tmp_cpuset. This will be done by the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic97753d1f470cbfd9ae7fc7f2af8ced5a31c8477
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478578
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Minor optimisation done by code analysis, both cmd and dif are
overridden in TCP_REQUEST_STATE_NEW.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I6bae4ddae175035d029c0693f7e4351b95a296ab
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478604
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In the case of bdev initialization, the memory could
not be allocated. When cleaning up, it needs to check
whether the memory pointer is valid or not before
touching the address of the pointer.
This is to fix below issue:
https://github.com/spdk/spdk/issues/1126
Change-Id: Iec0e2c5a40ad153a96fb939414a15ac3b9112a01
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478849
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <box.b.chen@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The discovery target support the keep alive timeout so
it should also support the keep alive cmd.
Change-Id: I08bd3312c17962c97c96fdd1469246fe97d5e8e7
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478016
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This patch is for the vhost-blk live recovery feature
which can make spdk recover from crash or killing.
The relate rte_xx functions are in the the shared memory
protocol patches which have been merged in DPDK 19.11.
Change-Id: Ia0ac99f8ba0bd66dc9f525f2c72bd1de141ec596
Signed-off-by: Li Lin <lilin24@baidu.com>
Signed-off-by: Ni Xun <nixun@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471235
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Add the protocol_features in vdev. There are two features
would be used in vhost device one is the virtio_features
the other is the vhost-user protocol_features. For different
vhost device, the supported features are different so we can
separate them.
Another reason is that I tested the VHOST_USER_PROTOCOL_F_
INFLIGHT_SHMFD in vhost-scsi with QEMU(version:4.0) and found
that Qemu can not boot up. After investigating found that inflight
flag is negotiated but the Qemu doesn't support this feature
and in DPDK function it is handled as an error and disconnect
with Qemu. It's a bug in DPDK and will fix it.
Change-Id: I72e418cb1885bf7dcbd0285d9cec1ad6af0665de
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478814
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Recent effort to unify NVMe NQN length macro replaced
'FCNVME_ASSOC_HOSTNQN_LEN' with 'SPDK_NVME_NQN_FIELD_SIZE' in
include/spdk/nvmf_fc_spec.h. This change updates the downstream files
which are also affected by the change.
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I44e1de50067e11fabacbb69cf1c42331f3339bc8
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478769
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
In this case, we want to add --legacy-mem if it was
not already specified. This means we need to check
if strstr() returned NULL.
Reported-by: Alok Kataria <alok.kataria@nutanix.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib99dd015ce6e3ee824e4b543a8379d7291e2671e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478634
Reviewed-by: <alok.kataria@nutanix.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
The printed error message could be the folowing example.
Device 0000:00:04.0 is still attached at shutdown!
Device 0000:00:04.1 is still attached at shutdown!
Device 0000:00:04.2 is still attached at shutdown!
Device 0000:00:04.3 is still attached at shutdown!
Device 0000:00:04.4 is still attached at shutdown!
Device 0000:00:04.5 is still attached at shutdown!
Device 0000:00:04.6 is still attached at shutdown!
Device 0000:00:04.7 is still attached at shutdown!
Device 0000:80:04.0 is still attached at shutdown!
Device 0000:80:04.1 is still attached at shutdown!
Device 0000:80:04.2 is still attached at shutdown!
Device 0000:80:04.3 is still attached at shutdown!
Device 0000:80:04.4 is still attached at shutdown!
Device 0000:80:04.5 is still attached at shutdown!
Device 0000:80:04.6 is still attached at shutdown!
Device 0000:80:04.7 is still attached at shutdown!
I think this issue exists a long time in our CI pool.
And the root cause is: "spdk_pci_device_detach" function
is not called in "ioat_channel_destruct".
This patch should solve this issue.
Change-Id: I47b3f1104a407c5b8390c9389c2f231ae018d16a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478837
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is starting point for moving current FTL
implementation which is working on top of
Open Channel NVMe driver to work on top of
abstracted zoned bdev.
This patch is changing name of ftl_chunk structure
to ftl_zone and start using zone states from zdev
interface.
Change-Id: I5429f489cc08a1ac27f09aba3dca4b40ea95eeb3
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467391
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
For nvme Opal, most of the commands are a combination
of security send and receive. There are cases that
application send the security send command and is
shutdown before sending security receive command.
In these cases, when the application restarts, an opal
command will send security send command again and will
cause command sequence error.
Thus, we do a receive first and memset the response
buffer before security send and receive.
Change-Id: Iba02c8074457919816ca576cd00ef9eee6d6dadf
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472591
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It's not wrong, just to keep consistency with other functions.
So remove these.
Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I833211ea8ee6c6b02c874ea340a3f936a0c4c00f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478684
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The call to update_ibv_state could result in a segfault if the other
thread had already freed the qp and was just spinning on handling the
rdma event. By not updating the qpair state here, I don't think that we
lose any information about the qpair state. Especiallyy since just a
little bit later we update the qpair state to be in error.
There is nothing in the man pages about the cm events changing the ib
state although I imagine they are closely related. I just say that
because I believe that's why the update was originally in that spot.
fixes: GitHub issue #1110
Change-Id: I3f87ff009bc2019464ed7c6920dd71e2b286b3fd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477877
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It will be the expected behavior when the error message will
printed if we use asynchrounous I/O. And the real
error message for not getting the tcp_req is located in
spdk_nvmf_tcp_capsule_cmd_hdr_handle.
Change-Id: I1a608fbd3a04050eacb6cb68eafd50e5128925ab
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477872
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
nvme_rdma_register_rsps returned ENOMEM for all failure cases. All of
them are not directly related to shortage of memory. Every point of
failure now sets relevant return code.
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ia340f6c6fd3a68d8c34acfefc2c9224ffcdcad3f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477302
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
RDMA work requests generated between two calls to NVMe RDMA QP
processing function are chained into a list and then posted together
to a queue in next call to processing function.
Batching improves performance in scenarios with deep queues and heavy
load on CPU. But it may cause latency increase on smaller
loads. Batching is configurable with RPC methods and configuration file.
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I600bce78427eb7e8ed819bbbe523ad318e2da32b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462585
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
In some real data center deployments, 100ms is not enough. Increase
the timeout to 1 second.
Change-Id: I8195a1c1e987b7eff2d8541509f79381be32ed4b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478638
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In vhost-blk, choose supported features based on what
backend bdev supports instead of disabling not supported features.
This will prevent from enabling not supported feature in runtime.
Change-Id: Ie9453c7c02eb6d0a0ff0f1887048f4092cb7b14f
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476617
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Replace usage of rte_vhost_driver_enable_features() by
setting disabled_features field dynamically.
This patch doesn't change functionality, but simplifies
initialization and removes usage of socket operation.
Call to drive_enable_features() had to be done when
features field was static, but now it is mutable so
the call became redundant.
Change-Id: I6efc63883773e4ba6d931efd057a38a705c53217
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476616
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
This will enable us to make features dynamic, dependent on underlying
backend device, and to remove usage of rte_vhost functions in
vhost-blk implementation which will improve encapsulation
and enable us to write tests that use vhost-blk functions directly.
Dynamic features are used in vhost_blk, but backend structure is
assumed to be static, so we had to call
rte_vhost_driver_enable_features() after registering it with
some features initially disabled.
This patch moves feature fields to vdev structure where it
can be set dynamically.
Change-Id: Icd76bdd76a3d67ec74e0ac992d8da639beead593
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470460
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
These bdevs claim native support for zcopy operations. They should
actually support them when running on top of a bdev that claims zcopy
support.
For example, if you were to build a part or passthru bdev on top of a
malloc_bdev (which is just for testing primarily) and then try to run
bdevperf on top of that, you will currently get errors. This patch fixes
that problem.
Change-Id: I023557a3a5b1baf177cc29f1cbc1cd391cc67a8a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478243
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
struct spdk_cpuset has been declared in the header file and
so we can allocate struct spdk_cpuset statically. This change will
avoid potential out of memory failure for reactor too.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic5f4fdb493d73b4ae11cddd2638eeb84ebbb792e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478150
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
spdk_thread_poll returns only non-negative value now, and the return
code check is not reasonable now. For just in case we may want to add
assert(rc >= 0) but compiler gives warning because rc is not used anywhere.
So just remove checking return code check here.
We noticed first that spdk_thread_destroy was called without spdk_thread
exit but this change removes spdk_thread_destroy. So the issue is also
fixed together.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e7f5c09faf5eda68ea8d42320dbefdca88bbd21
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478237
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>
For the requests which don't have children requests, SPDK may queue them to
the queued_req list due to limited resources, in the completion path, we
may resubmit them to the controller. When the controller was removed
the submission path will return -ENXIO and we will free the requests directly,
so the callback will not be trigerred for these requests. Here we added a
flag to indicate the request is from queued_req list or not, so for the failure
submission, we can triger user's callback.
Fix issue #1097
Change-Id: I901ac81733c2319e540d24baf5b8faa1c649eb35
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477754
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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: Alexey Marchuk <alexeymar@mellanox.com>
Error log had been collected if PDU ref count went negative. However,
error log is not easy to notice. SPDK iSCSI target is more stable
than before and SPDK iSCSI task has such assert. Hence replace
error log by assert for PDU.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I28c4f5e29f0dfd72436b0131e09f9707822165fc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477630
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Followin the last patch, move iscsi_conn_abort_queued_datain_task()
and iscsi_conn_abort_queued_datain_tasks() from iscsi.c to conn.c.
Refine unit tests to check more accurately. Adding more test cases
will be done later.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30530e6871a78a58d9fb472f62168862298884a0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Treat active pollers similarly to timed ones and don't discard
unregistered poller's rc. This patch is basically a copy of 7d3d2b62e
but for active pollers.
Change-Id: Ia85e73a6736b2924601150f8e61995eb56009c15
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477252
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>
Added spdk_poller_(pause|resume) that allow a poller to be paused and
then resumed at a later point. These functions come in handy in cases
when a poller is known to be idle until a certain event occurs.
Change-Id: I7f21c80eb9ac4e8e1cf24d66f99da5687aafe358
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477920
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>