Commit Graph

4629 Commits

Author SHA1 Message Date
param
a1ee118769 NVMf : RPC to remove listener
Change-Id: I20093dc7a5ab7147276cb6afb2ac1360649e49e9
Signed-off-by: param <kumaraparamesh92@gmail.com>
Reviewed-on: https://review.gerrithub.io/404012
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-19 16:24:04 -04:00
Chen Wang
a81dd12daf test/lvol: fix the range of test cases when use "all" parameter
Script will produce error when use "./test/lvol/lvol.sh all"
command. The range(1, test_counter() + 1) means run case 1,2,3...
but the case 2 doesn't exist.

Change-Id: I3e36b0e08dee1d2683da5a499a5db136d65d3022
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/404067
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-19 16:16:30 -04:00
Daniel Verkamp
74af349ddb bdev: disable new GCC 7 warning in VTune code
The version of ittnotify_static.c shipped with VTune Amplifier XE 2017
triggers the new GCC 7 -Wimplicit-fallthrough warning.

Change-Id: I8a43beddf464853407639742b1eb89bcac39136d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404211
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-19 15:58:15 -04:00
GangCao
7954a8dc2a iscsi: update the spdk_iscsi_poll_group_poll handling
Change-Id: I9e385e2821592efb0bf7369ebd5a997c9113b5a7
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/404081
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-19 15:56:27 -04:00
Daniel Verkamp
0d7d3a05c3 bdev: consolidate I/O completion message passing
Simplify the handling of I/O completions that need to be sent as a
message so that they are handled in a single place in
_spdk_bdev_io_complete().

Change-Id: Ic94354ad947d0f1f11241f728aa194a105ff96c4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404184
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-19 13:43:53 -04:00
Daniel Verkamp
b20b983b05 bdev: simplify NOMEM control flow
Flip the status != NOMEM check around so that the logic is easier to
follow.

Change-Id: I607e8b5f0cfaa3598a623d0fc3642b11bd42decd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404175
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-19 13:43:53 -04:00
Paul Luse
da58800f21 doc: Programmer's guide template and example for blobstore
Includes the proposed Blobstore Programmer's Guide that is also
and example for other programming guides as well as a template
that can be used to create future programming guides.

Also removes the previous blob.md

Change-Id: Iefbb58b8c3ab015bf8e0cd02ba2fbe6a86c1852c
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/384118
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-19 11:40:08 -04:00
Jim Harris
315630a2fd .travis.yml: tweak IRC notification
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If5d1a4322a66c1d0b33987000ac5f37a310b5cfa

Reviewed-on: https://review.gerrithub.io/404209
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-16 18:52:11 -04:00
Shuhei Matsumoto
db828b10b4 bdev/error: move config scanning to vbdev_error_init
vbdev_error_init holds config information and examine() uses it.

This patch is necessary to keep compatibility from the .INI config
file to the upcoming JSON config file (based on JSON-RPC).

Change-Id: I1601b7e0dad5f93662177c59536776afd974ff07
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403913
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-16 18:22:17 -04:00
Shuhei Matsumoto
19b8d9b10a iscsi: Add the param MinConnectionPerSession to iSCSI options
The static variable g_connections_per_lcore can be configured by
.INI config file. However it had not been added in the iSCSI options
because it was not iSCSI global parameter.

This patch is necessary for JSON config file to configure it.

Change-Id: I12aa1d94dd467969a6853b9fb3f8a627d0d70766
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403623
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 18:22:17 -04:00
Daniel Verkamp
85fd46bfb8 travis: enable IRC notifications
Change-Id: Ifce084485015992fc65696ced3e0e23d8fe7ae02
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403737
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 17:56:54 -04:00
Daniel Verkamp
be69f0ffc8 autorun_post: clean up cov_total.info files
These aren't needed after the combined coverage information is
generated.

