Commit Graph

13421 Commits

Author SHA1 Message Date
Jim Harris
7d6c341a59 sock: revert major rev to 4
This was accidentally bumped twice (3 to 4 to 5) since
v20.07 release.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5bda3349fa5c1fce37166fe4b640ff722bb7e3a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4421
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-28 08:31:48 +00:00
Ziye Yang
0903e14b05 nvmf/tcp: Change value of SPDK_NVMF_TCP_DEFAULT_MAX_SOCK_PRIORITY
It should be 16 but not 6. For example, it will have 16 priorities
when configuring ADQ with Intel's 100G NIC.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iebdf7b379c15f3b5fd16dba2ad87ec55af04577f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4235
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>
2020-09-28 08:30:50 +00:00
wanghailiangx
adb7cf05d3 test/deallocated : Fix memory leak about context.
Here code returns but context isn't freed.
And we can change to break here also.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I8f2173ae3599c13c99c7d70c19e2f8ce0c023f38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4396
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>
2020-09-28 08:30:38 +00:00
Michal Berger
b9ba32aa63 scripts/setup: Check if VMD controllers are allowed to be used
Recent refactors removed the behavior introduced with a6edaa9600.
Bring it back and don't try to rebind the VMD devices if they were
not explicitliy allowed in the setup.

Also, shuffle the code a bit and put verification pieces under one
block where $mode is being determined.

Change-Id: Ie2cc41e402f20147b98ab288d623ac76a4472839
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4398
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>
2020-09-28 08:30:24 +00:00
Jim Harris
ebc227d9b2 bdev: move bdev_rpc library contents
We have some RPCs defined in the bdev library itself,
others in a separate bdev_rpc library.  There's no need
for the separate library - just move them all into the
bdev library.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I298eedb88924197e64eb315369efb10f402903a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4364
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
73b483c6d2 event: move app_rpc contents
There is no need to have the application-level RPCs
defined separately from the event library itself
(which defines the application framework).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic264ed761f5ec1a40d604e63395c5740af4be1a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4363
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
2e31825512 event: move log_rpc contents to event library
The log_rpc library serves little (if any) use in
isolation.  It makes more sense to just include
this code in the event library.  The event library
already depends on and uses the log library, and it
is natural to just enable these RPCs directly in
that library instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie39b8598ce0c06729a13d188ce00da44a996accc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
de0e2297b2 log_rpc: move log_enable_timestamps definition
This RPC was originally put into the app_rpc library,
but the log_rpc library is a better home for it, since
other log-related RPCs are already there.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ba5ac6cdeb57fb4219244690590c8fabbc3f59a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
yidong0635
ee17068b88 nvme: fix a typo.
Meanwhile, to verify an issue about git push unittest failure.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idac60e5832390eb8bdce68aee639be2e9ac6cff6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4373
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:42:56 +00:00
Shuhei Matsumoto
583fa214a3 lib/nvme: Add two public APIs to get ANA group ID and ANA state of the namespace
Add spdk_nvme_ns_get_ana_group_id() and spdk_nvme_ns_get_ana_state()
to getthe ANA group ID and the ANA state of the given namespace,
respectively.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id5f1f7ee488a1eb2a7a77f9986a3bb89146628e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4354
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
cc2b6962f9 lib/nvme: Keep ANA state per namespace up-to-date
Add ana_state and ana_group_id to struct spdk_nvme_ns and keep
them up-to-date by updating when spdk_nvme_ctrlr is created or
ANA change notice is received asynchronously. For both cases,
struct spdk_nvme_ctrlr holds the latest ANA state.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I311fe1c8015c8b8ac9659c38661244706c04b3e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4287
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
3befb518b0 lib/nvme: Add an internal API nvme_ctrlr_parse_ana_log_page()
Add an internal API nvme_ctrlr_parse_ana_log_page() to parse an ANA
log page and execute the specified callback function for each
ANA group descriptor in the ANA log page.

We will be able to copy the ANA group descriptor to the caller instead.
To do that, we will need to inform the size of the descriptor first,
but the size will not be constant.

