Commit Graph

4568 Commits

Author SHA1 Message Date
Roman Sudarikov
c3bc40a6ef io_channel: add return value to pollers
This will be used to track time used in pollers - each poller can now
indicate if it found any work to do or not.

For cases where it was obvious and the infrastructure was already in
place, existing pollers have been modified to return 0 or a positive
value to indicate whether work was done.  Other pollers have been
modified to return -1 by default, indicating that the poller isn't
indicating anything about whether work was performed.  This will allow
us to find un-annotated pollers easily in the future and fix them
incrementally.

Change-Id: Ifebfa56604a38434fac5c76ba7263267574ff199
Signed-off-by: Roman Sudarikov <roman.sudarikov@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391042
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
Daniel Verkamp
abe4c73f40 io_channel: use spdk_poller_fn consistently
There are two separate function pointer types declared in io_channel.h:
spdk_thread_fn for cross-thread messages, and spdk_poller_fn for
pollers.  They currently have the same signature, but this will be
changing in an upcoming patch, so we need to fix the poller-related
functions to use the correct type (a few were using spdk_thread_fn by
mistake).

Change-Id: I0f0d8f1eea9905395125fc91e0355a49e65be99e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403598
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-13 11:16:20 -04:00
param
963b3a3bf7 nvmf : RPC to remove a listener
Change-Id: I013338b39e5e3946d7e3034b4e98879bd2d252e2
Signed-off-by: param <kumaraparamesh92@gmail.com>
Reviewed-on: https://review.gerrithub.io/403211
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-13 01:01:09 -04:00
Daniel Verkamp
393b657ff2 event/nvmf: remove unused function declaration
This is a leftover from moving nvmf to a subsystem.

Change-Id: I6ad07d3c60dff29e34b92c9cf18ac451cfd00918
Fixes: 2491021f64 ("nvmf: convert nvmf_tgt into an event subsystem")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403374
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:57:56 -04:00
Daniel Verkamp
19100ed580 bdev: rename spdk_bdev_module_if -> spdk_bdev_module
This better matches the style in the rest of SPDK.

No functional change - this is a pure find/replace of
spdk_bdev_module_if to spdk_bdev_module.  Instances of this struct will
be renamed in another patch.

Change-Id: I3f6933c8a366e625fc3a1b6401aee26ee03ba69c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403368
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:55:12 -04:00
Lance Hartmann
c25402c5db lib: Return instead of exit in trace
Modifies behavior of spdk_trace_init() such that it returns
on failure instead of terminating with exit().

Change-Id: I0ba321cddd233008a4b19bc592728230d89a11b2
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403357
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:53:35 -04:00
Seth Howell
f1bf28de41 test: set all coremasks to use 8 or fewer cores.
This will allow us to reduce core assignments for build pool vms to 8.

Change-Id: I405a12f2c1041f77f90add0b5d27abd75f7b948d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/403559
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:51:37 -04:00
Lance Hartmann
01d6310742 lib: Return instead of abort() in bdev
Return NULL on resource failure (spdk_mem_get) instead of
abort()'ing in static bdev function.

Change-Id: I0ee2ce4b7e81cf80546119e3db27c987fa912749
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403578
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:50:54 -04:00
Yanbo Zhou
ca91d671e3 include/copy_engine.h: add comments for public APIs
Change-Id: I838fc6a280d0df3516f432ae02d239290fa9809a
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/402649
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:50:12 -04:00
Jim Harris
b24fdae1a8 Revert "blob: queue sync requests if one already in progress"
BlobFS shutdown path needs to be investigated more with these
changes.

This reverts commit a137b9afd0.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8b04b24e178945d62db20668b9e500f278ae955b
Reviewed-on: https://review.gerrithub.io/403600
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-12 20:37:49 -04:00
Daniel Verkamp
dbcc917d81 scripts/setup.sh: avoid clobbering $bdf variable
The get_nvme_name_from_bdf function uses the variable name $bdf, which
is also used as a loop iterator in its caller; since variables are
global by default in bash, this overwrites the original $bdf and may
cause unexpected behavior like skipping setup of some NVMe devices.