Change-Id: I4769cdf471b2b7a6502c3466ffb317c8435f1e3d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403748
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 16:29:32 -04:00
Daniel Verkamp
6cf871d49c autorun_post: collect one instance of ut_coverage
Change-Id: I10c8b17cb160d8ae70a6f1042218aa24f009ceab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403740
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 16:29:32 -04:00
Daniel Verkamp
bba169c1f4 autorun_post: refactor doc collection function
This will be useful for other directories where we only want to keep one
copy.

Change-Id: Iac3cf964936e03c1164ffd961cf8c35a24db5f31
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403739
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-16 16:29:32 -04:00
Daniel Verkamp
b86ae8534a nvmf: increase emulated NVMe version to 1.3
Now that the NVMe-oF target emulated controller supports Identify with
CNS = 03h (Namespace Identification Descriptor list), I believe we
support all of the mandatory parts of NVMe 1.3, so let's increase the
reported VS/VER fields to 1.3.

Change-Id: Iee1052bf9ee1a0954f47770c7e5151886e63f11c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403891
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-16 14:15:47 -04:00
Daniel Verkamp
c937fab3cb nvme: use uint32_t consistently for NSID values
A few places were accidentally storing namespace IDs in uint16_t.

Change-Id: Iae9d709fb20bc1ac0a584ccd9683b721ce5de961
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403886
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-16 14:15:08 -04:00
Daniel Verkamp
8d8f4ac304 nvme_spec: define Get/Set Feature structs
These will allow some simplification and cleanup of the NVMe-oF target
and other NVMe Set/Get Feature code.

Change-Id: I475e3ddbc6261a0033b604de1b6d25d4e2522ee5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403899
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-16 14:14:19 -04:00
Daniel Verkamp
a5fa52a40c test/lvol: fix "uudi" typo
These should presumably be "uuid".

Change-Id: I90ebca1f6e29a12267a7de3591d92143ccca9074
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404050
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-16 14:09:11 -04:00
Liang Yan
e213502e77 test/iscsi_tgt: remove duplicated lines from ip_migration.sh
Change-Id: Ia1310c136fbfef608590326edc9f7dae8f2e5fe9
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403912
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-16 14:07:32 -04:00
Daniel Verkamp
7fd3a82561 bdev: rearrange struct spdk_bdev_io
Move the commonly-accessed fields to the front so they end up in the
same cache line where possible.

Also tweak the types of type, status, error.nvme.sct, error.nvme.sc,
error.scsi.sc, and error.scsi.sk (they can fit in 8 bits), and move the
Write Zeroes splitting variables into u.bdev.

This reduces sizeof(struct spdk_bdev_io) from 272 to 224, in addition to
the better cache line usage.

Change-Id: I4a91fd07f252e7add4a2db179df9c53268672198
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404053
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-16 14:06:36 -04:00
Seth Howell
c0e926b203 examples/kmod: add cache.mk to git ignore
Change-Id: I9814f099a3d784cee06775149111fe197e9fdf13
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404048
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-15 20:50:04 -04:00
Pawel Wodkowski
14c4a4286f scripts/rpc: add timeout waiting for response
Optional '-t' parameter with default 60s.

Change-Id: Id1124d16ad2fc205433ee1e643939502c4641547
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/403350
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 19:36:46 -04:00
Yanbo Zhou
43ae70924c include/json_rpc.h: add comments for public APIs
Change-Id: I64ea74b532a1d1544f294f737eba68b5798e0918
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/403459
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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-15 19:34:51 -04:00
Lance Hartmann
6450f07e4d iscsi: Re-word comment, simplify a return.
Re-word confusing comment in spdk_iscsi_read_pdu() and
simplify a return path in spdk_iscsi_handle_status_snack().

Change-Id: I15bd8b2f45d0e45cf4a4a34533ecb8af0a154531
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/404034
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-15 18:31:33 -04:00
Daniel Verkamp
35260f2b40 configure: add --with/without-vhost options
This option was configurable on the command line and in CONFIG, but it
wasn't mapped to a configure flag.

Change-Id: Ib10619f9a92d40041e2687ee201574e1af838caf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403751
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-15 18:04:24 -04:00
Tomasz Zawadzki
e793fad5e9 vpp: dynamic compilation with VPP
Enable dynamic compilation of SPDK with VPP.

