Commit Graph

7623 Commits

Author SHA1 Message Date
Shuhei Matsumoto
fb16799191 bdev: Add spdk_bdev_get_data_block_size API.
iSCSI target will need to get data block size except for metadata.
Other SPDK application may need to get the same information
future. Hence this patch adds an new API spdk_bdev_get_data_block_size
to bdev layer. In the header file, spdk_bdev_get_data_block_size
is located next to spdk_bdev_is_md_interleaved to avoid confusion
by new users.

Change-Id: I0fd2a6d0bcf6a4c18c583f70d96cc5035fc57fe9
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445082
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-07 07:03:27 +00:00
James Bergsten
672b47119c nvme_spec: Add data structures for NVMe Telemetry Log page and Interrupt Coalescing Feature
Adding two NVMe Specification data structures for near future use.

Change-Id: Ic492dc35846239dd771c6a5e210b4f3978cdd03c
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-07 07:01:56 +00:00
Changpeng Liu
8ccf24ed52 nvmf: release the reservation when unregistering one registrant
Unregistering by a host may cause a reservation held by the host
to be released. If a host is the last remaining reservation holder
or is the only reservation holder, then the reservation is released
when the host unregisters.  This may occur with Acquire/preempt
and Register/unregister commands.

Change-Id: If59fe2fdaa69c8ad70f364618d6c281494ad6245
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 06:46:45 +00:00
Changpeng Liu
71ac18d1ad nvmf: add namespace reservation acquire command support
A registrant can obtain a reservation on a namespace by executing
acquire command. Acquire command is associated with specific namespace.
For now only Acquire and Preempt reservation acquire action is
supported, Preempt And Abort will be supported in future.

Change-Id: Ifcbb6b414827393ffc266ceada5982b743716321
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436937
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>
2019-03-07 06:46:45 +00:00
Changpeng Liu
bc1d0b91b5 nvmf: add namespace reservation register command support
Reservations can be used by two or more hosts to coordinate
acccess to a shared namespace, host must register to a namespace
prior to establishing a reservation.  Unregistering by a host
may cause a reservation release, this feature will be supported
after reservation acquire patch.

Change-Id: Id44aa1f82f30d9ecc5999a2a9a7c20b2af77774a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436936
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>
2019-03-07 06:46:45 +00:00
Ziye Yang
791d89bfa7 nvme/tcp: optimize nvme_tcp_build_iovecs function.
Borrow the ideas from iSCSI and optimize
the nvme_tcp_build_iovecs function.

Change-Id: I19b165b5f6dc34b4bf655157170dec5c2ce3e19a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446836
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-07 02:59:33 +00:00
Chunyang Hui
51ab378862 nvme: Add getting supported flag for controllers
New API added for upper level to get controllers'
supported flags.

Change-Id: I51e9d0e57c355fa37f092602a94f4c08deb8898c
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446091
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-07 00:03:34 +00:00
Ben Walker
d92a1fb4ac event: spdk_app_json_config_load no longer requires an event
Take a callback and an argument instead.

Change-Id: I9edda1a9bd506e12f309e52e520e97c0d705d6a2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446992
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-06 08:26:04 +00:00
Ben Walker
46777dd8b9 event: Eliminate extra event when loading JSON config
Now that there is always one event to bootstrap,
we don't need an event here.

Change-Id: Ic87501461a608f5b15745a50b6e15f0f28aa55c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-06 08:26:04 +00:00
Ben Walker
744857a79a event: Eliminate g_app_start_event
Change-Id: Ied9c6ebe5e15ee66d6d9695e55b04b33200dd33b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446990
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-06 08:26:04 +00:00
Ben Walker
e2104c3339 event: Don't construct rpc and json events until bootstrapped
These can now be delayed. Next they'll be converted to thread
operations instead of events.

Change-Id: Id8c183621fb88594a9fd508eff064b4a1557a5b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446989
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-06 08:26:04 +00:00
Michal Mielewczyk
c274db3bf8 OCF: rebase to ocf master 276d91fcd7
- locks moved from ocf to adapter code,
- 'data object' renamed to 'volume',
- context and volume API reorganized.

Change-Id: Id4670ddfcb8eda9aefabc273497498c5bd3db1d5
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444092
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Robert Bałdyga <r.baldyga@hackerion.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 12:09:25 +00:00
Ben Walker
f96b8293e6 event: Don't rely on events capturing arguments during bootstrap
This will make it easier to convert these operations to
spdk_thread_send_msg.

