Commit Graph

1131 Commits

Author SHA1 Message Date
Liang Yan
57c99c9027 nvmf/test: update request unit test
Change-Id: I04a8facc237ec75ecd23cafa686da1f20707f4dc
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
2016-10-20 12:00:27 -07:00
GangCao
a7399d6bf7 nvme: destruct the ctrlr when failing to construct it
Change-Id: Idbd1d4ea8c47d78daf0cceb3a4eda1afe4d688a2
Signed-off-by: GangCao <gang.cao@intel.com>
2016-10-20 10:56:51 -07:00
liupan1111
11381f3b3c iscsi: fix comment issue. If not specified reactor mask , we only use core 0. (#48) 2016-10-20 09:37:05 -07:00
Ziye Yang
22b12b319e rbd: fix the pool_name and rbd_name wild pointer issue
Previously, we directly assigned the pointer of pool_name
and rbd_name, and this is not safe. After the rpc test,
we found the string value is not correct, so use strdup.

Change-Id: Ibadc57d3cb5b9869b7db5a22c2459769e92edebd
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-19 12:55:39 -07:00
Daniel Verkamp
3b951037a4 spdk_cunit: only evaluate assert condition once
Change-Id: I2e8591df23fcb686c3189b0f6215759d749b84bd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-19 08:09:45 -07:00
Daniel Verkamp
c194ebd833 nvme: move I/O qpair allocation to transport
This requires a couple of related changes:
- I/O queue IDs are now allocated by using a bit array of free queue IDs
  instead of keeping an array of pre-initialized qpair structures.
- The "create I/O qpair" function has been split into two: one to create
  the queue pair at startup, and one to reinitialize an existing qpair
  structure after a reset.

Change-Id: I4ff3bf79b40130044428516f233b07c839d1b548
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-19 08:09:45 -07:00
Daniel Verkamp
1bbe0c00bd bdevperf: report run failure via return code
Change-Id: I8f3e334df6c72cdff6d0d78a38f69b08c0158c49
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 17:45:51 -07:00
Daniel Verkamp
38d41acda4 check_format: check Python style with pep8
Also continue checking for errors after a problem has been found.

Change-Id: Iea37311e54f68fb6ba8c804ad4b2fb92d5238f36
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 13:35:19 -07:00
Daniel Verkamp
823958551b nvme: move ctrlr alloction to transport
Make the transport ctrlr_construct callback responsible for allocating
its own controller.

Change-Id: I5102ee233df23e27349410ed063cde8bfdce4c67
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 13:35:14 -07:00
Pawel Wodkowski
eaecf47ebd bdev: extract common code into separate function
Four read/write functions share the same code for checking
IO len and offset. Extract this code into separate function.

Change-Id: I40f0021e70a60c591b048ad3a70b22eaa07af3b4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-18 12:59:15 -07:00
Daniel Verkamp
62d7cded7a nvme: split out transport-specific ctrlr structure
Change-Id: Icba2a44ff8ff35df09b3f1d8e3282a784e397a06
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 10:35:02 -07:00
Daniel Verkamp
c655efd6a9 nvme: move create and delete I/O queue commands to PCIe
These are specific to local NVMe PCIe devices, so move them out of the
generic NVMe code into the PCIe transport.

Change-Id: Iea2056a4c438b7d3a303b4b5e977ce7aa9e58c05
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 10:14:00 -07:00
Daniel Verkamp
a5790100f2 nvme: add ctrlr construct/destruct to transport
Change-Id: I66842497a02bdb586d38ddc4a38d5b444a9d5dad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 10:13:37 -07:00
Daniel Verkamp
03aead3903 nvme: add qpair operations to transport
Change-Id: Id354ba13515d54bb54a8293569ee83ea72111183
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-18 10:13:37 -07:00
Cunyin Chang
706bace35a test: Create malloc bdev dynamically for nvmf test cases.
Change-Id: I64ec6eb16ff8480ce95fbd2c07d479c4d05965e9
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:32 -07:00
Cunyin Chang
0482640657 rpc: Rename construct_aio_lun to construct_aio_bdev
Change-Id: Iff2d030b854bfda77ed1e5eeea6f46119a5bb50a
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:31 -07:00
Cunyin Chang
134dce2669 rpc: Rename construct_malloc_lun to construct_malloc_bdev
Change-Id: I72f21881264226499a9cd64c72f3ab1b4808b2ec
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:31 -07:00
Cunyin Chang
83620f4e09 test: Add test case for nvme bdev construction.
Change-Id: Iff256c9df8bc6954a18291caa7cc452e7bbe78fc
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:31 -07:00
Ziye Yang
94566ccf21 scsi, param: remove multi_negot_sess_params
There is no string defined, so remove it.

Change-Id: I4abfe0a561efcaeabe522e826ef64f65b24c2386
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-18 07:59:23 -07:00
Ben Walker
93ab45d68c nvmf: Add an accessor for transport name
This allows the entire transport structure definition
to become private.

Change-Id: I9ca19edbfc3cfb75b9b113a89bb2b90bc499ab16
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-14 15:26:45 -07:00
Ben Walker
1e6ffa0394 nvmf: Add a public API header
This changes as little code as possible while still creating
a single public API header. This enables future clean up
of the public API and clarification of the exposed
concepts.

Change-Id: I780e7a5a9afd27acf0276516bd71b896ad301c50
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-14 15:26:31 -07:00
Ziye Yang
07965d9860 rbd: Enable rbd compilation in automation test
When /usr/include/rbd and /usr/include/rados
are detected, enable rbd compilation in autotest.

Change-Id: Ibcd8d444b83402af1996b1e382be204a87dbc6e9
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-14 14:04:15 -07:00
GangCao
9a1d4a00cc test: check valid pointer in spdk_zmalloc before assigning value
Change-Id: I05f70a7aec000e57d20d56cf272bd39e64d5bcc8
Signed-off-by: GangCao <gang.cao@intel.com>
2016-10-14 12:59:40 -07:00
Pawel Wodkowski
39512fde74 bdev/aio: cleanup spdk_bdev_io_complete() calling
Only call spdk_bdev_io_complete() where IO error is seen.

Change-Id: I829e4c589dbcb47017e810035837a4c61c3428f9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 12:59:29 -07:00
Daniel Verkamp
b0e9620b4f nvme: add qpair create and delete to transport
Change-Id: Ibc057972c7eb84ada95fb173d559255e5c86c5ba
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-14 12:46:58 -07:00
Daniel Verkamp
179f122cab nvme: add register access functions to transport
Change-Id: I2e80879e69770b42ea751a8ade7110ac9f4b6d13
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-14 12:46:58 -07:00
Daniel Verkamp
a00852c1fc nvme: add PCI ID accessor to transport
Change-Id: I1776c21d7479f3ef69fe254b8dc4b6d64bbe48bc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-14 12:46:58 -07:00
Daniel Verkamp
d7b7dbfb78 nvme: introduce transport abstraction
This will allow factoring out PCIe-specific code into a swappable
transport so that NVMe over Fabrics host support can be added.

Change-Id: I4df74dd268d655e3b36e8d6114ebe7d79a24844d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-14 12:46:58 -07:00
Ben Walker
b697d2809d env: Adjust for API changes to DPDK PCI in 16.11
Change-Id: Ie76d2d18f65f079f465afef4be5154fa53ab3783
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-14 12:44:16 -07:00
Pawel Wodkowski
0bd08c4536 nvme: don't call request callback if it is inactive
Change-Id: I150ed2dc7cea91f262ee0773c892069a56b68902
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 11:07:50 -07:00
Jim Harris
9459848ce5 iscsi: fix iscsi task refcount for out of order write completions
For large writes that require multiple SCSI tasks (one for immediate
data, then one or more for R2T-solicited data), we bump the refcount
for the task associated with the initial immediate data PDU, to
ensure it does not get freed until all of the child tasks are
completed.  But in some cases this initial immediate data PDU could
complete after all of the R2T-soliciated data PDUs.  The
completion code was not handling this case correctly which would
result in the iSCSI connection thinking it still had outstanding
SCSI tasks when the connection closed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9f9c5322755462d1918fde0075c87c84295cb10c
2016-10-14 11:07:50 -07:00
Pawel Wodkowski
eef39e8d35 ext4test: mount with sync option and print dev stats
Mounting with sync to do more IO during test.
Print dev stats after umounting.
Do not change directory to mounted system, as this is preventing cleanup
trap to umount used path in case of failure.

Change-Id: I2f444b67b1f293c9d7c939f8f94aa5756e20aa26
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 11:07:50 -07:00
Pawel Wodkowski
2025e8f3ce test: bdevio: extend test for vector io
Change tests to use read/write vector and non-vector versions.

Change-Id: I5a97568d3dc2f61d44721f4b0c75331baad417bb
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 19:46:40 +02:00
Pawel Wodkowski
113f8e23a7 bdev: enable IO vector operations
This patch enables vector operation for bdev drivers aio, malloc and
nvme.
The rbd driver still handle only one vector.

Change-Id: Ie2c1f6853bfd54ebd8039df9a0305854ca3297b9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2016-10-14 16:21:24 +02:00
Cunyin Chang
f1fcdeb341 script: Add method to construct rbd bdev.
Change-Id: I2c1e083628ac5a1402b8e89bdf05ca2ed55bc1a5
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Cunyin Chang
b66913d2d4 bdev: Add rpc interface for rbd.
Change-Id: I7ae271d8c687fc438ad74760877479a3d22e70c6
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Cunyin Chang
e578cfe3d4 bdev: Add public function spdk_bdev_rbd_create().
Make sure the function reentrant, prepare for rpc method.

Change-Id: Ie5230e4ac6c9a750e8e779c5e0b67134729c07e3
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 22:07:53 -07:00
Cunyin Chang
076c7d5953 bdev: return error code when try to add duplicate nvme bdev.
Change-Id: Ifdab98324481b110442b08f03669b697d728b851
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 20:36:57 -07:00
Cunyin Chang
d7635243b9 bdev/nvme: replace the structure nvme_bdf_whitelist with spdk_pci_addr.
Change-Id: I6a4e4304f166fb744164ee5eb113a9185b2425b2
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-13 20:36:56 -07:00
Jim Harris
8e03aa1f3c bdev/malloc: create a malloc_task context
This prepares for future scatter-gather support.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie21c4d86c1e932dcaf63cf13d7a7198890595d79
2016-10-13 16:05:42 -07:00
Jim Harris
52d2405f70 bdev/malloc: simplify read/write return values
Return void in main I/O path, and have functions
explicitly complete the I/O back to the bdev layer
if any failures are encountered.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia729b0af555f87c2fb36b92e79a47d19a325de7a
2016-10-13 16:05:41 -07:00
Cunyin Chang
72b4cda87f bdev: remove unused field in data struct nvme_bdf_whitelist
Change-Id: Ib21ef75515277d84cb12cdb6733137cbbe2e4ebc
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-14 01:55:16 +08:00
Cunyin Chang
e1f93d26db script: Add method to construct nvme bdev
Change-Id: I0b81fca543783e918eb1cd5f0d1cb0dd0e5de69c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-14 01:54:46 +08:00
Cunyin Chang
9d15f4bfcc bdev: Add rpc interface for nvme
Change-Id: I0de3c68dc3a02559ca5f302aa541a91ffb1ddb42
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-14 01:54:13 +08:00
Cunyin Chang
1fad9da400 bdev: add public function spdk_bdev_nvme_create().
Add public function which could be used by rpc method.

Change-Id: Id9d2938801e0acdf0f9827ef2990a54c75aec22a
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-14 01:53:31 +08:00
Tsuyoshi Uchida
0af0aa4b2e nvme: change a return value of nvme_ctrlr_cmd_format (#45) 2016-10-13 17:26:33 +00:00
GangCao
f81888b2f9 nvme: add PCI BDF in spdk_nvme_ctrlr to check whether same ctrlr
Change-Id: Ic8eb395bbfcc688e9c999a6d0026b70c24d386e3
Signed-off-by: GangCao <gang.cao@intel.com>
2016-10-13 09:50:32 -07:00
Jim Harris
2848c8d1d3 nvmf: defer start of subsystem until fully initialized
Starting the subsystem consists of firing an event
to the subsystem poller's lcore and performing
I/O channel initialization (for virtual NVMe
subsystems) before starting the poller.

Previously the subsystem would be started immediately
when created, which was before the subsystem's
mode and other parameters (such as a virtual subsystem's
bdevs) have been set.  This resulted in no I/O channels
being allocated in virtual subsystem mode.

So break out the start code into a new
nvmf_tgt_start_subsystem() function, which clients
must call after fully initializing a subsystem created
with nvmf_tgt_create_subsystem().

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56534668887ef99d2e892844acd12194920c3245
2016-10-13 09:12:21 -07:00
Ziye Yang
89b216a2a1 bdev, rbd: Add flush support
Change-Id: I779d52b1af868c7e614faf37a50fecba65757536
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-13 09:09:31 -07:00
Ziye Yang
9dd0f89486 bdev, rbd: Remove the lock and introduce polling strategy
This patch removes the lock in RBD module. And it requires
the librbd library supports rbd_poll_io_events function.

Change-Id: I040a7d8369ab4f69f41d1d0233115f885168f019
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-13 09:09:30 -07:00