Passing parser to the API will be more convenient.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd8fda30a83965948017fb8ad992c0d889197cde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4279
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
a0befabdd4 lib/nvme: Controller holds the latest ANA log page
When creating a controller, allocate a buffer to the controller
and read ANA log page into the buffer.

When receiving ANA change notice, read ANA log page into the buffer
to keep the contents up to date.

The next patch will provide a public API to get the contents of
ANA log page the controller holds.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If5c653f4e80d157e5120bb754e6660250b2b8fa1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
06d25b7021 lib/nvme: Add an internal API nvme_wait_for_completion_robust_lock_timeout
Add an internal API nvme_wait_for_completion_robust_mutex_lock_timeout()
and related internal APIs just call it with adjusting parameters.

nvme_wait_for_completion_robust_lock_timeout() will be usable for
the current use cases of nvme_wait_for_completion_robust_lock() and
future use cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2b499643930256a39ebe279f56a399f20a7a2fde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4217
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: Changpeng Liu <changpeng.liu@intel.com>
2020-09-25 11:42:44 +00:00
Ben Walker
fcc187e3cf test/iscsi: In ip_migration.sh, don't pass -i to iscsi_tgt
The goal is to make each one start in a different shared memory
group, which is the default behavior. This test is very old and
may predate that being the default behavior.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id7bb38cf4f54e8844d5e76046a19c56003855519
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4298
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>
2020-09-25 11:30:09 +00:00
Ben Walker
5ebc93507b iscsi: Allocate connections array from regular memory
No longer required to allocate from shared memory. No tools
use this anymore.

This removes the final call to the event library from iscsi,
so we also drop that dependency.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I41a6877b782cb927d9ac7d206ccd36a8195efc42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4346
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>
2020-09-25 11:30:09 +00:00
Ben Walker
ed1b78529d iscsi_top: Convert to C99
This is already valid C, so compile it using the C compiler.

Change-Id: I5e7a7b0dfcbbe6402a1774fc2fcf53778355d3a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4345
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>
2020-09-25 11:30:09 +00:00
Ben Walker
1477d36597 iscsi_top: Get connection info using RPCs
Instead of relying on shared memory, just grab the connection info
using JSON-RPC.

Change-Id: I46843e9c77d0dcb0e0cbc7f805dee9fc13dc0ba5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4344
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>
2020-09-25 11:30:09 +00:00
Ben Walker
336157bb8f net: Remove the net_framework subsystem
This was not used by anything. It was intended for use by user-space
TCP stacks.

Change-Id: I416589e421784882c693bcc5b03fe1dbcc4b1bd3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4297
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:30:09 +00:00
Jim Harris
47c45d243a test: do not try to execute blob_ut if it doesn't exist
We do not compile blob_ut on systems with Cunit version
that is too old.  So modify unittest.sh for this case
specifically, so that users with an older Cunit version
can still run the rest of the unit tests.

Fixes issue #1601.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifd226a47a2ff712ad1f14fd12e1cb796e44be6b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4372
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:29:55 +00:00
Michal Berger
e1ac33d8b3 pkgdep/rhel: Ignore subscription-manager failures
It seems that RHEL systems can be actively used without an actual
subscription. Since we don't really want to bother with this side
of the system, simply ignore all subscription-manager's failures.

See https://github.com/spdk/spdk/issues/1542 as a reference.

Change-Id: I76a58cb38bb77b3b6deb12e0cc8ccca5f883d5a7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4360
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-25 11:29:05 +00:00
Michal Berger
0cd90081c0 pkgdep/rhel: Install yum-utils regardless of the $VERSION_ID
Also, put it on yum's cmdline separately since it doesn't really
belong to repos[] - it provides proper tooling not the actual repos.

Change-Id: I26c0c90b52f5b4fa914c116477092df525b4448f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4359
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>
2020-09-25 11:29:05 +00:00
Tomasz Zawadzki
0f06b929c9 test: do not skip check for building cuse/uring/fuse
Those modules are now enabled and tested on CI.
ABI reference build was updated to include those components.