Change-Id: I4c975c22f3967a7197e69ccd230a14bdb97ba332
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446988
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-05 08:43:12 +00:00
Ben Walker
c3ab46a14c event: Funnel the start up actions through a single event
The rest of the stuff is going to be converted to using threads,
but there must be one event at the beginning of time for
now.

Change-Id: Id4689d73e006ccf7bbe001732798e0ae78c603ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446987
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Seth Howell
88179a6554 env/memory: use spdk_iommu_is_enabled internally
This will help keep the definition of that function fresh as things
change around it over time.

Change-Id: Id30864df132459a0ff889a725aa70abe072f3087
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446972
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-05 06:45:11 +00:00
Seth Howell
d9f92cd3e2 memory: add way of checking iommu usage
Since the fuzz tester will be submitting random commands with random
memory addresses and such to the NVMe drives, we want to be especially
sure that we are using the IOMMU while running this test to prevent
memory corruption in the event that an errant command triggers a bad
DMA.
This function exposes to the application whether or not we are using the
IOMMU.

Change-Id: Ie4d26c706967a520967bfc81f72f7b581b792437
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446568
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 06:45:11 +00:00
Seth Howell
961cd6ab7e rdma: register a poller to destroy defunct qpairs
Not all RDMA drivers fail back the dummy recv and send operations that
we send to them when destroying a qpair. We still need to free the
resources from these qpairs to avoid eating up all of the system memory
after multiple connect and disconnect events. Since we won't be getting
any more completions, the best heuristic we can use is waiting a long
time and then freeing the resources.

qpair_fini is only called from the proper polling thread so we can safely
call process_pending to flush the qpair before closing it out.

Change-Id: I61e6931d7316d1e78bad26657bb671aa451e29f4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-04 19:12:48 +00:00
paul luse
5133af0921 test scripts: add -E to sudo git clone in vm_setup.sh
Running as a non-privileged user, sudo git clone won't work
without the -E because it won't get the proxy settings, for those
using a proxy.

Change-Id: I8b471abf0066312b0eb63449d00a5647737c0136
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446162
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-04 19:12:10 +00:00
Zhu Lingshan
3181ef203c scripts/pkgdep: update SUSE distros recognition
OpenSUSE releases (OpenSUSE Leap and Tumbleweed) now use
/etc/SUSE-brand than /etc/SuSE-release as SUSE identification.
According to this change, This commit intends to update
scripts/pkgdep so that it could install packages for OpenSUSE.

Tested on OpenSUSE Leap 15.0 and latest Tumblweed.

Change-Id: I878b6671753084ef718e1f7630a42520a72ea151
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446504
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-04 19:11:03 +00:00
Maciej Szwed
913bd6b6ef bdev/nvme: Remove spdk_bdev_nvme_lookup_ctrlr function
spdk_bdev_nvme_lookup_ctrlr can be replaced with existing
nvme_bdev_ctrlr_get_by_name function.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id85243b13099b2976e1368e481201ccf27ce6ddb

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-04 19:00:23 +00:00
Maciej Szwed
d5565d6bd4 ftl: Use global bdev NVMe controllers list for FTL bdevs
This will make possible to make some NVMe bdev related
functionalities to be common for NVMe and FTL bdevs.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iafc2acc3ac54deb762bc7205180f41d5befbb42b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443552
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-04 19:00:23 +00:00
Maciej Szwed
b91f8c88d4 bdev/nvme: Move bdev NVMe controller to common layer
Bdev NVMe controller will be used in future by other
NVMe based bdevs, so let's move it to common layer.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic485b556d622011b9e36fec1ce13394fc436bbd8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446434
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-04 19:00:23 +00:00
Maciej Szwed
47532e9955 bdev/nvme: Rename nvme_ctrlr structure to nvme_bdev_ctrlr
nvme_ctrlr structre will be moved to common files in next
patch, so let's change its name to more representative.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id51c19437c2d4ba479407201b062266807156c0b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446248
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 <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-04 19:00:23 +00:00
Maciej Szwed
ec2c4c95d9 bdev/nvme: Create common files for NVMe based bdevs
For now these are empty files, but there will be some
code in these files in following patches.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie45d6d3314c424f9af84bb3b0eba00de45215db5

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446247
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-04 19:00:23 +00:00
Maciej Szwed
25d26b910f ftl: Make FTL bdev a part of NVMe bdev
This is a beginning of series that will provide
common code for all NVMe based bdevs.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I097b4a03ef79277659f45d217c7e4e58236c98bf

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445893
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-04 19:00:23 +00:00
Jim Harris
0871b38206 env_dpdk: don't free segments on newer DPDK versions
We specify the --match-allocations rte init parameter
now, which gives us guarantees that memory will be
freed in the same units it was allocated.

