Commit Graph

1918 Commits

Author SHA1 Message Date
Alexey Marchuk
13f97e6737 bdev/crypto: Use accel framework
All DPDK related code is removed, handling of
RESET command was sligthly updated.
Handling of -ENOMEM was updated for cases when
accel API returns -ENOMEM

Crypto tests in blockdev.sh were extended with more
crypto_bdevs to verify NOMEM cases - that failed
with original vbdev_crypto implementation

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: If1feba2449bee852c6c4daca4b3406414db6fded
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14860
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-19 22:00:58 +00:00
Michal Berger
c1e9ed6d4c perf/vhost: Auto generate VM cpu and disk map configs
The configuration is generated based on existing host's NUMA
topology (as seen via sysfs) instead of a total number of cpus as
it was done before. New logic attempts to load balance VMs and
their cpus based on nvme drives' NUMA location. If there is no
enough cpus left under the target node, all remaining nodes are
checked. For the sake of the performance, cpus are not mixed
between different numa nodes.

Disk map is created by mapping VMs to existing nvme drives
based on their NUMA location. Extra VMs are assigned in bus
order of the nvme drives.

SPDK cpus are split by matching the VM-to-nvme NUMA ratio.
Static list can be defined as well to override this behavior.

https://trello.com/c/HSoRtQkO/401-deprecate-vhost-performance-python-helper-script

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ia63c6f9a472a685d252efd110eaba7b114a87d2c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12401
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2023-01-19 21:27:59 +00:00
Richael Zhuang
b317d8f396 bdev_nvme: add support to display io path stat of the NVMe bdev
Add RPC bdev_nvme_get_path_iostat to show I/O statistics for IO paths
of the NVMe bdev.

Change-Id: I22e5ad112d5cfa6d96cf246dcd0e511ae71dc839
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14745
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-19 17:33:24 +00:00
Karol Latecki
cf0cf4790b scripts/nvmf_perf: add iobuf options to performance test
Recent changes done to iobuf and accel framework
require us to adjust iobuf pool sizes when running
tests with high number of NVMe-oF subsystems.

Change-Id: I72ce6e71446bea0af44bdad6258e7d7f5d765656
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16288
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>
2023-01-19 13:52:27 +00:00
Michal Berger
8721d5dac6 check_format: Add option for running checks against staged files
This is meant to improve performance of the heaviest checks, like
the shellcheck one, where instead of running against the contents of
the entire repo simply go through files that are meant to be
committed.

This mode has to be requested through the environment via the
CHECK_FORMAT_ONLY_DIFF.

For now, get_diffed_dups() is hooked into least performant
checks (permissions, shfmt, shellcheck).

Also, the git grep command in the main check_permissions() is dropped
as the idea of piping its output to git ls-files was faulty - the git
ls-files does not read its arguments from the stdin.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I098dcbbe18c08c08a8216857c7cf2c80c4021d31
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16049
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-19 11:26:30 +00:00
paul luse
976f8b0992 module/accel: Add compressDev accel_module
This is the port of the vbdev compress logic into the accel
framework.  It includes just one enhancement, to only fill each
mbuf in either src or dst array with max "window size" param to
avoid QAT errors. Note that DPDK ISAL PMD was not ported as we
have native ISAL compression in accel now.

Note: ISAL w/DPDK is still built w/this patch, that can't be
removed until the vbdev module moves to accel fw as it still
depends on DPDK ISAL PMD.

Follow-on patches will include addition C API for PMD selection,
this patch just gets equivalent functionality going.  Upcoming
patches will also convert the vbdev compress module to use the
accel framework instead of talking directly to compressdev.

More patches will also address comments on vbdev common code
that addressed here would make the review challenging.

This patch also fixes a bug in the ported code that needs to
be fixed here to pass CI.  Capability discovery was incorrect
causing all devices to appear to not support chained mbufs,
with the mbuf splitting code this is important to get right.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7f526404819b145ef26e40877122ba80a02fcf51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15178
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-19 11:16:01 +00:00
Krystyna Szybalska
537929e1d4 virtio_blk: added virtio_blk_get_transports RPC
This patch adds virtio_blk_get_transports matching the
virtio_blk_create_transport RPC. Allowing for querying
existing virtio_blk transports and displaying their options.

Signed-off-by: Krystyna Szybalska <krystyna.szybalska@gmail.com>
Change-Id: I0ec49c5f2ad11962feb5087dd376407ad125c349
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16303
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-19 10:30:26 +00:00
Richael Zhuang
f61b004197 bdev_nvme: update nvme_io_path stat when IO completes
Currently we have stat per bdev I/O channel, but for NVMe bdev
multipath, we don't have stat per I/O path. Especially for
active-active mode, we may want to observe each path's statistics.