The long-term fix should be to declare all variables local in all
functions, but a minimal, targeted fix is to just rename the variable in
the inner function.

Change-Id: I53a877606a585415e8af525c6162ed7b0f67ba45
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403370
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-12 17:04:38 -04:00
Jim Harris
a137b9afd0 blob: queue sync requests if one already in progress
For any given blob, if an spdk_blob_sync_md() operation
is already in progress, queue additional spdk_blob_sync_md()
operations until the previous one completes.

This ensures proper ordering of writing metadata to
disk.

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

Reviewed-on: https://review.gerrithub.io/401257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-12 16:24:40 -04:00
Daniel Verkamp
9022a59e99 configure: add --disable-tests option
Change-Id: Icb6f3d8cf32e630a53b0c9e362306a09b0a49139
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402966
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-12 13:50:34 -04:00
Ziye Yang
9c5c2cf7c8 lib/iscsi: Move last_nopin update in spdk_iscsi_send_nopin
If we are not in ffp phase, we do not need to update last_nopin

Change-Id: I289beec8437d7117b6261483c333bf5db5fbd11f
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/403166
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 15:48:03 -05:00
Shuhei Matsumoto
1732428a2b bdevperf: IOPS average by exponential moving average
- Cumulative Moving Average (CMA): average of all data up to current
- Exponential Moving Average (EMA): weighted mean of the previous n
  data and more weight is given to recent
- Simple Moving Average (SMA): unweighted mean of the previous n data

Currently bdevperf support only CMA to know average of IOPS. However
CMA may not be appropriate to know the trend of IOPS. EMA or SMA will
be better to take the role.

The formula of EMA utilized in bdevperf is the following

Multiplier = (2 / (Time periods + 1))
EMA: EMA[n+1] = (IOPS - EMA[n]} x multiplier + EMA[n].

One of the source of the formula is https://github.com/patharanordev/ema

Change-Id: Ia7a282f6d173ace470e05b19ee6dee5edf640617
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/398886
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 14:53:17 -05:00
Shuhei Matsumoto
4492fd6cc8 iscsi: Check the combination of CHAP params for discovery before applied
In the upcoming JSON config file, CHAP parameters for discovery will
be specified simply by the value of them.

This is as same as JSON-RPC for target node but different from .INI
config file.

If CHAP parameters are specified by the value of them, the combination
of them must be checked before applied to iSCSI globals.

Change-Id: Idf663796f97581366da945abb8dc351f3975ceae
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403235
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:52:04 -05:00
Shuhei Matsumoto
ed3e889fcd iscsi: Change type CHAP parameters for discovery from int to bool
Currently CHAP parameters for discovery are handled as bool but
they are defined as int. Hence change their type from int to bool
as done for target node previously.

Change-Id: I1e815946d4bdececcdd7cc873a725afbbcb98e50
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403234
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:52:04 -05:00
Shuhei Matsumoto
3af8e26df8 iscsi: Change function names of iSCSI subsystem configuration
Portal, portal group, initiator group, and target node don't use fixed size
array anymore. To use the same naming rule in iSCSI subsystem and in SPDK
is helpful to understand and maintain. Current naming rule is not bad but
to use unified and compact name is prioritized at this time.

This patch changes function names as follows:
- spdk_iscsi_init_tgt_nodes() -> spdk_iscsi_parse_tgt_nodes()
- spdk_cf_add_iscsi_tgt_node() -> spdk_iscsi_parse_tgt_node()

- spdk_iscsi_portal_grp_array_create() -> spdk_iscsi_parse_portal_grps()
- spdk_iscsi_portal_grp_create_from_configfile() -> spdk_iscsi_parse_portal_grp()
- spdk_iscsi_portal_create_from_configline() -> spdk_iscsi_parse_portal()
- spdk_iscsi_portal_grp_array_destroy() -> spdk_iscsi_portal_grps_destroy()

- spdk_iscsi_init_grp_array_create() -> spdk_iscsi_parse_init_grps()
- spdk_iscsi_init_grp_create_from_configfile() -> spdk_iscsi_parse_init_grp()
- spdk_iscsi_init_grp_array_destroy() -> spdk_iscsi_init_grps_destroy()

