Commit Graph

18835 Commits

Author SHA1 Message Date
Kozlowski Mateusz
0da057a424 FTL: Add mempool tests
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I21bc22b53e4bb43077220e4ec21891758d94cbfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13304
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-08-02 19:00:42 +00:00
Kozlowski Mateusz
b431640409 FTL: Add ftl mempools
Optimized for single thread utilization

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I56602a3d85e0cd47256c8f3e5d7a3f0ed4e38743
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13303
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>
2022-08-02 19:00:42 +00:00
Artur Paszkiewicz
be90ea6e7b FTL: Add bdev_ftl_create and delete rpc definitions
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I0837028fbe349e8df7f05fb3c9db1f4682f04679
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13301
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>
2022-08-02 19:00:42 +00:00
GangCao
6db3ac3a8e Test/Bdev: wait PID to exit on error testing
Fix issue: #2611

Change-Id: I6156598936fa44793d9f4ffc6fe5fb3a7bbc6278
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13804
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-08-02 15:10:02 +00:00
Shuhei Matsumoto
4f2f1aa9c5 nvme_rdma: Use pd of rdma_qp instead of default pd of cm_id
This is another preparation to create and use ibv_context and pd.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Id594fa1ccb2daf535b1aaaef0a397bda2ec98578
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13710
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-08-02 07:39:41 +00:00
Shuhei Matsumoto
a3a51453b8 nvme_rdma: Pass pd instead of cm_id to nvme_rdma_reg_mr()
The following patches will create and use ibv_context and pd
explicitly instead of using default ibv_context and pd created
by rdmacm.

As a preparation, pass pd instead of cm_id to nvme_rdma_reg_mr().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ifdcd18ed363b8ba4a23a920bf3559237e38821c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13599
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-08-02 07:39:41 +00:00
Apokleos
89c1e5bfc0 SPDK Interrupt Mode: Improve processing of reactor interrupt mode.
spdk in interrupt, reactor dosen't correctly handle exited threads,
causing vhost threads still in reactor's lw_threads list. The fix
will do cleanup thread when it's state becomes EXITED. Though it's
exposed in v22.05.x, but the master branch also has the problem.

We will do this as below:

(1) When thread's state becomes SPDK_THREAD_STATE_EXITED, reactor
    process thread exits first.
(2) Then reactor do remove lw_thread and destroy it.

Fix issue: #2574

Signed-off-by: Apokleos <oliverliyn@gmail.com>
Change-Id: I3ac2681d70480563db3a0aee4aff61c2f272b140
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13706
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-08-02 07:38:15 +00:00
Konrad Sztyber
a818564374 nvme: check CSTS.CFS when initializing ctrlrs
If Controller Fatal Status (CFS) bit is set, there's no point in waiting
for CSTS.RDY and the only way to move forward with the initialization is
to perform a controller reset.

This fixes issues with test/nvme/sw_hotplug.sh when running under qemu.
It seems that during that test, qemu marks the emulated NVMe drives as
fatal, so if we didn't check CSTS.CFS, the initialization would time
out.

Fixes #2201.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I97712debc80c3dd6199545d393c0f340f29d33b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13820
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: Michal Berger <michal.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-08-02 07:37:04 +00:00
Changpeng Liu
78ca4b27c5 nvmf: don't raise assertion when destroying an non-inactive subsystem
Sometimes VM may get a kernel panic when starting, and SPDK CI will kill
`nvmf_tgt` after 60 seconds, and for this exception, SPDK will raise an
assertion when destroying the subsystem, while here, we remove this
assertion and print the error information.

CI will still mark this case as a failed case, then we can use this error
information to understand error subsystem state in vfio-user.

Fix issue #2590.