Change-Id: I9f5f7223625cbebec0d6209b5a2ce6bdcc1a04bf
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/401825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Tomasz Zawadzki
11ed34831e net_framework: add registering of multiple spdk_net_frameworks
Its possible for a net_framework to have initialization and finish
functions. This patch adds mechanism to register spdk_net_framework
and executes appropriate functions during subsystem start/finish.

Change-Id: I06d9cb6e98f843794296b833caa3c79735f06f12
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403703
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Tomasz Zawadzki
609fb9a16b net: create NET_MODULE for compiling different net_implementations
Change-Id: Id370631770cb2e090c3efbe95cd86db4f6168c5e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403702
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 17:54:29 -04:00
Daniel Verkamp
21ef6ee50d iscsi: remove unused epoll/kqueue includes
The sock abstraction wraps these functions now, so the iSCSI layer
doesn't need to include them directly.

Change-Id: I900ed96a9cfb5d12c7fd190bc590d00846a47034
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403879
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-15 15:52:05 -04:00
Lance Hartmann
3dcd1942ff iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_execute()
Prepares spdk_iscsi_execute() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I8f7e46495db2c517970e7e5de6ace1b13159b42b
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403883
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
b080d5a875 iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_send_r2t()
Prepares spdk_iscsi_send_r2t() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: Id18c39a7ea0ea748f1ecb842aee9a08594fb2a48
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403878
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
6c07ca54f3 iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_op_nopout()
Prepares spdk_iscsi_op_nopout() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I6a0563c14a1bddf219dd12de67f83b18d6fd82f4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403874
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
7734777a25 iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_op_logout()
Prepares spdk_iscsi_op_logout() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I31f854741906023c734151e3b00b939cdafb2ec4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403864
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
a37939694c iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_op_text()
Prepares spdk_iscsi_op_text() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I21036116936c50c5674e0d11bbb4a30938bf5336
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403860
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
cb7661cdec lib: Handle spdk_get_pdu() failure in spdk_iscsi_op_login()
Prepares spdk_iscsi_op_login() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I95da4ff967667f6439330d7959c6937c55522e9a
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403857
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
48fcd89135 lib: Handle spdk_get_pdu() failure in spdk_iscsi_reject()
Prepares spdk_iscsi_reject() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: Id29bed20cedbb7c42b75fcb0ce6070f561d4a3d0
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403856
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:48:50 -04:00
Lance Hartmann
f6e7137e72 lib: Handle spdk_get_pdu() failure in spdk_iscsi_read_pdu()
Prepares spdk_iscsi_read_pdu() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I9ccfbf41821fb90a203fd8ad026f42fac10e9dbc
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403745
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-15 15:32:58 -04:00
Shuhei Matsumoto
372c5e1ec7 iscsi: Change the type of some negotiation params from uint32_t to bool
ImmediateData in negotation parameters can be controlled by the config
file and currently "Yes" or "No" are valid values of it in the config
file. "Yes" or "No" means almost bool. Additionally, ImmediateData is
defined as boolean value in the iSCSI specification as follows.

However ImmediateData is an uint32_t variable and 0 or 1 are used in
SPDK now.

In the upcoming JSON config file, boolean value should be set to
ImmediateData.

Hence change all variables and constants related with ImmediateData
to boolean in this patch.

InitialR2T, DataPDUInOrder, and DataSequenceInOrder are not controllable
by the config file but these are defined as boolean value in the
iSCSI specification.

Hence change them to bool too.

Besides, AllowDuplicateIsid is used almost as boolean value. Hence
change it to bool too.

InitialR2T=<boolean-value>
ImmediateData=<boolean-value>
DataPDUInOrder=<boolean-value>
DataSequenceInOrder=<boolean-value>