For example "parse" is already used to explain the operation in portal_grp.c.
Hence using "parse" is familiar and not strange in iSCSI.

Change-Id: Ieff952069d39bd96b7afa1586bfff927968accc2
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403149
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 13:52:04 -05:00
Shuhei Matsumoto
185aeaa1af iscsi: Aggregate all init operations of iSCSI globals into a function
Some variables of struct spdk_iscsi_globals are initialized by using
.INI config file but others are initialized without using .INI config
file.

This patch aggregates all initialization operations into a function
spdk_iscsi_initialize_iscsi_globals().

Next patch move the code to read .INI config file from
spdk_iscsi_initialize_iscsi_globals() to spdk_iscsi_parse_iscsi_globals()
to make implementation cleaner.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: I0bda0de1d8bf1ba5e4b4e5157949fd300ec9ff9d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403148
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 13:52:04 -05:00
Shuhei Matsumoto
9f9ca64422 iscsi: Introduce options structure to iSCSI global params initialization
Upcoming JSON config file will support iSCSI global params initialization.
This patch is an effort for JSON config file to reuse the current code as
much as possible.

SPDK's other libraries use options structure effectively, and hence
iSCSI library also utilizes it.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: I9936a4cac4048adaa5d69233f156887376d7cde1
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403147
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 13:52:04 -05:00
GangCao
a2142f3a33 bdev/qos: add the QoS rate limiting support on bdev
This patch is to add the basic support of QoS on bdev.

Including two major functionalities:

1. The QoS rate limiting algorithm:
	a. New IO will be always queued first also under
	   the no memory condition
	b. Start the QoS IO operation based on the limit
	c. A poller started in each millisecond to reset
	   the rate limit and send new IOs down
	d. The rate limit is based on the millisecond and
	   converted from user configurable IOsPerSecond

2. The Master Thread management:
	a. Add a per bdev channel_count
	b. Whenever QoS is enabled on bdev, if QoS bdev
	   channel is not created, create the QoS bdev
	   channel and assign the QoS thread
	c. When new IOs coming from different channels
	   (threads), pass the IOs to the QoS bdev channel
	   through the thread event
	d. When the IOs are completed from the QoS bdev
	   channel, pass the IOs back to its orignal
	   channel(thread)
	e. Destroy the QoS bdev channel when it is the
	   last bdev channel for this bdev. Defer the
	   destruction if current thread is not QoS thread

Change-Id: Ie4444551d7c3c7de52f6513c9db926628796adb4
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393136
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:48:21 -05:00
Pawel Kaminski
6255620460 test/vhost: Vhost blk hotremove test plan.
Change-Id: I2deb9ae125eecf5592d59902cc5a530993f0fa54
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/402276
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:17:14 -05:00
GangCao
8f1f9137b1 test/nvme-cli: use the macro instead of hard-coded value
Change-Id: Iee2ae343d5e6a292a6c0e188903d80c794202dde
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/403246
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:10:32 -05:00
GangCao
1723a800cf configure: handle the assignment of non-existent and specified DIR
Change-Id: I13e270cb12c8f2796928c72338e50d30b5c8b08e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/403260
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:09:25 -05:00
Daniel Verkamp
7f2ff992ee event: update nvmf subsystem for new registration method
Change-Id: I94bbf1f035aca463530450811200f1f1800d6485
Fixes: 4294719ed7 ("subsystem: make subsystem declaration ...")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403355
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-09 12:57:57 -05:00
Daniel Verkamp
83b019a533 test/autorun_post: list tests that ran
In addition to listing the tests that did not run, add a list of the
tests that did run.

Change-Id: Idf8b3583214a5e05c2d7f1a89a2ea60a2ef68432
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402389
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 12:31:27 -05:00
Changpeng Liu
7448f89536 io_channel: protect critial variables under mutex
Change-Id: If5e16c2ac148fd4818c942e8f57b02671e76ed62
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/403153
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:17:46 -05:00
Pawel Wodkowski
4d36735401 bdev: rework bdev module registration
Currently SPDK_BDEV_MODULE_REGISTER() take many parameters. Extending it
(eg for incoming JSON configuration dump/load) is quite challenging and
error prone. As we are already here in next patches, rework this macro
to take one parameter - the pointer to struct spdk_bdev_module_if.