Workarounds for blobfs_bdev can now be removed too.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4ef321dcb0ce80b13e856a1ca97ed072f7b5ddc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3747
Reviewed-by: Karol Latecki <karol.latecki@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>
2020-09-25 11:21:38 +00:00
GangCao
8dcdaafa89 App/spdk_lspci: add the nvme module for the lspci operation
This is to solve below issue:
https://github.com/spdk/spdk/issues/1574

Where the nvme driver is not registered and triggerred NULL
core dump.

Change-Id: Ia25d6f1a755737dcbb0b87e831a77ce7f7d515ed
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4352
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-24 09:44:16 +00:00
GangCao
6bc1f09f61 lib/nvmf: destroy the mutex properly
In the both normal and exceptional case, the mutex
will need to be destroyed.

Change-Id: I39c815f2adffbd3786b45a938c476dcbb66a438f
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4339
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-24 09:44:16 +00:00
Karol Latecki
fa1cfaa659 test/nvme_perf: print used bdev.conf
Print bdev.conf we're going to use in test
after generating it.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8b74b8afb9c4fca200b961d0d0d9818578ef1307
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Karol Latecki
bb54b617e2 test/nvme_perf: use polling for io_uring mode
Setting should be "-1" for polling, otherwise "0"
works as hybrid-polling.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5f1fb602f750162a7c164703859f2e74c9092146
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Jim Harris
acfb968aa8 bdev/nvme: avoid spdk_bdev_io_get_buf call when possible
The bdev layer nicely handles the case where we call this
function with the buffers already present - it just
immediately calls the get_buf_cb.  But this adds extra
overhead in the case where the buffer is already present.
Since nvme has no alignment restrictions, we can just
check the iovs directly and avoid the extra call to
spdk_bdev_io_get_buf when possible.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I66df0fde574a35e995a3432999d75bdbf9b27212
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4317
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-23 08:12:23 +00:00
Jin Yu
c1bfc56488 bdev: directly split io when split io get buf
Change-Id: I8f88a9794eff4c302de85d56da90319cf2cc2f47
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4243
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-09-23 08:12:16 +00:00
Ben Walker
aa6b6f081d thread: Update thread->last_tsc at the start of polling
It may have been a long time since the thread last executed
so ensure this time is accurate.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iaa4c35b50cdc05ebb41724ed9946c5232d242ee3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4321
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
c99e1d60d3 thread: Passing NULL to spdk_thread_get_last_tsc gets current thread
value

If the user passes NULL for the thread, just use the current thread
to get the last tsc.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1a2b61d9765e1ef59927ffec7c49f2a2b62590f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4320
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
7deedab66a bdev/nvme: For writes, if there is only one iov element call
write instead of writev

Call spdk_nvme_ns_cmd_write_with_md if there is only one iov element.
Use spdk_nvme_ns_cmd_writev_with_md only if there is more than one.

This is about a 15% improvement in I/Ops.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1a99b5507d37cde04e81feada65b14554ad01a17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
3870092dd1 bdev/nvme: For reads, if there is only one element in the iov don't use
readv API

It's cheaper to call spdk_nvme_ns_cmd_read_with_md than it is to call
spdk_nvme_ns_cmd_readv_with_md, so do a quick check of the iovcnt and
use the best one for the job.

This is about a 15% improvement in I/Ops.

Change-Id: I82e6677d1ac47abf9919f95e651e7a7595c5e9a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4316
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
85ddcf6f8d nvme/tcp: Clean up error message
Fix some spelling and make the message clearer

Change-Id: Ib291542a9735d6409db84f16c530e78567123f67
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-22 11:40:58 +00:00
Tomasz Zawadzki
35e54647fb intel-ipsec-mb: update submodule to v0.54
Updated required NASM version to 2.14,
since intel-ipsec-mb v0.54 now requires it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I10cee6aea941593b828a6a171297d7e997d0f30c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3868
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>
2020-09-22 11:40:50 +00:00
Darek Stojaczyk
30116833fa autobuild: add SPDK_TEST_NATIVE_DPDK to test again pristine DPDK master
This was previously done in a Jenkins script. Move it
to autobuild.sh inside the repo where we can all see it.
Use new meson/ninja build system while at it.

