Commit Graph

1045 Commits

Author SHA1 Message Date
wanghailiangx
809ae055b4 usage: Add ] for [-G enable debug logging
Change-Id: I02944e2c40c9a5d288d20b53548371d5e7b97069
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14334
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-06 07:16:32 +00:00
Ben Walker
34c48f1b3b accel: Do not refer to the "framework" as "engine"
The word engine was both used (interchangeably with module) to refer to
the things that plug into the framework and to the framework itself.
This patch eliminates all use of the word engine that meant the
framework. It leaves uses of the word that meant "module".

Change-Id: I6b9b50e2f045ac39f2a74d0152ee8d6269be4bd1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13918
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-09-06 07:16:17 +00:00
Richael Zhuang
8c4f6f49fe perf: allow to set zerocopy_threshold
add --zerocopy_threshold option to allow data sent with or without
MSG_ZEROCOPY flag according to data size in perf test. This option
can be set when specifying --zerocopy-threshold-sock-impl impl.

Change-Id: Ic187aadba38287bc8f2f082319e26881a13a6766
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-09-01 08:27:01 +00:00
Ben Walker
f1cba369ed identify: Report the maximum number of I/O queues per controller
This is the value after negotiation with the host.

Change-Id: Ifec843c7c2ff7d88ee3ccf26b942fcd084efda55
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13798
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-08-30 07:18:35 +00:00
Ben Walker
081f080a49 accel: Rename public header to accel.h
The public interface of lib/accel is now include/spdk/accel.h

Change-Id: Id94f623a494eb1b524b060f4413f633073ea7466
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-08-16 10:22:55 +00:00
Boris Glimcher
6212597bda sock/ssl: Add psk_key and psk_identity options to spdk_sock_impl_opts
Note, this change only sets defaults for the ID/KEY,
more specific use cases like NVMe/TCP may set the ID and KEY on a per connection basis.

Also simplify PSK identity string, that isn't NVMe focused.
NVMe libraries using this will need to construct more complicated
identity strings and pass them to the sock layer.

Example:
  rpc.py sock_impl_set_options -i ssl --psk-key 4321DEADBEEF1234
  rpc.py sock_impl_set_options -i ssl --psk-identity psk.spdk.io

  ./build/examples/perf --psk-key 4321DEADBEEF1234 --psk-identity psk.spdk.io

  ./build/examples/hello_sock --psk-key 4321DEADBEEF1234 --psk-identity psk.spdk.io

Change-Id: I1cb5b0b706bdeafbccbc71f8320bc8e2961cbb55
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13759
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-08-15 16:52:28 +00:00
paul luse
8416273819 examples/accel/perf: remove support for compress
In prep for the next few patches that will it back using a
different implmentation.  For review purposes it will be much
easier to remove it first. The new implmentation will be nothing
like what was here before.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3d14e524751442bfd5f0ade87333d879137b5d05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13435
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-08-10 07:25:29 +00:00
paul luse
6799d46a44 examples/accel_perf: only increment outstanding IO in one place
Simplify things a bit for an upcoming patch. This also fixes an
annoyance when there's a submission error, previously the
outstanding IO assert would have hit in the completion routine
because of the previous location of the increment..

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibfb914f10590f2370be58cabe06df466bbb3dc90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12902
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-08-10 07:25:29 +00:00
paul luse
b21221e174 examples/accel_perf: add case for bogus workload selection
Could have sworn this was in there but when we check for workload
selections we weren't printing usage and exiting when there was
an unknown selection.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iadc02457d9a15602bb4138c611a982333a8a2b66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12932
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-08-10 07:25:29 +00:00
paul luse
9260fa0cd4 examples/accel_perf: print engine currently in use
Took a little bit of rework to both get the engine name and print
it before the results (as before).

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iac38c30941eeae1501d58b0a28d241f7c2fad2d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12935
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-08-10 07:25:29 +00:00
Jim Harris
5d651b31c9 event: require opts->name is set
This has been implicitly required before, and all
in-tree apps (except accel_perf) set it, so let's
explicitly require it.  This name gets used for
things like the shm name for spdk trace event file.

While here, add the name for accel_perf.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I47a22466550d4b31bacafee58d30339b4f22f4b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13876
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-08-05 10:48:42 +00:00
Boris Glimcher
806744b7c8 sock: Add ktls and tls_version to spdk_sock_impl_opts
Since `sock_impl_opts` was added to `sock_opts`
Can remove `ktls` and `tls_version` from spdk_sock_opts

Example:
  rpc.py sock_impl_set_options -i ssl --enable-ktls
  rpc.py sock_impl_set_options -i ssl --disable-ktls
  rpc.py sock_impl_set_options -i ssl --tls-version=12

  ./build/examples/perf --enable-ktls
  ./build/examples/perf --disable-ktls
  ./build/examples/perf --tls-version=12

Check kTLS statistics here: /proc/net/tls_stat

Change-Id: Icf7ee822bad92fda149710be77feb77fc8d4f163
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13510
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-07-22 06:41:39 +00:00
Shuhei Matsumoto
2b78ecf34c example/nvme_identify: Calculate and use active ns count to allocate ANA log page
get_log_page() had used cdata->nn as active ns count to allocate a
ANA log page. However,  cdata->nn might be larger than the real active
ns count. Fix this potential issue.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ic71b29ad920f8393da7d7db0dab45e10e3268aec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13654
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-14 09:47:41 +00:00
Boris Glimcher
7104c8332d sock: Add ktls and tls_version to spdk_sock_opts
See https://docs.kernel.org/networking/tls-offload.html
See https://www.openssl.org/docs/man3.0/man3/SSL_set_options.html

Change-Id: I2fb433cbc34061cb03e1591bb0b47063fcafc68c
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13071
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-06-30 07:44:26 +00:00
Ben Walker
8dd1cd2104 check_format: For C files only, fix return type breaks
In SPDK, declarations have the return type on the same line. Definitions
have the return type on a separate line. Astyle has an option for
enforcing this. Unfortunately, it seems to have two bugs:

1) It doesn't work correctly at all on C++ files.
2) It often fails on functions that return enums, or long type names