This patch also remove following macros:
SPDK_GET_BDEV_MODULE - this is not really needed, to find module outside
module translation unit use spdk_bdev_module_list_find()

SPDK_BDEV_MODULE_ASYNC_INIT and SPDK_BDEV_MODULE_ASYNC_FINI - replaced
by bool fields in spdk_bdev_module_if struct.

Change-Id: Ief88e023fbbaee7d5402c838dbecbdffd4dfb259
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402883
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
4294719ed7 subsystem: make subsystem declaration macro just register subsystem
Don't do anything under the scene as adding/removing fields in struct
spdk_subsystem will require both macro change and C file changes.

Change-Id: I11bc0d5758edd7e0e0bd3f93e251d868cd9b1d2b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401850
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 12:07:35 -05:00
Pawel Wodkowski
5333a632ce test/migration: debug VM shutdown issue
Although migration successfully end Test Case 1 fail because
of some VM shutdown issue. This look like test issue.
Temporarily increase verbosity in vm_shutdown  function to debug
this issue.

Change-Id: I3d54775b2e4e7286bd86359a7ac5ca2a9d8ad750
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/402531
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-09 12:07:19 -05:00
Daniel Verkamp
0b04e430f1 vhost: remove unused ENABLE_COREDUMP #define
Change-Id: Ie57b9e63847a59f2d9c3376e3c2f34dda46bf1c7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403228
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
3052a742e3 app/spdk_tgt: add vhost to unified target
Change-Id: I23366906ac8169954331c0f1be75d406607f2f9e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403227
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
a0484cad21 vhost: merge spdk_vhost_startup() into spdk_vhost_init()
This allows vhost initialization to be fully handled in the event
framework subsystem.

Change-Id: Ic0ff11f3765cc553b7ca183027209fb6dd131364
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403226
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
fc0a23627e vhost: add API to set socket path
This lets us drop the basename parameter from spdk_vhost_startup(),
which is a step toward making vhost initialization happen as part of the
event subsystem instead of in the spdk_app_start() callback.

Change-Id: I4fe18c4c3f12b706e73ae74500be58f1582110fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403225
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
245e2e9855 app/spdk_tgt: add 'make install' rule
Change-Id: Ib76031972824231ed824e53a327c7d648842ad6a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403224
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
5175ce96cd app/spdk_tgt: add unified SPDK target application
For now, this includes the iSCSI and NVMe-oF targets.

Change-Id: I9fc4fc1c034930d20420380e96701a9b2d60d9d7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403219
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-03-09 09:56:44 -05:00
Daniel Verkamp
2491021f64 nvmf: convert nvmf_tgt into an event subsystem
This is required as part of our effort to build a single target app that
can run e.g. NVMe-oF and iSCSI targets in the same process.

Change-Id: Ic8426df08899070d709e3675a57f47f64c23c5eb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403218
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-03-09 09:56:44 -05:00
Pawel Kaminski
9df7fac17f test/vhost: Vhost scsi hotremove test plan
Change-Id: I3d6a62499326046bb856ff8ca4d906295f5cd027
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/401173
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 09:55:59 -05:00
Daniel Verkamp
84918cd9fa bdev/null: allow user to override UUID
Change-Id: I2fe5eb46d5e5b67451b472b82cde69e3606c6235
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403222
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 09:55:34 -05:00
Daniel Verkamp
eca9ac03e4 bdev/malloc: allow user to override UUID
This can be used to force specific UUIDs for testing.

Change-Id: I40c403fd00c142552d632dd5f0fbe1ea9a6c9962
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403221
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-09 09:55:34 -05:00
Ziye Yang
f09b9c2ed1 lib/iscsi: Set last_nopin when the connection transfers in ffp
Change-Id: Ib2d38a8c744d2d4951f3503cb029ea6b26bb9eaa
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/403119
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-08 19:09:40 -05:00
Jim Harris
2fb1264121 test/iscsi: disable calsoft tc_ffp_29_4
This test is incorrect - it sends immediate data
greater than negotiated FirstBurstLength, but
expects an R2T.  This is illegal and SPDK is
rejecting the PDU correctly.

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

