Commit Graph

2021 Commits

Author SHA1 Message Date
Cunyin Chang
bee8c04a4b nvmf: Move the check of NVMe remove from session layer to subsystem layer.
Change-Id: Icf2f7122c9af0cd6420384c93813d2e79ed9c69e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-04-24 13:57:25 -07:00
Jim Harris
95487138e3 event: add spdk_trace instructions if event group mask specified
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I022bdccf502c6e63e6e8f5a80c5b5ec493262db9
2017-04-24 13:57:06 -07:00
Changpeng Liu
2e9cd69f52 test/nvme: don't run sgl tests when NS is extended LBA format
Change-Id: I7c60b347c787fa271ab385389ddbbc286366f8e9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-04-24 13:56:59 -07:00
Daniel Verkamp
6b91943209 scripts/check_format.sh: check spaces in comments
Fix up all existing spacing errors in comments and add an automated
check for patterns like /*comment*/.

Change-Id: I28f61c93612dc0f8aed66bd509da78e91ea9737e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-24 13:37:41 -07:00
Pawel Wodkowski
9aaccfe3d7 vhost: enable VFIO
Vhost needs to register memory given by guest in VFIO container to be
able to do any DMA using this memory.

Currently DPDK doesn't provide any interface to handle guest memory, so
for now lets find container fd in /proc/self/fd/ directory and provide
some VFIO internal API that finally should extend DPDK API.

Change-Id: Iee9d496367ccd61219068fc0eadc17e786ff0731
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-04-24 12:20:04 -07:00
GangCao
4613ed760c nvme: add the temperature related fields for the health info page
Change-Id: I5231412d122615a92566e81a8712d83577c7327e
Signed-off-by: GangCao <gang.cao@intel.com>
2017-04-24 12:15:23 -07:00
Ziye Yang
177ab97b6e fio_plugin: Reset the cpu core affinity after spdk_env_init
The reaon is that rte_eal_init called in spdk_env_init binds
the master thread on master core, we need to restore the
affinity.

Change-Id: I4eb2d36b74404c1af6d242c4fd5c403bd3d5036c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 12:36:40 -07:00
wenzhong wu
013471a121 nvme/fio_plugin: Modify the fio repo address in README.md
Change-Id: I0169bf9ce1b0720bb74057043529a8aac27d36e6
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
2017-04-21 11:05:13 -07:00
Ziye Yang
da06e2ea03 fio_plugin: make spdk_env_init only once
This patch will be prepare to support multi threads.

Change-Id: I2234ae1d564c9cf17b92c85fd0a414adaa639bf2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Ziye Yang
13fc774bf4 fio_plugin: add NVMe-oF host support in fio_plugin.
Also adds the automation test case for using remote
NVMe devices exported by NVMe-oF target.

Change-Id: I2b839a4eeec33d5b0c30d654e6013ad8c7949e23
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Ziye Yang
e15bd00711 nvme: support new format in spdk_pci_addr_parse
The new format is: domain.bus.device.function

For this format, since we use '.' as separator,
to avoid misusing, we only support the following:

1 domain.bus.device.function ( 4 values provided)
2 bus.device.function  (3 values provoided with domain = 0)
3 bus.device  (2 values provided with domain = 0, function = 0)

Change-Id: Ide03db38b4ac7802cf36f0e536e8b997101d6cd3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Ziye Yang
e02d0bbd5f nvme: add the '=' separator support in spdk_nvme_transport_id_parse
Thus, we can support both ':' and '='.

Change-Id: I4400ba770912a2b20e49432c2e6e2a1bd45c28ed
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Dariusz Stojaczyk
154323ab51 scsi: Include null terminator in Unit Serial Number VPD Page
According to the scsi standard, all ASCII data fields "may be
terminated with one or more ASCII null (00h) characters"
[7.6.10, 4.4.1]. Windows SCSI Compliance tests expect a null terminator
there, so let's include it.

Change-Id: I18fa35295233a163cea711a5c4ff8e3d3e80c4f1
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-04-21 08:12:04 -07:00
Piotr Pelplinski
c2c995c5b0 vhost: make SPDK compile with dpdk-17.05 with vhost patches
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Change-Id: Iff659bb3df9df92c4b6aa9aeaef7244bdf5b3211
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-04-19 20:46:36 +02:00
GangCao
b3cc183a53 nvme/example: add shm_id in identify tool under multi-proc case
Change-Id: Ia5427dda190d984edc79603c4b41e74ce49a7a5a
Signed-off-by: GangCao <gang.cao@intel.com>
2017-04-17 13:09:45 -07:00
Jim Harris
b5b9410da3 nvme: remove DELAY_BEFORE_ENABLE quirk and always wait 100us
A 100us is so small that applying the quirk to the specific
SSDs that require the delay is more trouble than it is worth.
So remove the quirk and always wait 100us before re-enabling
the NVMe SSD during initialization.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id6a8cc6e35d103fffdf135580301fc3e5b27e722
2017-04-17 11:56:36 -07:00
Jim Harris
c3c851f677 nvme/identify: show atomic write unit parameters
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id5bcf3cb1486500a69c68989e28caeb634607954
2017-04-17 11:56:36 -07:00
Jim Harris
fd5d6901f2 nvme: use spdk_likely/unlikely macros in I/O path
Also avoid an spdk_get_ticks() call in the default
case where a timeout_cb_fn is not defined.