Deal with 1) by adjusting the check_format.sh script to only tell astyle
to fix return type line breaks for C files and not C++. Deal with 2) by
adding a few typedefs to work around the problem.

Change-Id: Idf28281466cab8411ce252d5f02ab384166790c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-06-27 09:33:48 +00:00
Ankit Kumar
9db37f3cae examples/nvme/identify: improve zone report logging
Print string values for zone state and zone type.
Check for zone descriptor extension valid field before
printing the logs.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I3c5fa9a7a82f3fd6354c1430ec4f4c6259faeffb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12869
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
2022-06-20 09:58:57 +00:00
Ankit Kumar
5969ca7aa1 include/nvme_spec.h: update cdata fields for admin command set attributes
Add missing fields from identify controller data structure, for
admin command set attributes.
Update the identify examples file accordingly.
Ignore spdk_nvme_cdata_oacs ABI changes, only reserved fields were
changed. So this does not constitute an ABI/API breakage.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I718e3647835a0706a33e7aa6bae774e133071f9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12866
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-06-20 09:58:57 +00:00
Ankit Kumar
8dcea39ae6 include/nvme_spec.h: update cdata fields for controller capabilities and features
Add missing fields from identify controller data structure, for
controller capabilities and features
Update the identify examples file accordingly.
Ignore spdk_nvme_ctrlr_data ABI changes. Reserved fields
were changed, so this does not constitute an ABI/API breakage.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I12e622324bc1b0ebef95b854098bce133617051e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12865
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-06-20 09:58:57 +00:00
Jim Harris
488570ebd4 Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in every source file.  This patch replaces
the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause
identifier.

Almost all of these files share the exact same license text,
and this patch only modifies the files that contain the
most common license text.  There can be slight variations
because the third clause contains company names - most say
"Intel Corporation", but there are instances for Nvidia,
Samsung, Eideticom and even "the copyright holder".

