Commit Graph

1638 Commits

Author SHA1 Message Date
Daniel Verkamp
2c0bc38754 bdev: add "split" virtual blockdev example
This virtual block device takes an underlying block device and splits it
into several smaller equal-sized block devices.

Change-Id: I6f6e686c1177b2e4885f7e88809ad329caae55bd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:51:18 -07:00
Daniel Verkamp
efccac8c7e bdev/nvme: remove NvmeLunsPerNs and LunSizeInMB
These were only intended for testing and should be replaced by a virtual
blockdev that can be layered on top of any kind of bdev.

Change-Id: I3ba2cc94630a6c6748d96e3401fee05aaabe20e0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:51:18 -07:00
Daniel Verkamp
c6952d45df event: replace outdated reactor run loop comment
The work item queueing code was replaced with the current reactor/event
model, but the block comment above _spdk_reactor_run() wasn't updated to
match.  Replace the pseudo-code with something resembling the current
behavior, and delete the outdated paragraph below it.

Change-Id: If0686c6a5d063f56d8ea3df9bf3a1e98eef40207
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:06:21 -07:00
Daniel Verkamp
b809cdd3ab env: add spdk_mempool_create() socket_id parameter
Change-Id: I8ab0bb2c6e1fdf1681fbd049a096c1768e54dc27
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:05:30 -07:00
Daniel Verkamp
4c55092882 env: add a name for special "any socket ID" value
Change-Id: I1f339ee5ff80eee9cf7d6378daa71e2f59c158b2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:05:30 -07:00
Ziye Yang
4440cd8d28 nvmf: Solve subsystem add/delete issue
When we do frequent same subsystem add/delete,
we will face the adding issue. For example,
1  Add subsystem A
2  Delete subsystem A
3  Add subsystem A  (Fail in this step).
The reason is that we did not correctly free
the listener resources of subsystems, and this patch
can solve this issue.

Change-Id: I6765a306a3f10c9a0f38c95dbba12e2a4073e705
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-30 11:14:38 -07:00
Ziye Yang
bd2697e6b0 ioat, kperf: fix the testing output.
The previous performance caculation is wrong,
which is smaller than the per channel performance,
so fix it with the average performance data.

Change-Id: I40580e5f70fb4273fa080bbdfb17ce85436446aa
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-30 10:42:36 -07:00
Fan Lu
23dd35a729 test/nvme: add nvme_ns unit test
Change-Id: I4c32a3dfad21e759d63c23683b119a1eb5870545
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-01-30 09:57:38 -07:00
Fan Lu
fb85072562 test/nvmf:add virtual.c unit test
Change-Id: I48aab13b93f3b231c799a82e0044fa3eae8d5df1
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-01-27 10:54:28 -07:00
Daniel Verkamp
aaa87dc00e env_dpdk: allow linking against DPDK shared libs
Detect whether the specified DPDK directory contains static or shared
libraries, and use the appropriate extension when building the library
list. Static libraries are still preferred.

Change-Id: I78c68fd38fba1ea42dd605fb77209651f8cdca75
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-26 10:51:11 -07:00
Daniel Verkamp
bc7b070deb env_dpdk: move system libraries out of ENV_LIBS
The $(ENV_LIBS) variable was including system library linker arguments
like '-ldl', but $(ENV_LIBS) is intended to be used as a dependency for
other Makefile targets, and those arguments don't belong there.

Add the system library linker arguments to ENV_LINKER_ARGS instead.

Change-Id: I247264d287047f1423365806042982b492eec311
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-26 10:51:11 -07:00
Ziye Yang
47ae3957eb nvme/rdma: Invoke rdma_ack_cm_event in exceptional cases
In our previous code, we did not ack the event in
exceptional cases when we get a event via rdma_get_cm_event.
Thus, the code may block with in this statement:
rdma_destroy_id(rqpair->cm_id);
in some exceptiaonal cases. And this patch will solve this
issue.

Change-Id: Iddb6fb5356a5ee0ed04e261a040ba53042fca302
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-26 10:48:23 -07:00
Cunyin Chang
5f3e922a6a nvme: Fail the qpair if it is marked as failure when process the completion queue.
This make sure the qpair failure could be started from upper level application.

Change-Id: I7e04fe36929cc634ddf0078db96fbc40afb38f8c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-01-25 16:31:52 -07:00
Changpeng Liu
919c4b540e doc/nvmf: add NVMeoF kernel based initiator usage
Change-Id: Icea0d7fbf1801cc4df66392ece5ac67e0d9584c0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-01-25 16:31:43 -07:00
Daniel Verkamp
7a8840c09b nvme/identify: convert NVMe-oF to -r TRID format
Change-Id: I620331e2a865d399bddf2e5759f0a832f9c2e86b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 16:31:38 -07:00
Ben Walker
e464823a62 event: Don't check timers on every iteration
Instead, check them every 5 iterations by default.