To test, use autorun.sh with the following cfg options:
SPDK_RUN_EXTERNAL_DPDK=/tmp/spdk/dpdk/build
SPDK_TEST_NATIVE_DPDK=1

SPDK_RUN_EXTERNAL_DPDK can point to a different path,
but needs to have correct access permissions for current
user,

I had to reorder some code in autobuild.sh. Since
SPDK_RUN_EXTERNAL_DPDK needs to specified the ./configure
script can't be run without existing dpdk directory,
so the dpdk build needs to happen before the initial
./configure as well as the ocf pre-build.

Change-Id: Ibc57094806b361dc3c6acf55942f04a938e5194f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/868
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:40:25 +00:00
Changpeng Liu
778e4c0020 nvmf: make nvmf_ctrlr_process_fabrics_cmd() as a static function
Unlike ADMIN and IO commands, the FABRIC command is only processed
in the ctrlr.c file.

Change-Id: Ic4e01c7f81c98631a2c7cb603343b301f8ba63e1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4307
Community-CI: Broadcom CI
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>
2020-09-22 11:40:18 +00:00
Maciej Wawryk
fa5801703c test/vm_setup: Enable noninteractive packages install in debian like os
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Idd43435d10ff54bb091a4a35cd0d803c7e62caf0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4278
Reviewed-by: Michal Berger <michalx.berger@intel.com>
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>
2020-09-22 11:40:08 +00:00
Maciej Wawryk
1c62e9f828 scripts/vagrant: Remove unused openstack stuff
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I92c1f303f805f536975652beddd41f0fad4012b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4154
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>
2020-09-22 11:40:01 +00:00
Niklas Cassel
069b536766 nvme_spec: add Zoned Namespace Command Set Specific identify data structures
Add the I/O Command Set Specific Identify Namespace Data Structure
and the I/O Command Set Specific Identify Controller Data Structure
for the Zoned Namespace Command Set.

These data structures are defined in the NVMe Zoned Namespace Command
Set Specification.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I1434765ecbb22e1020c6b299cd05ba8a614b1cda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-22 11:39:53 +00:00
Niklas Cassel
d1db020954 nvme: add a csi parameter to nvme_ctrlr_cmd_identify()
With the introduction of namespace types, the identify command has
gained an additional parameter: Command Set Identifier (CSI).

This parameter is similar to the existing parameters NSID and CNTID,
and is not used by all CNS values.

Most notably, the CSI parameter is not used for the existing CNS
values 00h (ID NS) and 01h (ID CTRL).
There are new CNS values, e.g. 05h (ID IOCS specific NS), and
06h (ID IOCS specific CTRL), which do take the new CSI parameter.

The new CNS values instead return Command Set Specific data structures,
which is basically an additional data structure. Therefore, the CNS
values 00h and 01h are very much still in use.
(Even the NVM Command Set has a Command Set Specific data structure,
even though all fields in that data structure are currently reserved.)

Since the CSI parameter is unused by all the existing calls to
nvme_ctrlr_cmd_identify() (since none of the calls send in a CNS value
that uses CSI), simply send in 0 for all existing calls.
No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia2b2324393a0707152b2f8511f0a22ad4a12bd46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4309
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>
2020-09-22 11:39:53 +00:00
wanghailiangx
6ca498c197 script: fix a setup.sh error "No such file"
Error log as below:
06:27:53    # nvme_namespace_revert
06:27:53   # /home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh
/home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh: line 109: /sys/bus/pci/devices/0000:80:04.2/driver/remove_id: No such file or directory
home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh: line 110: /sys/bus/pci/devices/0000:80:04.2/driver/unbind: No such file or directory
 06:27:54 # trap - ERR

Change-Id: I302e58143f0e165b17a9b5edd14121e6282f55a7
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4094
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-21 14:00:27 +00:00
Ben Walker
77ab6f2839 nvmf: Eliminate spdk_nvmf_tgt_accept()
The poller is now created internally to the library whenever a target
is constructed. Applications are not expected to poll for connections
any longer.