Used a bash script to automate replacement of the license text
with SPDX identifier which is checked into scripts/spdx.sh.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
2022-06-09 07:35:12 +00:00
Ankit Kumar
b79199af39 include/nvme_spec.h: update fields for power state descriptor
Adding missing fields for power state descriptor.
Update identify examples file accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I23a23179fd0dbb92120d1c3f176da61a4d981990
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12864
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-06 20:02:33 +00:00
Ankit Kumar
da45400093 nvme/perf: add missing square brackets for usage
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I276f0d2e1b8706545f7015bed7300a1d6a329f03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12863
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-06 20:02:33 +00:00
Jim Harris
89c939e0a6 Eliminate license header differences.
There are a few places where a typo, extra character
or newline was added to the BSD 3-clause license text
which made it differ very slightly from the rest of
the license headers in the source tree.  Remove those
differences in this patch, to help with automation of
SPDX identifier replacement in the next patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I542dc53cd252b1699253fd6dcc3ccac9643d7878
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12905
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-06 07:34:55 +00:00
paul luse
2dd64cf962 examples/accel_perf: fail correctly when we can't get a channel
By design there is a limit to how many channels the idxd driver
can suport based on how many DSA instances are available.  When we
reach the limit we won't be able to get a channel.  This fixes that
error path to fail gracefully instead of seg faulting.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I226f59913cb830eae0707623ae251ba19bce9aaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12218
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-05-23 16:45:13 +00:00
paul luse
13067997d0 examples/accel_perf: add IAA compress/decompress support
Decompress is not a selectable workload, only compress as it makes
no sense to decompress w/o a compressed buffer to start with.  When
the verify option is selected with compress, decompress is used
on the compressed data and compared to the original buffer.

Changes also included making the src buffer for compress semi-random
for more real life comp/decomp speed.  Additionally some error handling
was fixed up in the event the we get an error because ISAL isn't
configured, before it would crash, not it exits nicely.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic1f323579ed5c6950bdb0e95513bfd2f6593b5d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12303
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-05-23 16:04:57 +00:00
paul luse
ecaa8e1000 lib/idxd: prepare some plumbing for adding IAA
Misc internal IDXD changes needed to support the upcoming addition
of IAA.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Idb180088af545b174ed33a4f8ee113e58640477f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12764
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-05-23 07:02:21 +00:00
Tomasz Zawadzki
e0516095fc event/vhost: separate vhost subsystem to scsi and blk
Separate out SCSI and BLK vhost subsystems to later add
virtio_blk transport abstraction.

This allows for further changes to the vhost_blk, not
affecting vhost_scsi.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id1ecfeafeb936809a479a43c321e13f75cb3d5ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9539
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-05-20 09:20:07 +00:00
Liu Xiaodong
8c1180ead8 nvme/perf: fix memory leak of zipf
Change-Id: Ide74485a4d6e71e46db3e365a3cbe21480ea54c3
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12608
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-05-12 07:26:43 +00:00
GangCao
df5aff4f9a examples/idxd/perf: update the input parameter
Change-Id: Ie0f3e4bbff47b23d58628756b6cfde3aaa69cc77
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12598
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <yex.chen@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-05-11 09:38:47 +00:00
paul luse
befbf7ca0f examples/idxd_perf: add copy+crc32C support
Someone had it partially in there but never finished it. Likely copy
and pasted most, but not all of it, from accel_perf long ago...

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4f8bada5cb7c7fd5aea4487eef54f40432dde498
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12610
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-05-11 09:34:27 +00:00
Boris Glimcher
31a8a83c64 hello_sock: Add cli params to enable/disable zcopy
Similar to examples/nvme/perf/perf.c

Usage:
    -z disable zcopy
    -Z enable zcopy

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Change-Id: I56f1b0d9c79cbfdba57d0e132a18cb5dce0b7904
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12435
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-05-04 08:03:39 +00:00
Jacek Kalwas
23c86a2610 examples/nvme/perf: clear latency histogram after warmup
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib2fc8b2d811d98f2af3602dedb52db331b4b1a99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12410
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-04-29 07:29:31 +00:00
John Levon
a6aaf848a5 nvme/fio_plugin: fix race during startup
We can crash with spdk_nvme_qpair_process_completions(qpair=0x0) when
called from spdk_fio_getevents(). This was observed when passing more
than two namespaces to an fio job.

