Add the CRC function at the framework level and implement the
software engine back end to use ISAL. The patch series will continue
to include an option for accel_perf to test CRC as well as IDXD
implementation.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4eff3bbcf98c0bc2928a48272a57031c8b96394e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2072
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The pipe buffer gives about 19% randwrite and 56% randread
performance boost on arm64 from my test. We can also enable it on
arm64.
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Iff4c6eaffb4ec5ae8fe02b35f72aed7f6b272bb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change OCF logger callback to
use spdk_vlog interface,
instead of manually deciding log level and
printing messages to a FILE.
This allows user to modify logging preferences
for OCF without modifying our OCF code.
Change-Id: Ibe526c97965acb9a5e9816446354e3a200d0cc31
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1947
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Purpose: To disabled the zero copy support if IP is configured on a loopback
device.
To address issue: https://github.com/spdk/spdk/issues/1340
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia337f108851653c60d259328b6fefd4ba1e3d654
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2372
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Put clear behavior of setting flags to funtion vbdev_ocf_mngt_exit.
No need to add an extra funtion any more, so remove it.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Icb5b569ada597b4896523c95ba19abae3f064f4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2384
Community-CI: Mellanox Build Bot
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>
These two infologs we using the wrong log flag.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1e531a2c7922468d4ad849badd750e3acbede678
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2290
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Put these exit behaviors into one function.
Make this more readable.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ifd7a74910847dffd3d8c6c6db61e6e1fc7a8d779
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2283
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
The spdk_opal_supported() is redundant with spdk_opal_dev_construct(),
because we only return the spdk_opal_dev structure when the drive
can support OPAL feature.
Change-Id: I2a8b70aa92828cf60d168dcf2985759e0eb9a6e3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2217
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>
Prior to adding more operations, make this more efficient.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ief65d7b18de8c06263ed3cffb293f2824e2b86cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2070
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Add both the plumbing in the engine to call module entry
points if they exist as well as the json write config
for idxd (the only module with config info at this time).
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I91376d3fc60227cd79fae17b164722619eafb9e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2052
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This was added before the usage of having a SW engine and 2 HW
engines was fully thought out. The current rules are:
* if no HW engine specific enable RPC is sent, use SW
* if a HW engine specific enable RPC is sent, use it
* If a 2nd HW engine specific enable RPC is sent, ignore
In this scheme there's no need for an RPC that lets the user
choose which engine to use because they already do so when
they enable an engine.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I006ffb3b417f1e93bb061b29535d157ba66f03b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2033
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>
Purpose: This can improve the performance.
Change-Id: I3f5526ab8716cb0771b5e193afa9a0dbffec5cc0
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1929
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch also implements the new API for the 3 existing engines.
There was also some minor clean in one file, moving a function to
eliminate multiple forward declarations (there would have been
another one with this new API).
The next patch will use this API in the accel perf tool.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4ebc9cb3d1c588919235b5080cbeec29189efa21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2025
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We should add the cancel task feature in uring if
sock is removed from the group.
This issue is detected after the group polling
feature is added in NVMe tcp initiatator side. Before
the patch, SPDK NVMe initiator side will not use
group polling feature. After the group polling
feature added in the iniatiator side, we should add this
patch.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I012b403a9f57a5a8ee96c83471b775f0d99b9eb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2049
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>
Purpose: prepare for the next patch
Change-Id: Iae6a3d7a2c90a78c7dd1e510e718e4e1c07b3f32
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2048
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Port the similiar code from posix sock module if a sock
is removed and added to a new group.
Change-Id: I306bed3c90f79ee06a363fbab02c776e756cda2f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2047
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
IO device "bdev_nvme_poll_groups" is not unregistered in the finish
module, so we need to unregister this io device, since the "nvme_if"
is staic variable in bdev_nvme.c, it's can't be accessed in common.c
so we use "g_nvme_bdev_ctrlrs" instead.
Change-Id: Id4675f5acc8f386609903497da5ca84bf8af3a15
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2035
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Purpose: To set the priority of the NVMe-oF connection especially
for TCP connection.
For example, the previous example can be:
trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420
With the change, it could be:
trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420 priority:2
The priority is optional. We try to change
spdk_nvme_transport_id but not in spdk_nvme_ctrlr_opts since
the opts in spdk_nvme_ctrlr_opts will reflect in every nvme ctrlr,
this is short of flexibility.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I1ba364c714a95f2dbeab2b3fcc832b0222b48a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1875
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Purpose: This is used to make users can specify
some options on the socket, e.g., the different priority for the socket.
While creating sockets, the priority needs to be set before connect()
and listen system calls, so better to add one parameter in spdk_sock_opts
which can contain options (e.g., priority) in spdk_sock_listen_ext and
spdk_sock_connect_ext functions.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I406238e9da7abd69f937b7072535a19124ed0169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1874
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Last and only usage of struct lvol_task was removed in
previous patch.
Since it is no longer used, remove the structure itself.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3612106de2ab3a9197245de078c73c53beeff443
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1971
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: Ben Walker <benjamin.walker@intel.com>
There is no point in setting this value on submission
and changing it on callback.
Since it is based on blob bserrno.
lvol_task is removed in next patch.
This change was motivated by lvol_op_comp() accessing
the task->status pointer on hot path for I/O.
There is no need to do so, so just pass status.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I17461fcf355f771f4de4e6d5ec1900d5042bd3d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1804
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>
This is always going to be true because of the
context we are in when calling this function, but
add an assert just to be safe.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifbd075865a191529eb9e656c360f182dba8a85bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1985
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In practice, the reactor pointers will never be NULL
in these cases, but some static analysis tools don't
realize that.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0657959e5572df2741398b179907f2bbf0b02b3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
This patch adjusts several return codes to provide
more than just -1.
Along with fix to json rpc error print,
where negative error code was passed to spdk_strerror().
Resulting in unkown error being reported.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I254f6d716d0ce587f88cc658163ba049378f3b2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1915
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This was changed to better facilitate thread safety.
In next patch a lock will be held when going over the
cuse devices list.
Now user is expected to pass a buffer of a sufficient size
that will be filled with ctrlr or ns cuse device name.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3202ef285e427111e3595389619463fda58dbef6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1978
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Unregistering nvme_cuse when the device did not exist
resulted in SEGFAULT within nvme_io_msg_ctrlr_unregister().
To prevent that, when no nvme_cuse is registered for the
ctrlr do not unregister nvme_io_msg_producer.
RPC and spdk_nvme_cuse_unregister() now return an error.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id77cebe23ff91023a24cfe091f5f62a76a9175fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1921
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Docs, RPC, unit tests, etc., will follow. Notes:
* The current implementation will only work with VFIO.
* The current implementation supports only the existing accel
framework API. The API will be expanded for DSA exclusive features
in a subsequent patch.
* SW is required to manage flow control, to not over-run the work queues.
This is provided in the accel plug-in module. The upper layers use public
API to manage this.
* As we need to support any number of channels (we can't limit ourselves
to the number of work queues) we need to dynamically size/resize our
per channel descriptor rings based on the number of current channels. This
is done from upper layers via public API into the lib.
* As channels are created, the total number of work queue slots is divided
across the channels evenly. Same thing when they are destroyed, remaining
channels will see the ring sizes increase. This is done from upper layers
via public API into the lib.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifaa39935107206a2d990cec992854675e5502057
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1722
Community-CI: Mellanox Build Bot
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This allows us to hide the implementations of
g_subsystems and s_subsystems_deps within the
libraries themselves.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I60716b9465b58d6cdb3a43262a7ded844bd80eda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1786
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: Aleksey Marchuk <alexeymar@mellanox.com>
This is part of a larger effort to remove the g_subsystems and
g_subsystems_deps variables from the spdk_event map file. The
implementation of those variables should be internal to the
library.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3c2c04933859c6c484a903e666df10f810b26709
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1785
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Also, increment the library version since some non-public symbols have been removed.
Please note, SPDK_LOG_BLOBFS is included in the map file because it is used by the
blobfs_bdev module.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib05c0b6630951d97b1a5b2931746471eeb9d9630
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1702
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@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>
All of the error cases for spdk_nvme_transport_id_parse_trtype
were covered earlier, so just make this an assert.
fix kw warning 12653.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If0eea934764b35d097887b98b0441ae5d7dd3e4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1953
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: Aleksey Marchuk <alexeymar@mellanox.com>
With the advent of custom transports, it is impossible
for this call to fail.
fix kw warning #12653
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib1f9d0992e2def9eafd8696310b6c79ab6ac8c78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1952
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Since the related feature is already contained in
spdk_sock_listen and spdk_sock_connect functions,
we no longer need this function.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1eafff0d139fa266a355fbee2bf0fc3947db69fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1876
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Do large reads from the socket and buffer into a pipe.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ibce74917a1cd7248ff1a325204c0d338cc6a3470
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1349
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: Ben Walker <benjamin.walker@intel.com>
New OCF version is ready, so update our submodule.
There were a lot of API changes so
we need to adjust our bdev/ocf and lib/ocf_env code.
Description of code changes:
- env: added small functions like ENV_BUILD_BUG_ON, env_vzalloc_flags
- env: added "destroy" method for all locks
- env: added "execution context" interface
- cache/core "id" field made private
- signature of "ocf_io_configure" changed
- "io->volume" field made private
List of changes to OCF is available at
https://github.com/Open-CAS/ocf/releases
But no new features were implemented for our
OCF module since 19.6
Change-Id: I1ac2b6db0aad2a9840e4fa73d65608c5638fcb23
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1801
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
I reversed the arguments to abidiff when I first submitted
this test which was causing additions to be reported as removals
and vice versa.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iac50243f7cda7c1f9c2302af13a34eca844e0689
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1705
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We will be create fine name for each poller but it will need large
effort. Replacing spdk_poller_register by the macro SPDK_POLLER_REGISTER
will provide better name than function address with minimum effort.
Following patches may improve function name for clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If862a274c5879065c3f7cb04dcb5ca7844523e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1781
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Community-CI: Broadcom CI
Cache the return value of spdk_io_channel_get_thread() to orig_thread
and use it in the function. This will clarify the logic and improve
readability a little by reducing line length. Besides, in
vbdev_compress_submit_request(), spdk_io_channel_get_thread() can be
replaced by spdk_get_thread() and do the replacement in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0fadb5dae9b78ecade99c5deb650849bf6257ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Previously only bdev_close() had been ensured to execute on the
correct thread.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie3019bd1206060a86ec3c598795255c4c4357b0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1696
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Not only bdev_close() but also TAILQ_REMOVE and bdev_module_release_bdev()
are better to be executed on the correct thread for
vbdev_compress_destruct_cb().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0810ecc4149747315e6ec290437ba40fb4b71686
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1694
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
vbdev_reduce_init_cb() had ensured only closing bdev was done on
the correct thread. I/O channel should have been released on the
same thread.
Fix this potential issue. reduce_errno and vol cannot be passed
through message because message can have a single parameter.
So set vol before sending message and use vol as reduce_errno.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I923a9e3148db0f5413a6903d62f869eec122dcca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1693
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Factor out setup source and destination mbufs operation from
_comppress_operation() into a helper function _setup_compress_mbufs().
Setup source mbufs and setup destination mbufs are identical except
for total_length, and so this refactorinng is possible.
This refactoring will improve readability and clarify the logic
a little.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0a230c2d5e74aec917580aae969b49266178191
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1683
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This request was getting leaked previously.
Change-Id: I6e7dc24c92d7bae7a8df54025d61eb391a569df9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1591
Community-CI: Broadcom CI
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>
If thread A is the first to grab a channel, the poller will be on thread
A. But then if the shutdown happens such that thread B is the final
channel to release it's channel, it will attempt to free the lun poller
from thread B and crash.
Change-Id: I354f9f28d55e5e82cb6c737c734acadbd80e283d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1590
Community-CI: Broadcom CI
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>
Save cache device name in metadata section to
check if names agree during auto creation on examine.
This change prevents accidental creation of ocf devices.
Consider example in which vbdev_split is used as cache:
1) bdev_malloc_create -b Malloc0 ...
2) bdev_malloc_create -b Malloc1 ...
3) bdev_nvme_attach_controller -b nvme ...
4) bdev_split_create nvme 2
5) bdev_ocf_create ocf0 wt nvmen1p0 Malloc0
6) bdev_ocf_create ocf1 wt nvmen1p1 Malloc1
7) *shutdown*
8) *startup*
9) bdev_nvme_attach_controller -b nvme
Now ocf0 bdev gets created with cache = nvmen1 (not nvmen1p0)!
This is because nvmen1 and nvmen1p0 have the same metadata.
The result is rather unexpected,
so we would like to verify that cache device
is the one used during creation.
Name is not an ideal way to verify that,
but it should work for most cases.
This change is related to issue #1320
Change-Id: I19ce97163090c5c5b3324eaed90b3134011bb3fb
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1544
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Currently run count of poller has been incremented per execution.
It will be helpful for us to know how poller is busy by adding busy
count which is incremented only when some work is done.
spdk_thread_poll() has used the same timestamp in it, and so this is
the maximum we can do for now.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0adfbf9a62c959499978124ecc97d377c96c3769
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1713
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>
When the socket is migrated from one polling group to another
(e.g., iSCSI target example), we should add it into pending_recv_list
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I56d34000344ae452a25b82952c831f09e0266d66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1448
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>
Following the idea of thread CPU stats, add reactor CPU stats.
Reactor CPU stats accumulates run time of spdk_thread_poll() calls
to idle TSC or busy TSC according to their return codes.
Add necessary unit tests.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1a1391e79d74387c68f1651a61c8900e4c6faf66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1501
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: Ben Walker <benjamin.walker@intel.com>
The code used to do this but it was removed when the buffering was
shifted down to the posix layer. Add a way for users of sockets
to still properly size the buffers.
This also means that by default, the receive buffering is not enabled
on sockets. That matches the behavior of the previous release.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I20ce875be2efd841fe3a900047b4655a317d7799
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1560
Community-CI: Broadcom CI
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>
This change is aimed at fixing github issue #1312 where we are
apparently calling the nvme_bdev_ctrlr_destruct function more than
once.
In the previous implementation, if a controller was resetting for more than
one iteration of the poller, a second iteration of the poller would get
registered.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ica01ecb21d76ea4f60624efd780bf4eea957c277
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1611
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reorder vbdev_redoce_load_cb() so that normal case comes first,
orphaned case comes second, and other error cases come at last.
This will simplify the code and improve readability a little.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieb79364f0b3996600e8ff7ec340101877527cac2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1477
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Move queue insertion to the end to avoid removal in error cases.
spdk_bdev_module_examine_done() is duplicated with the caller in
error cases and so remove it.
I/O channel is not got in this function and so remove
spdk_put_io_channel() in error cases.
move up spdk_bdev_close() to call at error_bdev_register or
error_claim label.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I34a1459dcb0d3e0a2018f5b50db5be3ac44b6049
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1469
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
In comp_bdev_ch_create_cb(), list head comp_bdev->pending_comp_ios and
comp_bdev->queued_comp_ops should be initialized only when
comp_bdev->ch_count is 0. Besides, extra brackets for if condition
can be removed.
In _comp_bdev_ch_destroy_cb(), comp_bdev->ch_count is not necessary
to check if it is 0 again.
Fix these.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I71786423a77819c41419c51a4cfcad71b85a0b39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1444
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When reduce volume is unloaded at compress bdev removal, the callback
to unload did not get base bdev's I/O channel on the same thread
that opened base bdev.
Hence spdk_put_io_channel() hit assert later.
This patch fixes the bug by sending message to get I/O channel.
Fixes issue #1307.
Besides, add assert to _delete_vol_unload_cb() to detect the unexpected
complex cases. Fix will be added later.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If4983c2e06d7b0b7618f38fb80f3aa73effe4b83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1426
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: Paul Luse <paul.e.luse@intel.com>
Introduce context structure to ensure the callback function to
bdev_compress_delete() runs on the original thread.
The time to free comp_bdev and the time to call the callback function
to bdev_compress_delete() are different. Hence it is necessary to
allocate context separately.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I534f5673b58d2a0321ee752534c3ea10fb37b11d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1472
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Commit 8c1d107 added a new erase API and renamed the original
API with "secure_" prefix according to the specification, as the
secure one will not cryptographically erase user data, due to
the limitation from the drive, only the secure API can be
supported, so changing the caller to use the original again.
Change-Id: I25cb054e728065d9ae9c6c30aa0ab374d60cf6f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1519
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>
The statement in line 1199 is may not be correct:
Actually, it should be following two cases
to pendinging_recv into false;
1 posck->recv_pipe == NULL
2 psock->recv_pipe != NULL & avalable_bytes == 0;
So this patch can fix this issue.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie612f781b0848e1f0ab1b48dc8c45e39862b772a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1446
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>