On my Intel(R) Xeon(R) E5-2699 v3 system with an
Intel(R) P3700 SSD, these modifications reduce software
overhead per I/O by 3-5% (as measured by the SPDK
overhead tool).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5bb5a87747b15d9e27655fabcd2bc1a40b0b990e
2017-04-17 11:56:36 -07:00
Daniel Verkamp
0911aa83fb test/bdev: temporarily disable bdevperf reset test
The bdevperf reset test only executes in the nightly test run, so this
problem wasn't caught during review.

It gets stuck in an infinite loop and produces lots of log output; turn
it off to avoid filling up the disk with logs until we determine what
broke it.

Change-Id: I7601ba324a0531de3733cf5784ccd46da5618082
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-14 15:42:08 -07:00
Ben Walker
2fbcbe64e9 build: Generate config.h in configure script
This change allows the user to only build
specific directories. For instance:

./configure ...
cd lib
make

Change-Id: I067701befe6bcb5ede8ccdeb561d92db85470b50
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-14 12:35:52 -07:00
Ben Walker
d6dbd80d0d build: Configure script converts dpdk path to absolute path
Change-Id: Ia46a458906157dc38472420d676e6fdca8cb2f8d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-14 12:35:52 -07:00
Daniel Verkamp
5742e9b9e7 nvme: allocate requests on a per-queue basis
Change-Id: I7bec816e518a0a6f2e9fb719128c83d4b908d46c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-12 21:05:24 -07:00
Daniel Verkamp
cd13f280f4 nvme: track qpair within nvme_request
Change-Id: Ia40a1e79db6327c4693731e9bb7a57810795429d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-12 21:05:23 -07:00
Ben Walker
15f910ece7 bdev/nvme: Improve names of fields in config file
Remove the "Nvme" from several field names. The parser
will still accept the old name for backward compatibility.

Change-Id: I6fa86ec359b23fb63960d0aa479a845b36a0977a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
Ben Walker
acd0b4573d bdev/nvme: Allow the user to control the I/O timeout behavior
The user can now not only specify an optional timeout for
commands, but also the action to take when a timeout is
detected.

Change-Id: I7d7cdd846d580e0b3a5f733d398ee9b19d6fe034
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
Ben Walker
193f4f8392 nvme: Queue aborts beyond the abort command limit
Queue aborts that would exceed the abort command limit
in software as a convenience for the user.

Change-Id: I8c1f0380984cc6c0cdb453db961939a7f571b336
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
Ben Walker
ee460db71f nvme: Don't pass admin qpair through timeout callback
Instead, pass NULL when an ADMIN command times out.
We don't expose the admin queue to the user.

Change-Id: If0768d329a689f6f7c3734c9d419e680d7378ed1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
Ben Walker
b9feeb03c1 nvme: Call the timeout callback only a single time
For each command that times out, call the timeout
callback one time if the user registered one.

Change-Id: Iaad39a886468e89bef63fe292c5cad1dce97a57c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
xiajingx
a005708d7d blobfs: Add code to create results folder.
Change-Id: I28a4a1bcce3de6df62a1d4ee2171447c7e26dc9e
Signed-off-by: xiajingx <jingx.y.xia@intel.com>
2017-04-11 09:51:26 -07:00
Ben Walker
c97ea5ad8d bdev: Modules no longer register bdevs as io_devices
Instead, they register some internal structure of
their choosing.

Change-Id: Id1f8c563d0a2c6f1066d741f86b8aa6fe09b6319
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-07 11:19:36 -07:00
Ben Walker
10f9391a22 test: Shorten some relative paths using readlink
Core dumps stop working if the path is longer than 64 bytes.
Use readlink to shorten some of the very long relative paths.

Change-Id: I5e7eb6580ca581c5ac3a71afb7b62953836e2660
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-07 08:14:34 -07:00
Ben Walker
9d73eed8a6 bdev: Consistently pass user context to fn_table calls
Some calls were passing bdev->ctxt, some calls just
bdev. In most of our implementations those are the
same pointer, but they aren't necessarily.

Change-Id: If2d19f9eef059aded10a917ffb270c1dc4a8dc41
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-07 08:14:34 -07:00
Daniel Verkamp
4f9f191c89 nvme/perf: align buffers to block size for libaio
This is required by libaio.  Previously, buffers were aligned to 512
bytes, but 4K devices need 4K-aligned buffers.