Change-Id: I20b16f9e96a566730eca2dd9ea165645bd9160bd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13773
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-08-02 01:26:10 +00:00
Michal Berger
f5e5041dc2 pkgdep/git: Don't force bpftrace installation
In case user sets --test-conf="" the pkgdep/git still forces
bpftrace installation under fedora35 and newer. Avoid this to
make sure user has a clear view on what's being installed (and
what not) in respect to defined cmdline arguments.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I8b60fe9044d1ab593b3c1acaf1b40dde22acee2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13607
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-08-01 08:46:10 +00:00
Milosz Linkiewicz
7de190ae28 test/sma: add qemu test for nvmf/vfiouser subsystem
The test uses exisitng SPDK tests workflow for performing
series of tests for vfiouser subsystem on live QEMU instances.
For testing purposes it sends series of gRPC methods calls
that are serviced by the SMA and subsystems and then uses
the regular SPDK RPC interface to verify its effects on the application.
SSH connection to VM is used to verify that changes took place.

Signed-off-by: Milosz Linkiewicz <milosz.linkiewicz@intel.com>
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I38258c1a3f9ee3e457ef0426cdc6feff2f38d729
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-08-01 08:45:58 +00:00
Milosz Linkiewicz
d5d6efd8a8 sma: nvmf/vfiouser device manager implementation
This patch utilize generic sma implementation by adding vfiouser
devices manager. It's allow to expose virtualized block devices to
QEMU instances or other arbitrary processes.

Max device capacity depend on available `pci-bridge`
```yaml
devices:
  - name: 'vfiouser'
    params:
      buses:
        - name: 'pci.spdk.0'
          count: 32
        - name: 'pci.spdk.1'
          count: 32
      qmp_addr: 127.0.0.1
      qmp_port: 9090
```

Signed-off-by: Milosz Linkiewicz <milosz.linkiewicz@intel.com>
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I5ab43f4b877c371fa16a4daf4212ac2686991bd4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13004
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-08-01 08:45:58 +00:00
Konrad Sztyber
bae771fcdb sock: add assertions checking sock_impl_opts size
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I5afc3481470f876a59505d9c4c9dc3d699c5cfd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13714
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-29 16:49:54 +00:00
Michal Berger
5e0399cba4 pkgdep/git: cherry-pick additional fixes for gcc 12
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I5cbdfc5b847e191fd144a56f98eda536f9d4ac24
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13792
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
2022-07-29 16:44:40 +00:00
Michal Berger
d19ea54701 pkgdep/git: cherry-pick fix for OpenSSL warnings in DPDK
This workaround is needed to be able to build refspdk under newer gcc
shipped with fedora36.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I1f6f8bbe5f64bd281536ff30761fb7cf4bd046fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13787
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-29 16:44:40 +00:00
Jacek Kalwas
8c35e1bd79 nvmf/rdma: remove lock on few transport ops
it simplifies the code and improves readability
sync is done on generic layer

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If324039ef2b26fa8ba026b80ec49788a7b2dcaa3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13667
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-29 16:34:41 +00:00
Jacek Kalwas
c7ac84d1f2 nvmf/tcp: remove lock on few transport ops
it simplifies the code and improves readability
sync is done on generic layer

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I75753511842dff237bb27561e406c43ea68269fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13666
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-29 16:34:41 +00:00
Jacek Kalwas
b17919d8bc lib/nvmf: add lock around few transport ops
this is a prework for further changes - with lock on generic layer
lock on specific transport (e.g. tcp, rdma) layer becomes optional