Note that if user initialized DPDK separately from
SPDK, we aren't sure if --match-allocations was
specified, so will still mark the segments to not
be freed.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446459
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-04 14:00:16 +00:00
Jim Harris
577b667ac3 test/env: add UNIT_TEST_NO_PCI_ADDR
Similar to UNIT_TEST_NO_VTOPHYS, we need this since
a future patch will result in some of the pci_addr
functions getting linked in via a new dependency
between memory.c and init.c.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-04 14:00:16 +00:00
Jim Harris
725f9de39a env_dpdk: add spdk_env_dpdk_external_init()
This function indicates whether DPDK was initialized
external to the SPDK env_dpdk library.

This can be used in cases where we need to implement
different behavior when DPDK is initialized outside
of SPDK - in that case certain flags that SPDK would
prefer may not have been specified.  This will
be used in the next patch.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-04 14:00:16 +00:00
Jim Harris
d631b855ff env_dpdk: add g_ prefix to init.c global variables
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5d5507ce08418f2b13fce1b7fb2163b23995c90

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446457
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-04 14:00:16 +00:00
Jim Harris
073edd0e4c test/bdev/raid: use strip_size_kb
The strip_size RPC parameter has been deprecated.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446465
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-04 08:44:44 +00:00
Jim Harris
dceb7d6fee bdev/raid: fix typo
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7afde5cfc7e21720119814b1931dcd41d1787da9

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446464
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-04 08:44:44 +00:00
Xiaodong Liu
1b667cf3c4 bdev/raid: check whether supports FLUSH/RESET
io_types like FLUSH and RESET are not always supported
by base bdev modules. For example: virtio_blk bdev doesn't
support FLUSH; ocf or ftl vbdev doesn't support RESET.

Change-Id: I569ea75f8242c8bf082d7d89996ad1c7b1791570
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-03 03:21:49 +00:00
Xiaodong Liu
d77608212b bdev/raid: enable flush support
FLUSH io_type shares a same process with UNMAP, except
that in the end, it calls spdk_bdev_flush_blocks function.

Change-Id: I4529bf29b7cd9f16d10f2edc99a20d25213c9c71
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-03 03:21:49 +00:00
Pawel Kaminski
32c888e575 test/lvol: Implement test case 653
Test resize feature for thin provisioned lvol bdev.
Check if free size of lvol stores equals
to expected values.

Change-Id: Ib0822f1a9c48a6beae816b487cd7889ebfabd2e8
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446254
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-01 22:54:07 +00:00
Pawel Kaminski
6d24eeb21d test/lvol: Implement test case 500
Check if nested lvol stores and lvol bdevs
can be created. Check if free space for lvol store
is properly calculated.

Change-Id: I07386e397c05c5bbdbc29843686812be004592b2
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-01 22:54:07 +00:00
Pawel Kaminski
c4586a75cb test/lvol: Remove test case 400 as not needed
Change-Id: I7521417b7c38848937dab14c890b8ff9019008aa
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446112
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-01 22:54:07 +00:00
Pawel Kaminski
453f9b14ed test/lvol: Remove test case 350 as not needed
Change-Id: Ib8e00997d3c681b80a25b69cdc245bb556ce1f07
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-01 22:54:07 +00:00
paul luse
fa5b07ffef bdev/passthru: updaate rpc param description
For consistency, made similar change on WIP compress patch and
want to make sure the PT bdev module is as correct as possible to be
used as a template.

Change-Id: I9d2d775b7878edd16df3c283c169746fc821c8e5
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446456
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-01 22:50:27 +00:00
Shuhei Matsumoto
abccec1fc8 iscsi: Factor out check data segment length into a helper function
The operation to read data segment of PDU will be enhanced to
support DIF insert operation ofr write I/O.

This patch factors out check data segment length operation into a
function to make the enhancement easier.

Change-Id: I4fbc3bd440192b3723435c9acf3b6b46d3ce4939
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446342
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>
2019-03-01 22:47:21 +00:00
Shuhei Matsumoto
4d3a984756 iscsi: Introduce context structure to setup iovec array to flush PDUs
spdk_iscsi_build_iovs() has the common pattern among segments, and
introduce a temporal context to factor out the common pattern into
a helper function. This will make subsequent patches easier to add
code about DIF strip in spdk_iscsi_build_iovs().