Change-Id: I9c42922868f8e965a0c801109e59e06aff5adf62
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-25 16:31:31 -07:00
GangCao
4f752e1d75 nvmf_tgt: assign different core for subsystems under RPC mode
Change-Id: Ib751c45f916f66b682d3011397f1f8fe794b08d8
Signed-off-by: GangCao <gang.cao@intel.com>
2017-01-25 15:56:24 -07:00
GangCao
2ea9823c8a nvmf: use same subsystem pointer
Change-Id: I834299db8310dbaf207deee5db4c1d5034f4bedd
Signed-off-by: GangCao <gang.cao@intel.com>
2017-01-25 15:54:46 -07:00
Daniel Verkamp
f3b3fe5b36 autotest: remove duplicated unit test invocations
Now that unittest.sh is run as part of the automated tests, drop the
various unit test calls scattered throughout the tree.

Change-Id: Iea98314bb7f04620d72d81d25e24f8e706b50ce1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 15:19:23 -07:00
Daniel Verkamp
abfda721cd autotest: run unittest.sh
Verify that the unit test script run by Travis CI works in the autotest
environment.

This duplicates some of the current tests - that will be cleaned up in a
future commit.

Change-Id: Icca60dee3348e2675492b9c6294de6aa094b3375
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 15:19:23 -07:00
Daniel Verkamp
7c3214a0ac unittest.sh: move 'make' command into .travis.yml
The unittest.sh script now assumes that the build has already completed
before it is run.

Change-Id: I814b7bf462e8596986b80fe31a93c26c82db7d57
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 15:19:23 -07:00
Daniel Verkamp
18027e12e6 unittest.sh: allow running with valgrind
This doesn't actually enable valgrind on the Travis CI instance, but it
allows the possibility of adding it in the future.

Change-Id: Id3787899e7e0f5f7ebbce3919caea8242b6bf706
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 15:19:23 -07:00
Daniel Verkamp
5135af43fc event: get event_mempool via reactor pointer
Change-Id: I51fad50de0d64382f84ab5824732010eb192cbba
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 11:13:14 -07:00
Daniel Verkamp
8d950879b4 event: pass lcore to set_reactor_thread_name()
Simplify and remove a direct call to a DPDK function.

Change-Id: I08eaf86a48df67e3248eeaa764ae924b784d9277
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 11:13:14 -07:00
Daniel Verkamp
93d635990a event: simplify _spdk_event_queue_run_batch()
Store each reactor's per-socket event mempool in the spdk_reactor
structure to avoid calling rte_lcore_to_socket_id() on every iteration,
and make the function definition an internal, inlineable version
that takes the reactor pointer directly.

Change-Id: I841f7d7594308d7c572f5b7f609913c428bd13d7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 11:13:11 -07:00
Ben Walker
885a86a569 event: Modify reactor to avoid calling spdk_get_ticks()
Minimize the number of times spdk_get_ticks() is called
because it is expensive.

Change-Id: I2f34ca724ec28f42866b76d224dacbe1f31e7a41
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-25 11:10:09 -07:00
Ben Walker
91d7d20c4e event: add a reactor benchmark tool
Change-Id: I57c7ed3475b19ffb8d00354eabb23ba86294164b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-25 11:10:06 -07:00
Daniel Verkamp
6a93946040 ioat/perf: exit early if no channels found
If no channels are available, don't try to run the test.

Change-Id: I4c40635a3da598064da7c94b3c7960a83ba25f8f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 09:26:55 -07:00
Jim Harris
59408ad2ef test/event: rename event to event_perf
While here, make it clear this is a benchmark that
tests internal APIs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie5a57fdcee12b47568542721095c49d28ece5529
2017-01-24 16:42:12 -07:00
Daniel Verkamp
8f0aed2dd3 readme: add a section about CONFIG
Change-Id: I5a6cd28ee9a3b37921355af46dafdd0f4b606c1a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-24 15:43:20 -07:00
Ziye Yang
294e743b99 ioat/perf: make the perf tool more general
Previously each core can only leverage one ioat channel.
With this patch, we can support the following features:
(1) Users can input the number of ioat channel to be tested.
(2) If the number of CPU cores is c, the total ioat channels
are n, each cpu core can use n/c channels.

Change-Id: I6b2179d3d633cb0999a3f4c5f40d4605c8cebc45
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-24 15:22:18 -07:00
Daniel Verkamp
b8ac57f9e4 ioat/kperf: hard-code maximum ring size
The kernel module parameter (ioat_ring_alloc_order) was removed in
kernel commit cd60cd96137f6cb3ea82cace9225626619e7a52d (dmaengine:
IOATDMA: Removing descriptor ring reshape).

This parameter was only used to issue a warning about a too-large queue
depth, so just hard-code the current kernel's limit.