Reviewed-on: https://review.gerrithub.io/403213
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-03-08 19:09:40 -05:00
Shuhei Matsumoto
1dd0a513a8 iscsi: Extract iSCSI subsystem initialization into a function
This patch extracts iSCSI subsystem initialization by .INI config file
into a function spdk_iscsi_parse_iscsi_globals().

Naming rule was adopted from NVMf-tgt.

By these two patches,
iSCSI subsystem init is done in spdk_iscsi_parse_iscsi_globals().
iscsi subsystem config is done in spdk_iscsi_parse_iscsi_configuration().

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: Ibafb0b62cbb0aa23dd6dd6007dad0345293e65b8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403146
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
a11b2f3058 iscsi: Move poll_group init to the end of iSCSI subsystem init
iSCSI poll_group initialization must be completed before starting JSON-RPC.
This doesn't have any dependency to the other iSCSI subsystem
initialization and completes asynchronously. Hence thisis good to be placed
at the end of iSCSI subsystem initialization.

Besides, object creation of iSCSI configurable components started after
poll_group initialization by .INI config file is aggregated into a function
spdk_iscsi_parse_iscsi_configuration().

Naming rule was adopted from NVMf-tgt.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: I44421803268361f53840a7e47f07ce95c13d1139
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403145
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
43062f2245 iscsi: Pass the callback to poll group initialization as an argument
The next patch will move the location and change the callback of poll
group initialization. Besides it is probable for JSON config file to
change the callback of poll group initialization.

Passing callback as argument increases visibility and flexibility of
code.

Change-Id: Ie4bfd2c60a112bb7c697110ef0efc30a2c098dc8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403144
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
d999e6af7d iscsi: Move connection init right after iSCSI global params init
Pool of iSCSI connections and related variables are initialized in
initialize_iscsi_conns().

Currently initialize_iscsi_conns() is located after configuration of
target nodes by .INI config file.

Configuration of target nodes can be done by JSON-RPC but connection
initialization must be completed before starting JSON-RPC.

iSCSI connections don't belong to iSCSI global params directly and
hence move connection initialization right after initialization of
iSCSI global params.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: I183365b84aa205790b27adf7cc1f632b932195aa
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403143
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
180af18cc7 iscsi: Move PDU, session, and task pool init into iSCSI global params init
iSCSI subsystem have a pool for PDU, session, and task, respectively.

They belong to the struct spdk_iscsi_globals and are initialized by
using the parameters of the struct spdk_iscsi_globals.

Hence their initialization should be located just behind the setup of
parameters of the struct spdk_iscsi_globals.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: Ie39f63ee24c547dcd31a1a06d72d915e8c272864
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403142
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
ef02d13d3e iscsi: Move PG and IG configuration right before target nodes configuration
Object creation of portal, portal group, and initiator group can be
done by JSON-RPC.

This patch moves object creation of portal, portal group, and initiator
group right before object creation of target node.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: If78beabb478923e7c920c09b16e42d6f8aa55775
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403141
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Shuhei Matsumoto
6ef949f276 iscsi: Extract TAILQ_INIT from IG, PG, and target nodes configuration
There are four configurable components, portal, portal group, target node,
and initiator group in iSCSI.

They have a TAILQ to manage their objects, respectively.
Currently each TAILQ initialization is done together with its object
creation by .INI config file.

This patch separates TAILQ initialization from object creation for four
configurable components in iSCSI.

The purpose of the patch series is
- to separate iSCSI subsystem initialization and iSCSI subsystem
  configuration, and
- to develop a new JSON-RPC by reusing the separated iSCSI subsystem
  initialization.

Change-Id: Ia4ac3f06f15acef671e785904f4c687e5d189fbe
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403140
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:37:29 -05:00
Ziye Yang
0c1003e983 lib/iscsi: change type of spdk_iscsi_send_nopin to void
Change-Id: Ie7a940efde885dbf0bb7c085fd17c3991dfa3341
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/403165
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-08 12:11:24 -05:00