This is because this callback can be called concurrently with
spdk_fio_open(), which assigns ->qpair. We'll just skip any
non-initialized qpairs in the processing loop, as eventually
spdk_fio_open() will set them.

Fixes: "f69367c78 fio_nvme: defer qpair allocation to file_open callback"

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ie8f1ac37726e202bb971ffeb497f9e32656392aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12338
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
2022-04-26 07:46:30 +00:00
paul luse
37b68d7287 accel: cleanup by getting rid of capabilties enum
In support of upcoming patches and to greatly simplify things,
the capabilites enum which held bit positions for each opcode
has been removed.  Only the opcodes enum remains and thus only
opcodes are used throughout.  For the capabiltiies bitmap a helper
function is added to convert from opcode to bit position.  Right
now it is used in the IO path but in upcoming patches that goes away
and the conversion is only done at init time.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic4ad15b9f24ad3675a7bba4831f4e81de9b7bc70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11949
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-04-14 08:32:50 +00:00
Konrad Sztyber
7610bc38dc scripts: move python modules to python directory
Up until now, importing an SPDK RPC python module was just a matter of
`import rpc`.  It's fine until there's another module called `rpc`
installed on the system, in which case it's impossible to import both of
them.  Therefore, to avoid this problem, all of the modules were moved
to a separate directory under the "spdk" namespace.

The decision to move to a location under a separate directory was
motivated by the fact that a directory called scripts/spdk would look
pretty confusing.  Moreover, it should make it also easier to package
these scripts as a python package.

Other than moving the packages, all of the imports were updated to
reflect these changes.  Files under python now use relative imports,
while those under scripts/ use the "spdk" namespace and have their
PYTHONPATH extended with python directory.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib43dee73921d590a551dd83885e22870e72451cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9692
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-04-05 14:40:47 +00:00
Shuhei Matsumoto
1906b0753e blobcli: Use spdk_for_each_bdev() for bdev list traversal
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ib7ea70c7046241dd6b09f44cb9a3e7ce8496d5c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12140
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-04-05 11:48:31 +00:00
Evgeniy Kochetov
a2d4ddb3b1 nvme: Prioritize user provided trstring for transport lookup
This patch fixes the issue with custom nvme transport. It is possible
to register custom nvme transport with arbitrary name but it is not
usable because 'spdk_nvme_trid_populate_transport' call in probe
function will always set trstring to 'CUSTOM' and transport lookup
will fail.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I83fd24dd8732ac0a21e22435e0acff20ab0e7521
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9557
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-03-31 10:31:20 +00:00
paul luse
e68aebd50b lib/accel: remove public API for getting capabilities
First in a series of patches that will enable multiple engines
to exist at once and choose the best one based on their priorities
and capabilites, the public API will no longer be needed.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia87b83aa2263745a94a822a160b6e97bb2e0dc19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11948
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
2022-03-31 09:36:25 +00:00
Changpeng Liu
ed9f26f9c0 examples/nvme/perf: check block size after IO flags
When PRACT=0, the perf tool will skip tests for extended LBA format,
fix it now.

Change-Id: I12e6bc10bb16148a02a30b5d20b540166d45c242
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12053
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-03-29 07:31:23 +00:00
Yuriy Umanets
f3950cf457 fio/bdev_plugin: Added env_context to fio config
FIO config can have "env_context" field now. It allows passing to DPDK
the start-up options essential for mlx5 crypto/reduce support. This
enables using FIO plugin for testing mlx5 crypto/compress vbdev PMDs.

For example:
env_context=--allow=0000:01:00.0,class=crypto,wcs_file=/path/credentials.txt