Change-Id: I9f98b219687b3600194563b1d6b85551f4586144
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403237
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:41:22 -04:00
Shuhei Matsumoto
7315fa5ab6 iscsi/rpc: Change the format of get_iscsi_globals about CHAP params
For the CHAP setting of iSCSI targets, JSON-RPC handles the
value of parameters directly and dump of iSCSI targets can be
used to construct directly.

For the CHAP setting of iSCSI discovery session, the same manner
will be applied.

Change-Id: I8731af4273cc89ee5c4ea2f97955e56e3bff202d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/401076
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-14 13:41:22 -04:00
Tomasz Zawadzki
9004ca4a63 net/sock: separate sock.c from posix related functions
This enables more clear division of spdk_sock_* functions
and spdk_posix_* ones.

Change-Id: I329eaf99de9390c8473b57427966dfe6af777abb
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403700
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:08:09 -04:00
Tomasz Zawadzki
b18e10dd22 net/sock: allow net_implementation to not create a socket group
A net implementation should be allowed to not create a socket group.
It would basically mean that it is not participating in polling at all.

This came up during VPP integration. To enable using both types of sockets,
all types are polled within socket group. There is possibility of VPP
not being initalized at all (VPP process not running or failing connecting).

This would result in hard requirement of VPP always running when its
support is compiled into SPDK. Handling NULL here allows VPP to opt-out of
this polling.

Change-Id: Id3489eaba858ee64e8e8a924a6836720e84d9ad0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/403699
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 13:08:09 -04:00
Yanbo Zhou
0752574441 include/ioat.h: add comments for public APIs
Change-Id: I5d510e3a8cf5ae8cc635833a2dae3b9c87ffe0a5
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/403455
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: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-14 13:02:06 -04:00
Daniel Verkamp
bf131d8443 nvmf: remove unused struct spdk_nvmf_probe_ctx
This was left over from direct mode.

Change-Id: I967e59f95cc097da09bb35ea77eb5f7423a4ac8a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403385
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-14 12:54:15 -04:00
Daniel Verkamp
270df2bfd7 nvmf: move g_tgt.tgt to a single global variable
Eliminate struct nvmf_tgt and the g_tgt global variable.

Change-Id: I6b737c4b85dc7d063ead1df5417d344c0f35a30d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403384
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-14 12:54:15 -04:00
Daniel Verkamp
42313b374b nvmf: move g_tgt state and core into nvmf_tgt.c
These don't need to be exposed in the subsystem-wide header.

Change-Id: I5da31b02aaa2fba6e19fbc90dbf4cabc90240b0b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403383
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 12:54:15 -04:00
Daniel Verkamp
0048f79819 nvmf: remove unused #defines in conf.c
Change-Id: I2ef159d41d375c907fa529ff24cb0bd9d7654ea4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403382
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-14 12:54:15 -04:00
Daniel Verkamp
bbbd0d643a nvmf: remove nvmf_tgt_create_subsystem()
After the previous cleanup patch, this was just calling
spdk_nvmf_subsystem_create() without any other functionality, so call
spdk_nvmf_subsystem_create() directly from its call sites and remove it.

Change-Id: I5dc1a0a00025a120d71270c5a5c94e8d74c2a3ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403381
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-14 12:54:15 -04:00
Daniel Verkamp
524e8fc976 nvmf: centralize duplicate subsystem NQN check
This should be enforced by the main NVMe-oF target library, not in the
event subsystem code.

Change-Id: Ibce4fd78710b4a9da374e3d5979df4a16e91533c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403380
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-14 12:54:15 -04:00
Daniel Verkamp
3f987aa84d nvmf: remove spdk_nvmf_construct_subsystem()
After the previous cleanup patches, this function was just calling
nvmf_tgt_create_subsystem() with no other functionality.

Change-Id: I1b20887cade7496093e0b69778df30f818eeb764
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403379
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-14 12:54:15 -04:00
Daniel Verkamp
1d48012929 nvmf: set serial number after creating subsystem
Remove the serial number from the parameters of
spdk_nvmf_construct_subsystem().

Change-Id: Ib6d394cc98fddf85fc878fe0a8c8aa0fdcddf7f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403378
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-14 12:54:15 -04:00