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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>