This patch support IO stat for nvme_io_path. Record each nvme_io_path
stat using structure spdk_bdev_io_stat.

The following is the comparison of bdevperf test.

Test on Arm server with the following basic configuration.
1 Null bdev: block size: 4K, num_blocks:16k
run bdevperf with io size=4k, qdepth=1/32/128, rw type=randwrite/mixed with 70% read/randread

Each time run 30 seconds, each item run for 16 times and get the average.

The result is as follows.

qdepth type   IOPS(default) IOPS(this patch)  diff
1   randwrite   7795157.27  7859909.78       0.83%
1   mix(70% r)  7418607.08  7404026.54      -0.20%
1   randread    8053560.83  8046315.44      -0.09%

32  randwrite   15409191.3  15327642.11	    -0.53%
32  mix(70% r)  13760145.97 13714666.28	    -0.33%
32  randread    16136922.98 16038855.39	    -0.61%

128 randwrite   14815647.56 14944902.74	     0.87%
128 mix(70% r)  13414858.59 13412317.46	    -0.02%
128 randread    15508642.43 15521752.41	     0.08%

Change-Id: I4eb5673f49d65d3ff9b930361d2f31ab0ccfa021
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-19 01:57:11 +00:00
Richael Zhuang
2f500a23fb bdev/nvme: support switch to another io path after a number of IOs
Support to specify rr_min_io for multipath round-robin policy,
which makes I/O switches to another io path after rr_min_io I/Os are
rounted to current io path.

Change-Id: I09f0d8d24271c0178ff816fa63ce8576b6e8ae47
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-19 01:57:11 +00:00
Richael Zhuang
6aa4edc27d bdev/nvme: select io path according to outstanding io numbder
Support selecting io path according to number of outstanding io of
each path in a channel. It's optional, and can be set by calling
RPC "bdev_nvme_set_multipath_policy -s queue_depth".

Change-Id: I82cdfbd69b3e105c973844c4f34dc98f0dca2faf
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14734
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: Jim Harris <james.r.harris@intel.com>
2023-01-19 01:57:11 +00:00
Shuhei Matsumoto
a3ae6eaa75 bdev/nvme: Add an option for the RDMA SRQ size
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I8e678b5681c8039ccd359de8a797ede4eaddf8b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-17 23:53:01 +00:00
Karol Latecki
83c8db4919 scripts/nvmf_perf: allow sharing initiator CPU cores
Each fio job section will get unique CPU cores
assigned based on the number of numjobs value.
In case of high number of fio jobs or high numjobs
parameter value we might eventually run out of
CPU cores to assign. Allow regenerating list
of available CPU cores. This allows to run the
test, but as a result CPU cores might be shared
between fio threads.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I69b1713e640d9343d68b26317f4caccdcec3cddd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16240
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>
2023-01-13 08:54:59 +00:00
Karol Latecki
cdab715b28 scripts/nvmf_perf: add irq_settings option
Allow user to specify the way IRQ alignment for
network interfaces used in test should be done.

Change-Id: Ib835d2ac2bc0c7b79474e617de32b96a483e436b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15737
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>
2023-01-13 08:54:59 +00:00
Karol Latecki
7be3200f55 scripts/nvmf_perf: don't build unit tests on initiator side
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I44763a3fef9e05042623749b6fbc387a485becf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15736
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-13 08:54:59 +00:00
Karol Latecki
70066e0c38 scripts/nvmf_perf: enable LTO on initiator side
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Icc62a586f59448242087e3d78e73e5fb76022a7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15735
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-13 08:54:59 +00:00
Karol Latecki
87b94e3b1d scripts/nvmf_perf: manually pick fio allowed cpus
Fio "numa_cpu_nodes" parameter (which tells fio
which NUMA node to use to pick cpus for the job)
seemed promising, but manually adjusting
"cpus_allowed" seems to have better results.

Change-Id: I113566ad0dd1d32fb5a1e989725b257e3ccff4c0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14842
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>
2023-01-13 08:54:59 +00:00
Parameswaran Krishnamurthy
2796687d54 nvme: Added support for TP-8009, Auto-discovery of Discovery controllers for NVME initiator using mDNS using Avahi
Approach:
Avahi Daemon needs to be running to provide the mDNS server service. In the SPDK, Avahi-client library based client API is implemented.
The client API will connect to the Avahi-daemon and receive events for new discovery and removal of an existing discovery entry.

