Compare commits

...

8 Commits

Author SHA1 Message Date
Ben Walker
4608e917de Update 18.07.1 Changelog
Change-Id: I527b30a852031a79a01a8ad73e63682a3076296a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/424892
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-09-10 22:34:58 +00:00
Jim Harris
f55ffa8b57 Update DPDK submodule to 18.05.1 + SPDK patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6caea461d2b13239dee42f6f96c5b9bdde14c160

Reviewed-on: https://review.gerrithub.io/423157
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-10 21:16:10 +00:00
Jim Harris
f3cedcc7fe bdev: set iovs on correct bdev_io in spdk_bdev_io_put_buf
spdk_bdev_io_put_buf() is responsible for reclaiming
bdev-allocated buffers from a bdev_io.  If there are
bdev_ios waiting for one of these buffers, it calls
spdk_bdev_io_set_buf() on the next bdev_io in the queue.
This will set the iov_base and iov_len on the bdev_io
to point to the bdev-allocated buffer.

But spdk_bdev_io_put_buf() was calling spdk_bdev_io_set_buf()
on the just completed bdev_io, not the next bdev_io in the
queue.  So fix that.

Fixes: 844aedf8 ("bdev: Simplify get/set/put buf functions")
Reported-by: Alan Tu
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibbcad6e35a3db6991bd7deb3516229572f021638
Reviewed-on: https://review.gerrithub.io/424881
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-10 21:16:10 +00:00
Jim Harris
44a43939e8 nvme: add quirk for Intel SSDs without vendor-specific log pages
QEMU emulated NVMe SSDs report themselves with an Intel vendor ID,
but don't support the Intel vendor-specific log pages.  So add
a quirk to avoid confusing error messages.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic41476801ede94d43acb9972217ea7420ca53679
Reviewed-on: https://review.gerrithub.io/423422
Reviewed-on: https://review.gerrithub.io/423928
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-05 20:45:06 +00:00
Karol Latecki
9fca71f514 scripts/vagrant: change create_vbox.sh shebang
pushd and popd not in default path for /bin/bash

Change-Id: I83e0bd1f87005e1c8542ac3db44b26f83eedf96c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421903
Reviewed-on: https://review.gerrithub.io/423925
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-05 20:45:06 +00:00
Seth Howell
bbb2989c26 bdev: increment io_time if queue depth > 0
This value is used to calculate the disk utilization of a given bdev.

Change-Id: I4bf101c524b92bdd21573941e17f61db59c5c6b8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/423017
Reviewed-on: https://review.gerrithub.io/423927
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
2018-09-05 20:45:06 +00:00
Dariusz Stojaczyk
4baae265ca dpdk/pci: support DPDK 18.08 write combined PCI resources
We used to support it by default in our DPDK forks,
but starting with DPDK 18.08, a new PCI driver flag
RTE_PCI_DRV_WC_ACTIVATE is required.

We enable now it for NVMe and Virtio, but not for I/OAT,
as our I/OAT driver currently assumes strong memory
ordering, which prefetchable resources do not provide.

Change-Id: I1a13356e28535981153b3d3e52bfe9d66b6172ae
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422588
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <wenqianx.zong@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2018-08-21 14:31:09 +00:00
Dariusz Stojaczyk
ec611eb485 env/dpdk: link with rte_kvargs by default
Starting with DPDK 18.08, rte_kvargs is a dependency
of rte_eal.

Change-Id: I0cde78f632fc313cec745d41ee519fb8b37de81a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422587
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
2018-08-21 14:31:09 +00:00
11 changed files with 54 additions and 8 deletions

View File

@ -1,5 +1,30 @@
# Changelog # Changelog
## v18.07.1:
### NVMe
Added a quirk to handle QEMU emulated NVMe SSDs, which report an Intel
vendor ID but don't support Intel vendor-specific log pages.
### Vagrant
Modified scripts/vagrant/create_vbox.sh to run as a bash script, since
it explicitly requires bash functionality.
### bdev
Fixed a bug that resulted in incorrect disk utilization reporting.
Fixed a crash when the bdev layer ran out of free bdev I/O request objects.
Fixed a race condition between closing the final bdev descriptor
and unregistering the bdev.
### DPDK
Updated the DPDK submodule to be based off of DPDK 18.05.1.
## v18.07: ## v18.07:
### bdev ### bdev

2
dpdk

@ -1 +1 @@
Subproject commit b6ae5bcff6ca09a7e1536eaa449aa6f4e704a6d9 Subproject commit b20a027e88b5c3b54498a62c075865656efb86e5

View File