Change-Id: I523eb6adcc042c1ba2ed41b1cb41256b8bf63772
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3583
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: Changpeng Liu <changpeng.liu@intel.com>
2020-09-21 07:55:54 +00:00
Michal Berger
4be6d32b97 pkgdep/git: Create etc directory in git's custom path
By default, git will use path relative to the prefix it was built
with to determine location of git{config,attributes} files. In
our case, that would be /usr/local/git/etc.

Lack of this directory may be problematic for vagrant's proxyconf
plugin. If it picks up git binary at our location, it will depend
on existance of the /usr/local/git/etc directory. In case it's
missing it simply fails as git won't create it on its own. To
avoid that, let's create it ourselves.

Change-Id: Ie1fadd36d5888866b20375a7184031c73058fe3d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4292
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>
2020-09-18 07:36:52 +00:00
Michal Berger
3c98c8f764 scripts/vagrant: unset private_key_file when password auth is used
The main purpose of this is to force vagrant into using its own
ssh keys when password authentication is requested. Normally,
when ssh.password is defined, vagrant will attempt to inject its
own ssh key, by using provided password first, and re-use the key
for the new ssh session to provision the VM.

However, some vagrant boxes may come with their own embedded
Vagrantfiles which define custom ssh keys. If password auth is
requested for such boxes, vagrant will not use its own key, nor
the ones that may be defined by the vagrant box. Instead, it will
fallback to interactive, password authentication. From the CI pool
perspective this is not desirable.

On other note, this ties to the ongoing work of building indepdent
images for the CI where vagrant boxes will be deployed with a
custom ssh key alredy provided inside the box.

Related work:
trello.com/c/gAfo9mH1/208-vagrant-improvements-box-packaging
trello.com/c/9Dxp2Y9c/248-packaging-centos78-and-freebsd1112-with-packer

Change-Id: I49035b426519d9b24bcdab573d335ee622130560
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4283
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>
2020-09-18 07:36:52 +00:00
Michal Berger
d0ea1dfede scripta/vagrant: Fix unit typo in the help output
Change-Id: Idd707f20a0d8f6942606ec846ac27363000ddc80
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4282
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>
2020-09-18 07:36:52 +00:00
Michal Berger
47a87a0eb6 config/vm_setup: Don't fail on FreeBSD when os-release file is missing
Instead, define $ID, $VERSION_ID on our own based on FreeBSD's
version we are running on - 69d5d77bfb added etc_os-release package
as a pkg dependency so this change makes sure we have a chance to
actually install it.

Change-Id: I09b350ce3ae3f7c5d2f998f3d251f50e1277f846
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4261
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>
2020-09-18 07:36:52 +00:00
Michal Berger
aa46af008d scripts/vagrant: Don't expect an argument for -u option
This is a bool, hence it doesn't require any additional
arguments.

Change-Id: Ibc438f77c5c63ec5dc38007826268a494d8e661d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4239
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>
2020-09-18 07:36:52 +00:00
Michal Berger
db31afaaef pkgdep/git: Rearrange order in which install_refspdk() is called
Since refspdk has its source built, we should give it a chance to
avoid any potential issues with missing dependencies. To do that,
let's run it at the very end after all other sources were already
put in place (this is mainly relevant to FreeBSD where cmdline
for ./configure is hardcoded).

Change-Id: Ic07129c7b879eff7fddd734c9c4a6787df3da7ec
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4190
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>
2020-09-18 07:36:52 +00:00
Michal Berger
b85b7e2b93 pkgdep/git: Don't indicate error if vagrant installation is not supported
This would unecessarily print out usage() and call exit which wouldn't
be respected since all sources (except {,ref}spdk) are installed in the
background anyway.

Also, since std{out,err} may be bloated with bunch of messages comming
from different sources, explicitly mention Vagrant name in the echo.

Change-Id: I737f5cf08d6ae3d2d494add143d1dfaf89beeead
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4189
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>
2020-09-18 07:36:52 +00:00