Following sets on new RPCs have been introduced.

scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp

User shall initiate an mDNS based discovery using this RPC. This will start a Avahi-client based poller
looking for new discovery events from the Avahi server. On a new discovery of the discovery controller,
the existing bdev_nvme_start_discovery API will be invoked with the trid of the discovery controller learnt.
This will enable automatic connection of the initiator to the subsystems discovered from the discovery controller.
Multiple mdns discovery instances can be run by specifying a unique bdev-prefix and a unique servicename to discover as parameters.

scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto

This will stop the Avahi poller that was started for the specified service.Internally bdev_nvme_stop_discovery
API will be invoked for each of the discovery controllers learnt automatically by this instance of mdns discovery service.
This will result in termination of connections to all the subsystems learnt by this mdns discovery instance.

scripts/rpc.py bdev_nvme_get_mdns_discovery_info

This RPC will display the list of mdns discovery instances running and the trid of the controllers discovered by these instances.

Test Result:

root@ubuntu-pm-18-226:~/param-spdk/spdk/build/bin# ./nvmf_tgt -i 1 -s 2048 -m 0xF
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[
  {
    "name": "cdc_auto",
    "svcname": "_nvme-disc._tcp",
    "referrals": [
      {
        "name": "cdc_auto0",
        "trid": {
          "trtype": "TCP",
          "adrfam": "IPv4",
          "traddr": "66.1.2.21",
          "trsvcid": "8009",
          "subnqn": "nqn.2014-08.org.nvmexpress.discovery"
        }
      },
      {
        "name": "cdc_auto1",
        "trid": {
          "trtype": "TCP",
          "adrfam": "IPv4",
          "traddr": "66.1.1.21",
          "trsvcid": "8009",
          "subnqn": "nqn.2014-08.org.nvmexpress.discovery"
        }
      }
    ]
  }
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[
  {
    "name": "cdc_auto0",
    "trid": {
      "trtype": "TCP",
      "adrfam": "IPv4",
      "traddr": "66.1.2.21",
      "trsvcid": "8009",
      "subnqn": "nqn.2014-08.org.nvmexpress.discovery"
    },
    "referrals": []
  },
  {
    "name": "cdc_auto1",
    "trid": {
      "trtype": "TCP",
      "adrfam": "IPv4",
      "traddr": "66.1.1.21",
      "trsvcid": "8009",
      "subnqn": "nqn.2014-08.org.nvmexpress.discovery"
    },
    "referrals": []
  }
]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[
  {
    "name": "cdc_auto02n1",
    "aliases": [
      "600110d6-1681-1681-0403-000045805c45"
    ],
    "product_name": "NVMe disk",
    "block_size": 512,
    "num_blocks": 32768,
    "uuid": "600110d6-1681-1681-0403-000045805c45",
    "assigned_rate_limits": {
      "rw_ios_per_sec": 0,
      "rw_mbytes_per_sec": 0,
      "r_mbytes_per_sec": 0,
      "w_mbytes_per_sec": 0
    },
    "claimed": false,
    "zoned": false,
    "supported_io_types": {
      "read": true,
      "write": true,
      "unmap": true,
      "write_zeroes": true,
      "flush": true,
      "reset": true,
      "compare": true,
      "compare_and_write": true,
      "abort": true,
      "nvme_admin": true,
      "nvme_io": true
    },
    "driver_specific": {
      "nvme": [
        {
          "trid": {
            "trtype": "TCP",
            "adrfam": "IPv4",
            "traddr": "66.1.1.40",
            "trsvcid": "4420",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0"
          },
          "ctrlr_data": {
            "cntlid": 3,
            "vendor_id": "0x0000",
            "model_number": "SANBlaze VLUN P3T0",
            "serial_number": "00-681681dc681681dc",
            "firmware_revision": "V10.5",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0",
            "oacs": {
              "security": 0,
              "format": 1,
              "firmware": 0,
              "ns_manage": 1
            },
            "multi_ctrlr": true,
            "ana_reporting": true
          },
          "vs": {
            "nvme_version": "2.0"
          },
          "ns_data": {
            "id": 1,
            "ana_state": "optimized",
            "can_share": true
          }
        }
      ],
      "mp_policy": "active_passive"
    }
  },
  {
    "name": "cdc_auto00n1",
    "aliases": [
      "600110da-09a6-09a6-0302-00005eeb19b4"
    ],
    "product_name": "NVMe disk",
    "block_size": 512,
    "num_blocks": 2048,
    "uuid": "600110da-09a6-09a6-0302-00005eeb19b4",
    "assigned_rate_limits": {
      "rw_ios_per_sec": 0,
      "rw_mbytes_per_sec": 0,
      "r_mbytes_per_sec": 0,
      "w_mbytes_per_sec": 0
    },
    "claimed": false,
    "zoned": false,
    "supported_io_types": {
      "read": true,
      "write": true,
      "unmap": true,
      "write_zeroes": true,
      "flush": true,
      "reset": true,
      "compare": true,
      "compare_and_write": true,
      "abort": true,
      "nvme_admin": true,
      "nvme_io": true
    },
    "driver_specific": {
      "nvme": [
        {
          "trid": {
            "trtype": "TCP",
            "adrfam": "IPv4",
            "traddr": "66.1.2.40",
            "trsvcid": "4420",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0"
          },
          "ctrlr_data": {
            "cntlid": 1,
            "vendor_id": "0x0000",
            "model_number": "SANBlaze VLUN P2T0",
            "serial_number": "00-ab09a6f5ab09a6f5",
            "firmware_revision": "V10.5",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0",
            "oacs": {
              "security": 0,
              "format": 1,
              "firmware": 0,
              "ns_manage": 1
            },
            "multi_ctrlr": true,
            "ana_reporting": true
          },
          "vs": {
            "nvme_version": "2.0"
          },
          "ns_data": {
            "id": 1,
            "ana_state": "optimized",
            "can_share": true
          }
        }
      ],
      "mp_policy": "active_passive"
    }
  },
  {
    "name": "cdc_auto01n1",
    "aliases": [
      "600110d6-dce8-dce8-0403-00010b2d3d8c"
    ],
    "product_name": "NVMe disk",
    "block_size": 512,
    "num_blocks": 32768,
    "uuid": "600110d6-dce8-dce8-0403-00010b2d3d8c",
    "assigned_rate_limits": {
      "rw_ios_per_sec": 0,
      "rw_mbytes_per_sec": 0,
      "r_mbytes_per_sec": 0,
      "w_mbytes_per_sec": 0
    },
    "claimed": false,
    "zoned": false,
    "supported_io_types": {
      "read": true,
      "write": true,
      "unmap": true,
      "write_zeroes": true,
      "flush": true,
      "reset": true,
      "compare": true,
      "compare_and_write": true,
      "abort": true,
      "nvme_admin": true,
      "nvme_io": true
    },
    "driver_specific": {
      "nvme": [
        {
          "trid": {
            "trtype": "TCP",
            "adrfam": "IPv4",
            "traddr": "66.1.1.40",
            "trsvcid": "4420",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
          },
          "ctrlr_data": {
            "cntlid": 3,
            "vendor_id": "0x0000",
            "model_number": "SANBlaze VLUN P3T1",
            "serial_number": "01-6ddce86d6ddce86d",
            "firmware_revision": "V10.5",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
            "oacs": {
              "security": 0,
              "format": 1,
              "firmware": 0,
              "ns_manage": 1
            },
            "multi_ctrlr": true,
            "ana_reporting": true
          },
          "vs": {
            "nvme_version": "2.0"
          },
          "ns_data": {
            "id": 1,
            "ana_state": "optimized",
            "can_share": true
          }
        }
      ],
      "mp_policy": "active_passive"
    }
  },
  {
    "name": "cdc_auto01n2",
    "aliases": [
      "600110d6-dce8-dce8-0403-00010b2d3d8d"
    ],
    "product_name": "NVMe disk",
    "block_size": 512,
    "num_blocks": 32768,
    "uuid": "600110d6-dce8-dce8-0403-00010b2d3d8d",
    "assigned_rate_limits": {
      "rw_ios_per_sec": 0,
      "rw_mbytes_per_sec": 0,
      "r_mbytes_per_sec": 0,
      "w_mbytes_per_sec": 0
    },
    "claimed": false,
    "zoned": false,
    "supported_io_types": {
      "read": true,
      "write": true,
      "unmap": true,
      "write_zeroes": true,
      "flush": true,
      "reset": true,
      "compare": true,
      "compare_and_write": true,
      "abort": true,
      "nvme_admin": true,
      "nvme_io": true
    },
    "driver_specific": {
      "nvme": [
        {
          "trid": {
            "trtype": "TCP",
            "adrfam": "IPv4",
            "traddr": "66.1.1.40",
            "trsvcid": "4420",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
          },
          "ctrlr_data": {
            "cntlid": 3,
            "vendor_id": "0x0000",
            "model_number": "SANBlaze VLUN P3T1",
            "serial_number": "01-6ddce86d6ddce86d",
            "firmware_revision": "V10.5",
            "subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
            "oacs": {
              "security": 0,
              "format": 1,
              "firmware": 0,
              "ns_manage": 1
            },
            "multi_ctrlr": true,
            "ana_reporting": true
          },
          "vs": {
            "nvme_version": "2.0"
          },
          "ns_data": {
            "id": 2,
            "ana_state": "optimized",
            "can_share": true
          }
        }
      ],
      "mp_policy": "active_passive"
    }
  }
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#

root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk#

Signed-off-by: Parameswaran Krishnamurthy <parameswaran.krishna@dell.com>
Change-Id: Ic2c2e614e2549a655c7f81ae844b80d8505a4f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15703
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-12 17:22:48 +00:00
Jim Harris
34bc24f10f pkgdep: add avahi package dependencies
This will enable NVMe mDNS discovery implementation
and testing in future patches.

Signed-off-by: Parameswaran Krishnamurthy <parameswaran.krishna@dell.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8de8e463b07b5b9d260781175d117766acdab9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16254
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-12 07:20:42 +00:00
Hailiang Wang
cec20de824 scripts/rpc.py: fix missing argument for bdev_ftl_unload
There is an error:
./scripts/rpc.py bdev_ftl_unload -b ftl0
Traceback (most recent call last):
  File "./scripts/rpc.py", line 3290, in <module>
    call_rpc_func(args)
  File "./scripts/rpc.py", line 3191, in call_rpc_func
    args.func(args)
  File "./scripts/rpc.py", line 2124, in bdev_ftl_unload
    print_dict(rpc.bdev.bdev_ftl_unload(args.client, name=args.name))
TypeError: bdev_ftl_unload() missing 1 required positional argument: 'fast_shutdown'

Change-Id: I3adf213d5aa8b97dee9a1e1b2db74a162fc0b760
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16177
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2023-01-11 09:28:30 +00:00
Jim Harris
935721bb1e iscsi_top: remove application
This application has not been maintained for at least
two years, let's just remove it rather than updating
it.  Original intent was to monitor iSCSI I/O
processed on each core, if we decide it's important
to still provide this kind of analysis for iSCSI it
would be better to incorporate it into spdk_top
instead most likely.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4093ab1357ccc06c8a6770f7f87238b510bb20d4

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16219
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-11 09:28:08 +00:00
Alexey Marchuk
61fbb000fe module/accel: Add accel_dpdk_cryptodev
The new module replaces functionality in vbdev_crypto.
This module is bdev agnostic, so some inernal parts
were reworked.

io_channel: contains a qp of every configured DPDK PMD
crypto key: for mlx5_pci we register a key on each available
device since keys are bound to Protection Domain.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: If1845cb87eadacbb921c593ba82207a97f2209a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14859
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-11 09:16:59 +00:00
Alexey Marchuk
2608d129d0 accel: Add crypto operation support
Add functions to submit encrypt/decrypt operations
Add RPCS to register and dump crypto keys
Software accel module uses isa-l_crypto AEX_XTS
functionality

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Iecf0e9913edf11ab85171d0fa467a2a62dfff984
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14858
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: <qun.wan@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-11 09:16:59 +00:00
Michal Berger
6d8f483383 scripts/core-collector: Add coredump_filter map to .json
This is done to make clear what data is included with the core dump.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I67f7da7f342354df4688147eaf56283b33ba2863
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15996
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>
2023-01-10 13:12:21 +00:00
Michal Berger
9545f9ac49 scripts: Ignore RLIMIT_CORE while writing out core dumps
As stated in the core(5) the RLIMIT_CORE is not enforced when kernel
is piping core to the collector, hence it will be written out even
when it's set to 0. Instead of playing nice and checking the validity
of RLIMIT_CORE, simply ignore it and apply our own limit (2GB).

This is done for convenience and to make sure that any changes to the
way how given distro applies limits (see fedora37) to the processes
doesn't affect our core collection.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iab8757f548f2a4f0f4b27b4ce66b0a4a84ed2579
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15994
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>
2023-01-10 13:12:21 +00:00
Shuhei Matsumoto
e33ae4a6d5 bdev/nvme: Count number of NVMe errors per type or code
Error counters for NVMe error was added in the generic bdev layer but
we want to know more detailed information for some use cases.

Add NVMe error counters per type and per code as module specific
statistics.

For status codes, the first idea was to have different named member
for each status code value. However, it was bad and too hard to test,
review, and maintain.

Instead, we have just two dimensional uint32_t arrays, and increment
one of these uint32_t values based on the status code type and status
code. Then, when dump the JSON, we use spdk_nvme_cpl_get_status_string()
and spdk_nvme_cpl_get_status_type_string().

This idea has one potential downside. This idea consumes 4 (types) *
256 (codes) * 4 (counter) = 4KB per NVMe bdev. We can make this smarter
if memory allocation is a problem. Hence we add an option
nvme_error_stat to enable this feature only if the user requests.

Additionally, the string returned by spdk_nvme_cpl_get_status_string()
or spdk_nvme_cpl_get_status_type_string() has uppercases, spaces, and
hyphens. These should not be included in JSON strings. Hence, convert
these via spdk_strcpy_replace().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I07b07621e777bdf6556b95054abbbb65e5f9ea3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15370
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:12:05 +00:00
Michal Berger
8d7abaf5e2 scripts/get-pmr: Update comment, remove unused vars
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I275853e5c3695912cb1eb4d81f99d4dc4ce26d91
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-10 13:04:01 +00:00
Michal Berger
29756d4c69 scripts/get-pmr: Return failure if neither CMB/PMR buf is found
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I7d7b12ee7c5b081bda52659706e9aed8cefbd5a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-10 13:04:01 +00:00
Krzysztof Smolinski
208f21cdce raid1: module implementation
* added raid1 module functions
* raid1 logical volume can be created using standard SPDK RPC
* strip size parameter not supported by raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Id3ee1ba0ec28540ca8eb67b04c3ff655a16b1f19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2023-01-09 12:39:19 +00:00
Michael Haeuptle
990cd38a8c bdev_nvme: Support for transport_tos in RPC
Added transport_tos parameter to bdev_nvme_set_options and
corresponding rpc.py command line.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: If95eafbd9963fee8d7b230e91ec84dae8713df23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-05 19:54:53 +00:00
Michal Berger
633e832cec scripts/ceph: Make sure osd_class_dir is an absolute path
Some Ceph builds, as seen under fedora37, have their default
osd_class_dir parameter set improperly to a relative path. As a
result, Ceph is not able to open and load .so libs that are part
of rados-classes. Example of an error seen in the ceph logs:

could not stat class lib64/rados-classes/libcls_rbd.so: (2) No such file or directory

To workaround it, always slap "/" at the beginning of the path.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I08c2c94f7469748489ef4a9f0e65f3faccbecfb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-12-29 08:37:45 +00:00
Simon A. F. Lund
b99b00e595 bdev_xnvme: add option to conserve cpu and set default to false
To achieve the highest possible IO-rates and lowest latency, then CPU
cycles must be spent processing IO. This commit introduces three
different techniques dependendent on the 'io_mechanism' used.

For 'libaio', xNVMe is instructued via 'opts.poll_io' to not wait for
completions, thus xnvme_queue_poke() returns immmediatly, the user can
then call xnvme_queue_poke() as frequently as desired. This requires
xNVMe v0.5.0. Earlier versions will ignore 'opts.poll_io' for 'libaio'.

For 'io_uring', xNVMe is instructed via 'opts.poll_io' to enable
IORING_SETUP_IOPOLL.

For 'io_uring_cmd', xNVMe is instructued via 'opts.poll_sq' to enable
IORING_SETUP_SQPOLL, this sets up a kernel-side thread reaping
completions from user-space on the ring. Note that 'io_uring_cmd'
requires liburing >= 2.2.

This commit enables the above by default. The above can be disabled by
setting 'conserve_cpu' to true on the bdev-setup.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Id54f1e59733ce9ae3b174ad4562904d868d4ef4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14678
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-12-21 09:33:27 +00:00
Michal Berger
fecffda6ec scripts/pkgdep: Install liburing's .pc to known directory
Under fedora, install_liburing() would put .pc under
/usr/lib/pkgconfig, whereas the pkg-config, by default, looks under
/usr/lib64/pkgconfig.

For the tests, make sure both paths are included in the environment
in case any entity (like xnvme) attempts to use pkg-config during
build.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iab3a4d1f69afc12c56c9fa6b7dd99daaca670e45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15853
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-21 09:33:27 +00:00
Mike Gerdts
69bec87a91 scripts: gdb macros should allow missing symbols
When gdb_macros.py is used with unit tests some of the globals it
expects are not present. This commit handles the relevant exceptions so
a missing symbol does not prevent the use of macros that are initialized
later.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic81f0dfa705839c9a03fb76e934684716b710390
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15999
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-12-21 09:32:24 +00:00
Mike Gerdts
555ca7adc0 rpc: fix python style
A bunch of python files in rpc and scripts directories were missing two
blank lines after the opening comments. python3-pycodestyle-2.5.0-2.el8
was unhappy with this

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee7f2bd4f0ddd96b2be89949a3aa324b2f9ea43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16003
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-12-21 09:32:24 +00:00
Michal Berger
5dcb6e2426 scripts/rpc: Don't load same plugin module more than once
This is only relevant when rpc.py is running in server mode. Recent
changes in argparse under python3.11 force it to raise the
ArgumentError exception whenever subparser of the same name is being
added.

With that in mind, avoid extra call to spdk_rpc_plugin_initialize()
by keeping track of all plugins that were already successfully
initialized.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I89124738b995ba774b6619f97726a5bd69fe1fd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2022-12-20 09:20:56 +00:00
Tomasz Zawadzki
44290e13b4 env_dpdk: add script for comparing DPDK PCI API
Starting with DPDK 22.11, PCI API are no longer public.
In order to implement out-of-tree driver like
SPDK NVMe driver that is compatible with DPDK,
a copy of PCI API headers are required in SPDK.

check_dpdk_pci_api.sh script is intended simplify
the maintanance of the compatibility between
SPDK copies of the headers and multiple DPDK versions.

Please see the included README

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ief028c13564441560425761e7802c6cf07460876
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15857
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-12-16 09:27:11 +00:00
Konrad Sztyber
55b047a776 module/iobuf: introduce iobuf module
This gives us a place to initialize iobuf pools, specify subsystem
dependencies, and execute RPCs to configure the sizes of the pools.

We allow users to configure the size of the pools either through the
options in spdk_bdev_opts or through the new RPC, iobuf_set_options.
The second option has higher priority, so it will override the options
set by the bdev layer.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7c45ace04bc71c8343658f98248fc7babcf24e5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15765
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-12-16 09:06:07 +00:00
Michal Berger
4f857ce593 scripts/setup: Stop checking for broken uio_pci_generic driver
This check was put in place as a workaround for some specific kernel
builds which were mainly shipped under centos8. Since we already
dropped centos8 in the CI and replaced it with rocky8 (where kernel
is actually stable) there's no value in maintaining that anymore.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idd39b5bae888a991d7d628a19bc18acac6570f81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15819
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.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>
Community-CI: Mellanox Build Bot
2022-12-14 08:03:17 +00:00
Michal Berger
eab0c6649d test/nvmf: Make sure ctrl is fully released
There may be some timing issue where attempt to rebind the ctrl from
vfio_pci driver back to nvme, right after issuing the
bdev_nvme_detach_controller() call, fails as the vfio_pci might have
not fully released the device yet.

To mitigate, simply kill the application (as it's not needed anymore
at at point) before starting the kernel_target test - this should give
enough time for the device to be properly released.

As a precaution, make setup.sh to retry the probe attempt in case it
fails.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ifc4f4c18a90605154bf33b078575c8b41129f1f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15767
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-12-14 08:03:17 +00:00
Michal Berger
3f912cf0e9 misc: Fix spelling mistakes
Found with misspell-fixer.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If062df0189d92e4fb2da3f055fb981909780dc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15207
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-09 08:16:18 +00:00
Michal Berger
1f59abaebf scripts/setup: Use driver_override to bind devices
Using new_id attribute is global in scope, meaning that depending
on the kernel's setup seen prior running setup.sh, single write
to it may re-bind ALL matching devices. This doesn't play well
with our PCI_{ALLOWED,BLOCKED} options as they can't be enforced
in such a case. Consider the following example:

  > modprobe -r nvme # all nvme ctrls are detached from the kernel
  > echo 0xdead 0xbeef >/sys/bus/pci/drivers/uio_pci_generic/new_id

  # setup.sh-wise

  > modprobe -r nvme
  > PCI_BLOCKED=some:dead:beef.bdf setup.sh
  # PCI_BLOCKED device still ends up bound to userspace driver.

After this single write, ALL matching devices will end up bound to
uio_pci_generic. To avoid this, we should override preferred driver
on per-bdf basis.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ic4613e33321303b92b47ce3f4d7e1f29ecca3036
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 14:16:40 +00:00
Alexey Marchuk
0ab4de566b pkgdep/debian: Install python3-dev
This package is required to install grpcio:

./scripts/pkgdep.sh --developer-tools
...
  Could not find <Python.h>. This could mean the following:
    * You're on Ubuntu and haven't run `apt-get install python3-dev`.
    * You're on RHEL/Fedora and haven't run `yum install python3-devel` or
      `dnf install python3-devel` (make sure you also have redhat-rpm-config
      installed)
    * You're on Mac OS X and the usual Python framework was somehow corrupted
      (check your environment variables or try re-installing?)
    * You're on Windows and your Python installation was somehow corrupted
      (check your environment variables or try re-installing?)

  ----------------------------------------
  ERROR: Failed building wheel for grpcio
Failed to build grpcio

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I1a9d6154de9ab86ba8062b53ba56002e226daa94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15751
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 14:15:52 +00:00
Michal Berger
5121b9a2fd scripts/qat_setup: Remove VFs' pci id from the target bind driver
Do this before the attempt to bind these devices is made. This is to
make sure script works on subsequent runs.

Scripts itself executes the qat_service which disables potential VFs
of the target PF. In case VFs were previously bound to one of the
uio drivers (via new_id) the next write to that attr will fail not
rebinding the devices again. To avoid that, remove the VFs' id first
and then attempt to bind them to the uio driver.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I4818a2e3e663a4136084ce4bbb85ccfcfde1ae42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15427
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-12-08 12:56:56 +00:00
Kamil Godzwon
2be0335489 scripts/run_vhost_test: fix shellcheck SC2294 warning
The warning appeared during Fedora 37 VM image testing

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2ceff22d08614fec0c27b9931d71753f57cf99bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-08 12:56:18 +00:00
Kamil Godzwon
bdc222cc27 vagrant/create_vbox: add fedora37
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ibaff2db31f17e91a380922eb74dbcb3cc5578d43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15790
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-12-08 12:56:18 +00:00
paul luse
19e2dc3853 configure: rename --with-reduce --with-vbdev-compress
This is in prep for adding a new compressDev accel_fw
module that will contain all of the DPDK compressDev specifics
on it, the vbdev will make calls to the accel_fw instead.

As the accel_fw has SW based compression, we want the configure
option to apply to building the vbdev module but not the accel_sw
software implementation or the upcoming compressdev module.

Renamed to "compress" as reduce is a term specific to the vbdev
implementation of the compression to be provided by the accel_fw
and thus the same reason why we leave the test flag called REDUCE
because it's controlling tests for the reduce library as well as
the vbdev module that is using reduce.  The flag does not apply
to the SW implementation of compression.

This does not affect upcoming accel_fw compressdev module, that
will have its own configure option.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If8ed3e48e1e3dabcaad1cd161289e78122cd9d58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15179
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-12-08 12:55:27 +00:00
Shuhei Matsumoto
d7ad7bca3c bdev: Add mode to bdev_reset_iostat RPC to reset only max/min fields
Both max and min should be reset periodically. We can use the queue
depth sampling poller to reset these but the queue depth sampling poller
is optional. We extend the bdev_reset_iostat RPC to support mode to
reset all or only max/min fields.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I9ce54892f6e808f6a82754b6930092f3a16d51ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15444
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2022-12-08 12:54:23 +00:00
Shuhei Matsumoto
cf4e8664bb bdev: Add bdev_reset_iostat RPC
Add a helper function bdev_reset_device_stat() to reset I/O statistics.
This funciton is used for the bdev_reset_iostat RPC.

We do not have any plan to use bdev_reset_device_stat() outside
lib/bdev. Hence, we do not add this as a public API.

Then, add a new RPC bdev_reset_iostat to reset I/O statistics of a
single bdev or all bdevs.

Resetting I/O statistics affects all consumers. Add a note to CHANGELOG
and doc/jsonrpc.md.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I97af09107b5c3ad1f9c19bf3cbf027457c4fbae7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15350
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-08 12:54:23 +00:00
Artur Paszkiewicz
ec6d94b674 module/raid: show raid_bdev details in bdev_raid_get_bdevs rpc
Change-Id: I30a78b63c5ecc988e2a267d58716ea79f849789a
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14508
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
2022-12-07 08:43:52 +00:00
Xinrui Mao
cd4ac9c792 lib/trace: add trace_get_info RPC
Add rpc method trace_get_info to show name of shared memory file,
list of the available trace point groups and mask of the available trace points for each group.

Fixes #2747

Signed-off-by: Xinrui Mao <xinrui.mao@intel.com>
Change-Id: I2098283bed454dc46644fd2ca1b9568ab2aea81b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15426
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: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
2022-12-05 09:50:38 +00:00