possibly it won't be required if some contract introduced on public
interfaces (to be considered)
- spdk_nvmf_poll_group_[create|destroy]
- spdk_nvmf_tgt_listen_ext, spdk_nvmf_tgt_stop_listen
- spdk_nvmf_get_optimal_poll_group

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib132babf9e7022342129fe795991cdad834e7f53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13665
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-29 16:34:41 +00:00
Michal Berger
f4402d5abc pkgdep/git: cherry-pick stringop-overread workaround
This workaround is needed to be able to build refspdk under newer gcc
shipped with fedora36.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I5baeaae98db79649bbd96f9fbe5a6dcffdf5cfda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13786
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-28 07:18:59 +00:00
Michal Berger
b846c8a385 pgkdep/git: cherry-pick patches for libvfio-user
This attempts to fix builds under f35 where newer kernel requires
the https://review.spdk.io/gerrit/c/spdk/spdk/+/13404 patch to
be present in both the release and LTS build.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ie2a70ae9cb9ca6d2d495ea2cf5729fcffb60d593
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-28 07:18:59 +00:00
Alexey Marchuk
7fbda6d916 nvmf/rdma: Fix data_wr_pool corruption
When there are not enought transport buffers for
multi SGL request in state NEED_BUFFER, WRs
received from the data_wr_pool are returned back
to the pool. However rdma_req->data.wr.next pointer
still points to the first WR from the pool. Usually
it doesn't cause any problems since rdma_req will
try to fill buffers again, but when qpair is being
destroyed, all requests are completed forcefully.
When the request is completed and data.wr.next
pointer is not NULL, we'll try to put already
released WRs into the pool one more time.
That corrupts the pool and leads to undefined
behavior.

Fixes #2541

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I238b92eec132d8d845330362af6f335421177454
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13760
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-28 07:12:43 +00:00
Changpeng Liu
673c8a65e1 nvme: remove nvme_ctrlr_init_ana_log_page function
The function `nvme_ctrlr_init_ana_log_page` is exactly
same with `nvme_ctrlr_update_ana_log_page`, so remove it.

Change-Id: I1ad51635f47cf95cfa6de217e3b9144885c3b74e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13652
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-28 07:07:31 +00:00
Michal Berger
a70a338f5a test/blobstore: Generate json config with single nvme bdev
The match run against btest.out.match expects to find only single
nvme in the configuration, however, some CI nodes may come with
multiple nvme drives causing this particular test to fail. To
mitigate this, make sure to create config with only a single nvme
bdev.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ifa390269b0e0a040b1aea752735c2692cbabac6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13762
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-07-28 06:56:05 +00:00
Michal Berger
eb66239458 scripts/gen_nvme: Add option to define number of local bdevs to use
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2474328a1aa0d72526e272430a8396e8e3fadfe1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13761
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-28 06:56:05 +00:00
Michal Berger
0c30154eb5 test/vhost/initiator: Don't use spdk_tgt to generate json config
This is done in order to mitigate the following issue:

https://github.com/spdk/spdk/issues/2596

which has been frequently breaking CI. Since failure occurs while
trying to terminate spdk_tgt, remove it from the equation completely.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I9eb2423079ec0717b9b094ccb372adabac614463
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13802
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-27 21:04:54 +00:00
Artur Paszkiewicz
83a4b155ca module/raid: raid5: rename to raid5f
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I4ccd54f995f0f413dadd700ba3f6ed82fe17e223
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12395
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-27 08:51:21 +00:00
MengjinWu
7fc2c0856e lib/nvmf: use DSA to offload recv data digest crc32 in nvmf-TCP
allow DSA device to async offload crc32 calculation in nvmf-TCP

This patch can use DSA to accelerate crc32 computation, making
the io performance of TCP paths using crc32 approach the io
performance of TCP paths that do not use crc32.

Using SLIST to minimize the performance drop. SLIST has less
operation compared to TAILQ.

Thinking about memory thrashing, we should use the same memory as
possible to receive new PDUs. So, insert newly freed PDU in to head
is better.

The performance drop is within 1% compared to the TCP path without
crc32.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I480eb8db25f0e730cb198ca5ec19dbe3b4d38440
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11708
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-27 08:39:35 +00:00
Evgeniy Kochetov
b46cfdb6c9 bdev/qos: Process whole QoS queue on every Qos poll
We have to process whole QoS queue on each QoS poll. It may contain
IOs that still have quota or not affected by QoS rules at all. If we
stop on the first queued IO, all IOs will be limited by the minimum
QoS rule even if they're not affected by this rule.