Change-Id: I307d8d0501910071b23a8c0d8eb5e19a4d1684c4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446573
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-01 22:47:21 +00:00
Shuhei Matsumoto
fa7dd957ee iscsi: Reduce required free iovecs from 5 to 1 to flush PDUs
Upcoming patches will support DIF insert and strip feature in
iSCSI target and the feature will be implemented by utilizing
iovecs.

Even when we support the DIF feature, we want to keep current
batched PDU flush, and current requirement that there must be
enough free iovecs to map all segments of a PDU is too strict.

This patch alleviates the requirement by passing remaining
number of iovecs to spdk_iscsi_build_iovs().

Change-Id: I6206322839c363e0ff5abe84bfd524bdc09e23ca
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446176
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-01 22:47:21 +00:00
Shuhei Matsumoto
ca0022f9da iscsi: Unify calculate mapped length and build iovecs to flush PDUs
To know the mapped length by iovecs, pdu length was got first and
then the size of partial written was reduced separately.

This patch unifies these two operations into spdk_iscsi_build_iovs().

Change-Id: Ic6f5eecc902b8e209ef00c010915f476ca16c002
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2019-03-01 22:47:21 +00:00
Shuhei Matsumoto
879386d759 iscsi: Unify build and fast-forward iovecs to flush PDUs
Building iovecs had been done in spdk_iscsi_build_iovs() and
fast-forwarding iovecs for the partially written first PDU had
been done in-line separately.

This patch unifies these two operations into spdk_iscsi_build_iovs().

Fast-forwarding iovecs is necessary only for the first PDU, but the
operation is applied to all PDUs after this patch.

Extra overhead will be negligible because usually at most two
iovecs are consumed, one is for the base header segment and another
is for the data segment.

Change-Id: I8feafac6d280439eb7cf73136107adbac820ae09
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446174
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-01 22:47:21 +00:00
Shuhei Matsumoto
42596fb6b1 iscsi: Use iov instead of iovec for names of variabls and functions
iovec_cnt and iovec_array are very descriptive and good but iovcnt
and iovs are often seen in SPDK and will be enough.

Subsequent patches will add some changes on iovec operations and
simple and familiar names will be helpful to work and review them.

This patch doesn't change any behavior.

Change-Id: I89ff74809a0ddbb358e3fc8fdc353a47338cc3c5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446173
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
2019-03-01 22:47:21 +00:00
Tomasz Zawadzki
154eb3399a thread: add spdk_thread_is_idle()
This function add possibility to check if there are any scheduled operations
on particular thread.

Return from spdk_thread_poll() will be used as a way to load-balance and
signify if any work was performed during the single iteration.
A poller could return 0, but still be registered.

This helps especially in fio_plugin that only checked active_pollers or
messages via spdk_thread_poll().

Change-Id: Id6237278eb3b4bd4922b2abaa3c8ebd5e434d45d
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-01 21:38:02 +00:00
Tomasz Zawadzki
7173e9bd02 thread: add spdk_thread_has_pollers()
This function add possibility to check if there are registered pollers
on particular thread.

Change-Id: I80af06a10c5c1b54fed5bb28a3aa769a52d8a206
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446624
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-01 21:38:02 +00:00
Jim Harris
4680db9e09 nvme: clarify nvme_ctrlr_update_namespaces assignment
The nsdata assignment is strangely aligned with some
variable declarations - fix it to make it more clear.

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

Reviewed-on: https://review.gerrithub.io/c/446447
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-01 16:05:37 +00:00
Jim Harris
b5f13b368b bdev/aio: cleanup bdev_aio.h
* Remove unneeded include files.  Some of them belong in the .c file instead.
* Use create/delete_aio_bdev naming, removing aio_disk names
* Make some similar changes in the bdev_aio.c file for the associated ctx.

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

Reviewed-on: https://review.gerrithub.io/c/446567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-01 13:03:55 +00:00
Jim Harris
db524432dc bdev: remove delete_bdev RPC
This RPC was deprecated a couple of releases ago.
bdev modules now each have their own RPC for deleting
bdevs.  Due to how bdevs are created differently on
different modules, it is simply not possible to
have one delete_bdev RPC that would work for all bdev
types.

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

Reviewed-on: https://review.gerrithub.io/c/442615
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-01 08:50:07 +00:00