@ -54,7 +54,7 @@
* Patch level is incremented on maintenance branch releases and reset to 0 for each * Patch level is incremented on maintenance branch releases and reset to 0 for each
* new major.minor release. * new major.minor release.
*/ */
#define SPDK_VERSION_PATCH 0 #define SPDK_VERSION_PATCH 1
/** /**
* Version string suffix. * Version string suffix.

View File

@ -420,7 +420,7 @@ spdk_bdev_io_put_buf(struct spdk_bdev_io *bdev_io)
tmp = STAILQ_FIRST(stailq); tmp = STAILQ_FIRST(stailq);
aligned_buf = (void *)(((uintptr_t)buf + 511) & ~511UL); aligned_buf = (void *)(((uintptr_t)buf + 511) & ~511UL);
spdk_bdev_io_set_buf(bdev_io, aligned_buf, tmp->internal.buf_len); spdk_bdev_io_set_buf(tmp, aligned_buf, tmp->internal.buf_len);
STAILQ_REMOVE_HEAD(stailq, internal.buf_link); STAILQ_REMOVE_HEAD(stailq, internal.buf_link);
tmp->internal.buf = buf; tmp->internal.buf = buf;
@ -1661,6 +1661,7 @@ _calculate_measured_qd_cpl(struct spdk_io_channel_iter *i, int status)
bdev->internal.measured_queue_depth = bdev->internal.temporary_queue_depth; bdev->internal.measured_queue_depth = bdev->internal.temporary_queue_depth;
if (bdev->internal.measured_queue_depth) { if (bdev->internal.measured_queue_depth) {
bdev->internal.io_time += bdev->internal.period;
bdev->internal.weighted_io_time += bdev->internal.period * bdev->internal.measured_queue_depth; bdev->internal.weighted_io_time += bdev->internal.period * bdev->internal.measured_queue_depth;
} }
} }

View File

@ -78,6 +78,10 @@ ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_bus_pci.*))
DPDK_LIB_LIST += rte_bus_pci DPDK_LIB_LIST += rte_bus_pci
endif endif
ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_kvargs.*))
DPDK_LIB_LIST += rte_kvargs
endif
DPDK_LIB = $(DPDK_LIB_LIST:%=$(DPDK_ABS_DIR)/lib/lib%$(DPDK_LIB_EXT)) DPDK_LIB = $(DPDK_LIB_LIST:%=$(DPDK_ABS_DIR)/lib/lib%$(DPDK_LIB_EXT))
# SPDK memory registration requires experimental (deprecated) rte_memory API for DPDK 18.05 # SPDK memory registration requires experimental (deprecated) rte_memory API for DPDK 18.05

View File

@ -52,7 +52,11 @@ static struct rte_pci_id nvme_pci_driver_id[] = {
static struct spdk_pci_enum_ctx g_nvme_pci_drv = { static struct spdk_pci_enum_ctx g_nvme_pci_drv = {
.driver = { .driver = {
.drv_flags = RTE_PCI_DRV_NEED_MAPPING, .drv_flags = RTE_PCI_DRV_NEED_MAPPING
#if RTE_VERSION >= RTE_VERSION_NUM(18, 8, 0, 0)
| RTE_PCI_DRV_WC_ACTIVATE
#endif
,
.id_table = nvme_pci_driver_id, .id_table = nvme_pci_driver_id,
#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0) #if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
.probe = spdk_pci_device_init, .probe = spdk_pci_device_init,

View File

@ -43,7 +43,11 @@ static struct rte_pci_id virtio_pci_driver_id[] = {
static struct spdk_pci_enum_ctx g_virtio_pci_drv = { static struct spdk_pci_enum_ctx g_virtio_pci_drv = {
.driver = { .driver = {
.drv_flags = RTE_PCI_DRV_NEED_MAPPING, .drv_flags = RTE_PCI_DRV_NEED_MAPPING
#if RTE_VERSION >= RTE_VERSION_NUM(18, 8, 0, 0)
| RTE_PCI_DRV_WC_ACTIVATE
#endif
,
.id_table = virtio_pci_driver_id, .id_table = virtio_pci_driver_id,
#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0) #if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
.probe = spdk_pci_device_init, .probe = spdk_pci_device_init,

View File

@ -403,7 +403,7 @@ nvme_ctrlr_set_supported_log_pages(struct spdk_nvme_ctrlr *ctrlr)
if (ctrlr->cdata.lpa.celp) { if (ctrlr->cdata.lpa.celp) {
ctrlr->log_page_supported[SPDK_NVME_LOG_COMMAND_EFFECTS_LOG] = true; ctrlr->log_page_supported[SPDK_NVME_LOG_COMMAND_EFFECTS_LOG] = true;
} }
if (ctrlr->cdata.vid == SPDK_PCI_VID_INTEL) { if (ctrlr->cdata.vid == SPDK_PCI_VID_INTEL && !(ctrlr->quirks & NVME_INTEL_QUIRK_NO_LOG_PAGES)) {
nvme_ctrlr_set_intel_support_log_pages(ctrlr); nvme_ctrlr_set_intel_support_log_pages(ctrlr);
} }
} }

View File

@ -107,6 +107,13 @@ extern pid_t g_spdk_nvme_pid;
*/ */
#define NVME_QUIRK_OCSSD 0x80 #define NVME_QUIRK_OCSSD 0x80
/*
* The controller has an Intel vendor ID but does not support Intel vendor-specific
* log pages. This is primarily for QEMU emulated SSDs which report an Intel vendor
* ID but do not support these log pages.
*/
#define NVME_INTEL_QUIRK_NO_LOG_PAGES 0x100
#define NVME_MAX_ASYNC_EVENTS (8) #define NVME_MAX_ASYNC_EVENTS (8)
#define NVME_MIN_TIMEOUT_PERIOD (5) #define NVME_MIN_TIMEOUT_PERIOD (5)

View File

@ -76,7 +76,8 @@ static const struct nvme_quirk nvme_quirks[] = {
NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC
}, },
{ {SPDK_PCI_VID_INTEL, 0x5845, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID}, { {SPDK_PCI_VID_INTEL, 0x5845, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
NVME_QUIRK_IDENTIFY_CNS NVME_QUIRK_IDENTIFY_CNS |
NVME_INTEL_QUIRK_NO_LOG_PAGES
}, },
{ {SPDK_PCI_VID_CNEXLABS, 0x1f1f, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID}, { {SPDK_PCI_VID_CNEXLABS, 0x1f1f, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
NVME_QUIRK_IDENTIFY_CNS | NVME_QUIRK_IDENTIFY_CNS |

View File

@ -1,4 +1,4 @@
#!/bin/sh -e #!/usr/bin/env bash
# create_vbox.sh # create_vbox.sh
# #