Here is an example and simple test. We have a NVMf target with Null
bdev and QoS configured with read bandwidth limited to 10 MB/s and
write bandwidth limited to 100 MB/s. First we start nvme_perf with
only write IOs and we see that reported bandwidth is 100 MB/s. Then we
start another instance of nvme_perf with only read IOs. We see that
reported read bandwidth is 10 MB/s but we also see that write
bandwidth also drops to 10 MB/s.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I1edf09d038e65f873deef19ecb0f4bf9725a5ca5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13767
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-26 08:33:45 +00:00
Evgeniy Kochetov
f79af9ab19 bdev/qos: Factor out check for QoS limits into a helper function
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I139f78bb6fc2ccfce871c1f6a81dd1e25c51a826
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13766
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-26 08:33:45 +00:00
Artur Paszkiewicz
c682c78992 FTL: Add FTL bdev module
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I8c40b96f0726d83d6a307e8b9a04b7c210b80255
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13299
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-25 07:19:29 +00:00
Artur Paszkiewicz
17147949cf FTL: Add core thread poller
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I70158123d7b503c909b121d418abe31a8d441152
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13298
Community-CI: Mellanox Build Bot
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>
2022-07-25 07:19:29 +00:00
Chuanwei Ji
2460515509 aio: aio rescan rpc response is sent incorrectly.
Failed rpc response will be sent when rescan successfully.

Signed-off-by: Chuanwei Ji <chuanwei.ji@jaguarmicro.com>
Change-Id: I99a2491ec76b63cb01fb384e621b41b10ee0ed83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13711
Community-CI: Mellanox Build Bot
Reviewed-by: Qingmin Liu <qingmin.liu@jaguarmicro.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-22 07:28:49 +00:00
Kamil Godzwon
bcf9753b15 scripts/pkgdep: DAOS dependency repository has changed
After recent DAOS 2.0.3 release (2022-07-14) repository has
changed its location.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I4ad97844fb529c8dde5e39b751c3d92c69b8c26d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13683
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.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-07-22 07:28:20 +00:00
Evgeniy Kochetov
3b26e2c594 nvme/rdma: Create poller and CQ on demand
Original implementation creates pollers and CQs for all discovered
devices at poll group creation. Device (ibv_context) that has no
references, i.e. has no QPs, may be removed from the system and
ibv_context may be closed by rdma_cm. In this case we will have a CQ
that refers to closed ibv_context and it may crash in ibv_poll_cq.

With this patch pollers are created on demand when we create the first
QP for a device. When there are no more QPs on the poller, we destroy
the poller. This also helps to avoid polling CQs that don't have any
QPs attached.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I46dd2c8b9b2902168dba24e139c904f51bd1b101
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13692
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-22 07:27:22 +00:00
Kamil Godzwon
3f922a68f3 doc/distributions: update doc according to the recent changes
Added Rocky Linux 8 as a new supported OS (CI)

Fedora 35 has been deployed to all VM-hosts and used instead
of Fedora 34 as a default image.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I91926b442b188e9bf7cee32e5b957862c5ca878f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13563
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-22 06:44:32 +00:00
Changpeng Liu
c88345ab3d nvme: apply nvme_pcie_poll_group_get_stats to vfio-user
Both PCIE and VFIO-USER can use the same APIs to get IO queue
pair statistic data, so merge them here.

Change-Id: Iadf9ead2bd5abaf11d2ef5d1884acb67369f85bb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13538
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-22 06:43:35 +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
Nathan Claudel
d0038b70df bdev: fix use-after-free in bdev registration
When a bdev is registered, it is examined by the bdev modules before the
bdev register even is notified.

Examination may be asychronous, e.g. when the bdev module has to perform
I/O on the new bdev.