Change-Id: Ib3b32851f538164590b82cb347b02c1c3b9c0106
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Daniel Verkamp
3b3060f14b ioat/kperf: -h option has no argument
Fix the getopt string for the -h switch so that it does not expect an
argument.

Change-Id: I8ea86018d6ee2c61ad698eead9718b2babfe6791
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Daniel Verkamp
c6ddd1b894 ioat/kperf: fix 'modprove' typo in help message
Change-Id: I0bbbf246384b8ef2f96a6101a58db8c9cfd76fa0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Ben Walker
9dd801c86c nvmf: Rename spdk_nvmf_globals to spdk_nvmf_tgt
Change-Id: Iaa1cd5e2f89d82f34b5d3d9fcb914a4f51c5d1e1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:56 -07:00
Ben Walker
3cc3f2646a nvmf: Move trace point declarations to bottom of nvmf_internal.h
Change-Id: I805d5e150feb18bc62156b592d4052c9dbdd6f89
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:55 -07:00
Ben Walker
dc42663305 nvmf: Remove duplicated transport init
This just appears to be a bug.

Change-Id: Icd888fec47a392def646b388a61a1003a7b2aaac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:55 -07:00
Ben Walker
06b9c46561 nvmf: Add utility functions to create/destroy listen addresses.
Change-Id: I58c21caa8f7f0b564c6d8684fe6c7501e810dfa0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:55 -07:00
Ben Walker
ec38ec127c nvmf: Handle wrap-around for global cntlids
64k sessions over the lifetime of a single target is something
that really could happen, so handle this case.

Change-Id: Iaed92b9ff6cd078fcd7c1efe88cf0c860c77c4ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:55 -07:00
Ben Walker
d77c030172 nvmf: NVMe-oF 1.1 adds cntlid to RDMA private data
Change-Id: I44ec5264fc93fa85706750cb23bbd0ed0587db81
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-23 16:46:55 -07:00
Ziye Yang
4133842d36 scsi: fix the scsi read write direction issue.
For iscsi read/write, expected_data_xfer_len
is 0, dxfer_dir is set to SPDK_SCSI_DIR_NONE.
But we can still have read/write op in SCSI layer.
This patch solves this issue.

Change-Id: I950e163fffb06fefaf8a913d1f6de29c96a52264
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-23 16:12:27 -07:00
Cunyin Chang
2d5087b305 nvme: Add assert for g_thread_mmio_ctrlr in sigbus error handler function.
The g_thread_mmio_ctrlr should be not NULL pointer when it enter the
handler function.

Change-Id: I45dba601c672b16e2c6feafd9059bafde0d8f1b4
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-01-23 16:10:09 -07:00
Ziye Yang
4a5a24d537 ioat: cleanup logic in spdk_ioat_submit_copy
Change-Id: I90614b93e1eb6b7b09ca7a21efe5a782f08a9da6
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-23 16:09:11 -07:00
Tsuyoshi Uchida
5ee4728d0c log: define prioritynames[] (#102) 2017-01-23 16:07:29 -07:00
HaoZhiZhang
49daf72e0e nvme: support extended LBA without protection information (#101)
If namespace is formatted with per lba metadata feature and also disable end-to-end protection
feature, host couldn't use per extended-lba metadata area.

Signed-off-by: Zhihao Zhang <thomas.zzh@alibaba-inc.com>
2017-01-23 11:20:04 -07:00
Daniel Verkamp
094524ba9e test/nvme/host: test perf with QD 128
This reverts commit 456540bcf5.

Change-Id: I90ddf9f5adb0546e2819408b46e414e979528e48
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:07:48 -07:00
Daniel Verkamp
f12e7085ec nvme/perf: allow multiple -r (transport ID) arguments
This allows the user to connect to multiple remote NVMe-oF targets or to
specify multiple specific PCIe device addresses to test.

Change-Id: I05b2072b8aa1480891b37b17b5207369344b617d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:07:30 -07:00
Daniel Verkamp
d63a30e39d nvme/pcie: return 1 when PCI address doesn't match
If the user asked for a specific PCI address in spdk_nvme_probe(), we
need to return 1, not 0, for the other PCI addresses that don't match
when enumerating.  0 means to attach the PCI driver, whereas 1 means to
continue enumerating.

With the previous behavior of returning 0, all NVMe devices would be
attached to the DPDK PCI driver, even if the user did not request for
them to be probed, and further calls to spdk_nvme_probe() would not find
any devices.

Change-Id: Ifbbcd7d1abe8ab535b6957855172e66a3e69fbe4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:07:30 -07:00
Daniel Verkamp
df33e630aa test/nvme: run quirks unit test
Change-Id: Ie0d7709f6f5524b6ec80bfce40260d3e518c23d4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:06:14 -07:00
Daniel Verkamp
fe0125e03b autotest: stop excluding test/ from lcov results
Change-Id: I7a190d9901e0f8ce5515ac2c4fdcb25ffa31264f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:06:14 -07:00