Signed-off-by: Yuriy Umanets <yumanets@nvidia.com>
Change-Id: I8b862a431fa5b838e337a64e736d4f6700f83599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11633
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>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-03-24 09:21:35 +00:00
Ben Walker
f0bf4e75f5 idxd: Eliminate configs
SPDK has settled on what the optimal DSA configuration is, so let's
always use it.

Change-Id: I24b9b717709d553789285198b1aa391f4d7f0445
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11532
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-03-21 11:05:28 +00:00
Ben Walker
6fb6716d45 fio_plugin/bdev: Support spdk_threads exiting at run time
Now that the plugin supports SPDK-created spdk_threads, it needs to
handle those threads being removed at run time.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I8dee09bf95d1c8fe80f5793ee5476d3f3e1384fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11867
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-03-15 09:04:57 +00:00
Ben Walker
0d845de79d fio_plugin/bdev: Assign spdk_threads created by SPDK modules to the init
thread

This allows SPDK modules to spawn spdk_threads and they'll get correctly
polled.

Change-Id: Ie5cadc130aeaa475eb44c0ea55b9a25dfeb29552
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11866
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-03-15 09:04:57 +00:00
Ben Walker
c4f8bff2b3 fio_plugin/bdev: Use thread context space for spdk_fio_thread
Instead of allocating this separately, use the thread context area.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2d5f4d223b15ff663e57f52237b3cc4dab43c291
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11865
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-03-15 09:04:57 +00:00
John Levon
c4f7ddd2c7 lib/nvme: report shadow doorbell update stats
Currently shadow doorbell updates are not counted; add statistics for
those, and rename the other statistic for clarity.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I211a77902e38265c99b15862034c6d022dc582a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11844
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2022-03-10 09:49:25 +00:00
John Levon
ba4ffda671 lib/nvme: correct typo in transport stats
"doorbell" not "doobell"

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I9261559576e72a09b63fbc984ae0ec2a2572eb2c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11841
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-03-09 08:03:42 +00:00
Alexis Lescouet
a71cd5214b event: Add a user option to change the size of spdk_msg_mempool
The spdk_msg_mempool structure has a fixed size, which is not flexible
enough. The size of the memory allocation can now be changed in the
options given to the spdk_app_start function.

Signed-off-by: Alexis Lescouet <alexis.lescouet@nutanix.com>
Change-Id: I1d6524ab8cf23f69f553aedb0f5b0cdc9dde374b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11635
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.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>
2022-03-09 08:00:28 +00:00
paul luse
12c40f05e2 accel: plumb accel flags through operations that need them
This patch is just plumbing the flags param. Use of it for PMEM
will come in upcoming patches.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I620df072aaad3f8062a0312bbea3da1bc3f911b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-03-04 21:56:54 +00:00
paul luse
7d63e716eb idxd: Add flags parameter to all low level API for prep/submission
Previously required flags were hardcoded in the low level library.
By having the user pass them in there is more flexbility and control.
This was driven by the need to add a new flag for pmem durability,
coming in a future patch in this series.

There is no change in functionality with this patch, just movement
of where flags are set and by whom and the plumbing of 'flags'..

Also note that some flags in scenarios that we know are required are
still set by the library.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I194278f9e3cec0886628585cf84bcc2eae635e0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9449
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-03-04 21:56:54 +00:00
Jim Harris
f45c98dd29 blobcli: use spdk_thread_send_msg when dumping blob
For thin provisioned blobs, an IO read to an unallocated
cluster completes inline, meaning that if the read
completion function issues another read, we can quickly
blow the stack.  So use spdk_thread_send_msg() to
issue the next read operation.

Fixes #2405.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I10a40b83bfc25fa6bbd8bc93b6fea36ac8ee83c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11784
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-03-02 08:29:01 +00:00
Changpeng Liu
b0f02769f9 nvme/fio_plugin: call spdk_env_fini() when exiting the process
spdk_fio_cleanup() is called per-thread basis, and spdk_env_fini()
is called multiple times when running with `numjobs` greater than 1.

Fix issue #2366.

Change-Id: I39ec379d71eeba1ca14ba42a93b819220ee1f307
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11443
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2022-02-23 10:05:25 +00:00