This causes a race condition where the bdev might be destroyed while
examination is not finished. Then, once all modules have signaled that
examination is done, `bdev_register_finished` makes an invalid access to
the freed bdev pointer.

To fix this, defer the unregistration until the examine is completed by
opening a descriptor on the bdev.

Change-Id: I79a2faa96c1c893fc1cee645fbe31f689b03ea4a
Signed-off-by: Nathan Claudel <nclaudel@kalray.eu>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13630
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-22 06:40:10 +00:00
Artur Paszkiewicz
d974bad6fc ftl: retrieve device’s attributes and configuration
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ide6bb24d2c1ec2b0da3f20ce4013a4cd6e339114
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13297
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-21 10:53:01 +00:00
Kozlowski Mateusz
92b5ebe014 FTL: Dump statistics on shutdown
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I9168af3cacffe9c4efae169b56df974a35bd4e2c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13296
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 10:53:01 +00:00
Kozlowski Mateusz
5022d8f372 FTL: Add first startup basic initialization flow
Scrubbing nv cache region and finalizing initialization

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I654b9a92004042c773c3672a5f27b0f66200469d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13295
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-21 10:53:01 +00:00
Kozlowski Mateusz
b872e29fef FTL: Add config checks during startup flow
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I336880ee263dbb23b613bd933c776f0b922412cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13294
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 10:53:01 +00:00
Artur Paszkiewicz
7a7ac2af33 ftl: metadata utils and initialization
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Iaa9d7dd3f9e3147f0acfe18e23506a33fe3fd5a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13293
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 10:53:01 +00:00
Artur Paszkiewicz
2b5bba569f ftl: device layout abstraction
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I5db829ffb9044179cdf0807c3aeeb3a850a276d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-21 10:53:01 +00:00
Artur Paszkiewicz
e49ccfc820 ftl: device startup and shutdown
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ia4a3439a2ac79e24bc6dc11a5c131d44ecb2ad80
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13291
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-21 10:53:01 +00:00
Jim Harris
9f6a324301 test: avoid private and public headers w/ same name
abidiff gets confused if a data structure in a
private header files is changed, if there is also
a public header file with the same name.  So avoid
this by forbidding private header files from having
the same name as a public header (i.e. one in
include/spdk or include/spdk_internal).

This was mostly already handled by using names like
nvme_internal.h, but we did have a few conflicts
which were causing our check_so_deps.sh script to
sometimes indicate a version bump was needed when
it really wasn't.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I90895efd22c1594044f3c3f9344bb3a67a754c4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13728
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-07-21 08:12:21 +00:00
Changpeng Liu
dbecab8da0 nvme/pcie: make nvme_pcie_ctrlr_delete_io_qpair call trace multi-process safe
When a secondary process exit without deleting allocated IO
queue pair, then a new secondary process will do cleanup for
previous allocated queue pair, then segment fault will happen
due to `stat` inside IO queue pair data strucutre can't be
accessed in this cleanup process.

Fix issue #2565.

Change-Id: I01a037642683901941b5268ac20d17b78b6c6350
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13537
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>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-21 08:11:50 +00:00
Jim Harris
ee8167e3e1 virtio: rename header to vhost_user_internal.h
This avoids conflict with public vhost_user.h header
file which can cause problems with abidiff.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia258b4621eda9f6855d46bbf67d8369a053a7116
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13732
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 07:03:26 +00:00
Jim Harris
fff345b145 vmd: rename internal header file to vmd_internal.h
This avoids conflict with public vmd.h header which
can cause problems with abidiff.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2f00c07226dec273516868f5fa9d7aa384378308
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13731
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: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-21 07:03:26 +00:00
Jim Harris
e70dc52ff2 blobfs: rename tree.h to cache_tree.h
Avoids conflict with public tree.h that can cause
problems with abidiff.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3ccf4c0198f7975d8ebbee57f50c52f9f2e96fc0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13730
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 07:03:26 +00:00