Change-Id: I96080e72dc77e0e72f426f7c9fe98b6724f66e1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-06 14:57:33 -07:00
Ben Walker
8e97d585de nvmf_tgt: Rename g_last_rpc_core to g_last_core
This used to be only for RPC, but now it is used in both
the config file and RPC paths.

Change-Id: I138a23f87e9042be60460bc5451470a2443ac3c3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:16:38 -07:00
Ben Walker
7f7c03a935 env: Remove all use of RTE_LCORE_FOREACH
Replace with an env abstraction.

Change-Id: I706374d265a270890e1f3ca920a10a0dc09624b0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:16:37 -07:00
Ben Walker
c80454a283 event: Eliminate reactor mask
The DPDK mask and the reactor mask are always the same.

Change-Id: I83d3ab87cdfb405574f6472cfc222d3f311abdb1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:16:29 -07:00
Ben Walker
84230409fd examples: Simplify register_workers algorithm
Several examples have a function to associate workers
with threads. Simplify that algorithm.

This seems to just shift some of the complexity
from register_workers down to main, but in the long
run the DPDK threading will get abstracted into
env as well and greatly simplify that part.

Change-Id: Ic106dde58fa5351a1ce0a058161b08062e121d3b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:13:52 -07:00
Ben Walker
16ae587966 env: Move lcore functions into env layer.
They were previously in the event library.

Change-Id: I24ffd8f771e895ccf5395c8120423cd114893139
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-04 09:19:01 -07:00
Jim Harris
9ee30b87b7 fio_plugin: enforce thread=1
The SPDK fio plugin only supports jobs as threads, not separate
processes.  So log an error and bail if --thread=1 is not
specified.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I318f924e0b7fbb76f11427a447dd7c5fc0ebc221
2017-04-04 09:12:41 -07:00
Prashanth Nayak
b512e01a50 nvmf: Move the nvmf_tgt app init and start functions out of main().
Added a new function spdk_nvmf_tgt_start() that initializes and
starts the nvmf app. The main function now only parses the command
line args and calls into spdk_nvmf_tgt_start().

Change-Id: I886a4021762a11c3c1f6ebfff5ed72adc409a34e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-03 17:23:39 -07:00
Jim Harris
0b56a5b4cf configure: add output indicating creation of CONFIG.local
This is primarily to make it clear to the user that configure
was successful and can now proceed to "make".

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2f1b7e3edd1987efb970becc518488162a0f2de2
2017-04-03 14:01:12 -07:00
Ben Walker
9dd998cdc0 Add a configure script to generate the CONFIG file
Add a configure script in the root of the repository
that looks and feels like one that would be generated
by autotools. This script simply generates a CONFIG
file for you, which used to be done by hand.

Now to build SPDK you can do the following:

./configure --with-dpdk=path
make

Change-Id: I44ebb91f0cb1468b86da4c0033ac1406595d4967
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 13:30:12 -07:00
Dariusz Stojaczyk
86840974dc iscsi: dont create portal group from partially invalid portal list
Changed spdk_iscsi_portal_grp_create_from_portal_list so that it fails
if any given portal is invalid.

Change-Id: I708621a538a52abfed4dce01668d26602a5ada59
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-04-03 13:28:42 -07:00
Ben Walker
cf90e4de16 bdev/nvme: Simplify logic in remove_cb
This was doing an extra loop iteration.

Change-Id: Iaf1a1e4d5faaa3100d3c0fca6c7c3a8d1cd77101
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 13:26:07 -07:00
Prashanth Nayak
1e4920b261 nvme: remove unused rte_* includes
Change-Id: I9a1e6fab58af3a4b7ba5d408c393a00fc177d3a6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-03 12:31:12 -07:00
Ben Walker
36a793ad63 nvme: Add a quirk to delay before enabling
It has been discovered that some devices require
a very small delay before writing CC.EN to 1 after
CSTS.RDY goes to 0.

Change-Id: I73d31726d17ebf5bbec7ee528e2f98fcd05234dd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 11:18:15 -07:00
Ben Walker
652d48d5f5 nvme: Fix up long lines in nvme_quirks.c
This isn't the indentation pattern I would have chosen, but
it's a complicated negotiation between what I want and what
astyle will let me get away with.

Change-Id: I4909587823931842ac3f227134e1d05e7d80da74
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 11:18:15 -07:00
Ben Walker
f190418231 nvme: Simplify latency page quirk
Any Intel device reporting device ID 0x0953 needs this quirk.

Change-Id: I690b01ecf05105df00ec8cf6f2da7f7c0a601aa8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 11:18:15 -07:00
Ben Walker
2efe9aa7bf nvme: Add all known DIDs for striping quirk
Update the list to include all new DIDs.

Change-Id: Ib00da939587010d44c097da07ec0625890e4c8cc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 11:18:15 -07:00
Daniel Verkamp
7f957f56c1 bdev/nvme: add HotplugEnable option
Change-Id: I53fb7c3b469d5d5bb5b86c095bf1efc914299ec7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-03 11:17:47 -07:00