Commit Graph

232 Commits

Author SHA1 Message Date
Pawel Wodkowski
642697878f iscsi/rpc: fix several bugs of set_iscsi_options
In python script:
- timeout should be nop_timeout
- min_connections_per_core was min_connections_per_session by mistake.
- max_queue_depth was not included.
- call_cmd was missing.
- A space should be added after semicolon ":"

In SPDK library:
- type of options was not int32_t but int. Hence decode failed.
- type of options in dump were not correct.

Change-Id: Iaa79236c03d368cdf286a72c2386509ffa81530f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/419553
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-07-25 19:22:08 +00:00
Changpeng Liu
01831056c5 env/app: add unlink hugepages option to app
DPDK has an option "huge-unlink" which can be used to
remove mmapped files after EAL initialization, SPDK
doesn't enable the option by default, ethier DPDK,
while here, export a new parameter which can let
user to decide enable it or not.

Fix issues #349 and #350.

Change-Id: Ic516b9f48f7b1c7c51712cc7bb7475ed904ff24b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/419156
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-07-17 07:06:53 +00:00
Leonid Ravich
2a92c30292 lib: return error in case of start_fn is null in spdk_app_start()
instead of hitting S11 on event

Change-Id: I7af2a1961bf2c05005a23c3f50eadbcd23e7e38f
Signed-off-by: Leonid Ravich <Leonid.Ravich@dell.com>
Reviewed-on: https://review.gerrithub.io/416972
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-27 20:52:37 +00:00
Vishal Verma
5b822d4c92 event: Add tsc stats to the reactor
This adds tsc statistics (busy, idle or unknown) to the reactor.
It will help measure actual time we are busy vs. idle during
an event run or whenever a poller kicks in.

Change-Id: Ife556a27a30dab842488bacb5fbee0d4297745c3
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Reviewed-on: https://review.gerrithub.io/412695
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-06-22 17:25:00 +00:00
Ziye Yang
931e6e51c3 event: change the debug -t option with -L
Reason: -t has conflicts with other option
in bdevperf or perf(nvme).

Change-Id: I4d641b55c609f4cd0425594b461b1a8b279e8dd8
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/415930
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-06-20 17:42:59 +00:00
Jim Harris
3090f4012e bdev: add set_bdev_options RPC
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I060679165bd4215d010e74407aedd1aedc20fb9a

Reviewed-on: https://review.gerrithub.io/414713
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-14 14:57:11 +00:00
Pawel Wodkowski
7efc7b8302 nvmf: add JSON config dump
Change-Id: I8ed62b7da26a4d1f831dfa198c42ac12b379c92d
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410271
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>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
2018-06-13 23:33:02 +00:00
Daniel Verkamp
6546fd10f8 nvmf/rpc: add max_namespaces to get_nvmf_subsystems
This is one of the construct_nvmf_subsystems parameters, so we need a
public API to retrieve it for informational purposes and for the
JSON-RPC configuration dump.

Change-Id: I8a7cafa487209311e964ea9ff1b8e09ee8b23c07
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414864
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-13 16:43:38 +00:00
Pawel Wodkowski
3b0759d955 nvmf/rpc: ze-out name array in old format
JSON library will try to free any non-NULL string pointers so this array
need to be initialized.

Change-Id: Id352cc562cae4d4d11de3dcfca6115d6d0948ddc
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/414857
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-06-12 21:12:54 +00:00
Daniel Verkamp
194d6af65d nvmf: allow setting namespace UUID in config file
Change-Id: I768129eec3b08c43ef27c3ba8c237d77ebd49178
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414681
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-12 20:24:00 +00:00
Liang Yan
e60e783262 event/app: exit app before trace setting if no DEBUG macro
Change-Id: I7c3194996e2ab669601f5d43b72d100476fe1ade
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/414739
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-06-12 17:43:46 +00:00
Shuhei Matsumoto
46a3d50baa subsystem/nvmf: Add set_nvmf_target_options/config RPCs
Two new RPCs allocate and initialize options and conf dynamically.
Initialization of NVMf subsystem skips initialization of them
if they are already allocated.

To use and test them, add python script too.

Change-Id: I3be83c33edf9960cb4340d52abb47b7331a6fb92
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/406932
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-06-12 17:41:29 +00:00
Ben Walker
a83f91c29a thread: Replace #include of io_channel.h with thread.h
Change-Id: I6babd4cf990bf19b510db88bdfb0ca81e29d9252
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414700
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 15:24:07 +00:00
Ziye Yang
9f697e0fe2 nvmf: change judgement to assert
Reason: It should never fail, which should
comply with the logic in nvmf_tgt_destroy_poll_group.

For the current case, if the judement fails,
we still add the g_active_poll_groups, the logic
is not correct. And according to the analysis,
the poll group creation should not fail.

Change-Id: I408ee1e8099f709330b8a6ffd26cf27d6a549bed
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/414565
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-06-12 01:32:35 +00:00
Vishal Verma
48738e383d event: Remove timer poll count checks
This removes checks for timer poll iterations
within a reactor.

Change-Id: Id8eea26dab201064123575998b3b24e1f609ac5a
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Reviewed-on: https://review.gerrithub.io/412694
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:26:21 +00:00
Jim Harris
a2b5c37ac9 event/app: add spdk_app_usage
This allows applications to trigger printing of the
default SPDK command line option usage messages if
needed.  This could be useful in cases where the
app expects the user to specify a parameter and
finds the parameter was not specified after
spdk_app_parse_args() is finished.

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

Reviewed-on: https://review.gerrithub.io/414472
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-11 17:39:56 +00:00
Daniel Verkamp
57ae6bf646 nvmf: allow overriding namespace UUID in RPCs
The default is still to retrieve the bdev UUID, but now the end user may
also specify their own UUID if desired when adding NVMe-oF target
namespaces via construct_nvmf_subsystem or nvmf_subsystem_add_ns.

Change-Id: I950eb84b9fdecbc2eae8ca39d9acd6acabe8d31d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414269
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-11 07:41:39 +00:00
Ben Walker
8c9508f9b3 nvmf: Correctly unregister nvmf tgt as an I/O device
Change-Id: I9552354d620986c2a3d6b071f32b587e9e683198
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413861
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-06-07 16:07:38 +00:00
Srikanth kaligotla
8580daa1ac nvmf: SGL support for NVMF RDMA Driver.
Change-Id: I447754c69de432b5a65dc8c1d9ae690926e88c51
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Srikanth kaligotla <kalis@netapp.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/410302
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-04 17:15:49 +00:00
Shuhei Matsumoto
59b3479bfd subsystem/iscsi: Add set_iscsi_options RPC to set global params
An new RPC set_iscsi_options allocates and set options dynamically.
Initialization of iSCSI subsystem skips initialization of options
if it is already allocated.

To use and test this RPC easily, add python script too.

Change-Id: I71e252da6495a194ae9a1a9e3aaae4feb543487a
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/403624
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-01 20:15:59 +00:00
Dariusz Stojaczyk
f8387acaa5 event/app: fix setting "single-file-segments"
This got broken in 93cb4a31 [1]

[1] 93cb4a31: event/app: Refactor initialization of app environment
in spdk_app_start()

Change-Id: I9dca9694d50b9132761b57da192ecd1a774337ab
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/413168
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-01 20:14:32 +00:00
Shuhei Matsumoto
abfed22981 iscsi: Add JSON config dump for iSCSI subsystem
Add base of JSON config fump for iSCSI subsystem in this patch.
JSON config dump for target node is already merged and it is added
to the JSON config dump for iSCSI subsystem first.

Besides, spdk_json_write_named_* APIs are applied to JSON config/info
dump for target node to reduce and clean the code in this patch.

Config dump for global parameters will be handled in different patches.

Change-Id: Iee786fbda3683c75a47c55b16d6db0235ac60896
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/406493
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-09 17:18:30 +00:00
Shuhei Matsumoto
28589dbbe8 rpc: Add start_subsystems_init RPC to start subsystems when -w option is used
RPC state of the RPC server, g_rpc_state is set by spdk_rpc_set_state(state).

If the command line option '-w' is specified, g_rpc_state is initialized to
SPDK_RPC_STARTUP. Otherwise, g_rpc_state is initialized to SPDK_RPC_RUNTIME.

When g_rpc_state is initialized to SPDK_RPC_STARTUP, SPDK start RPC server
and wait for start_subsystems_init RPC.

When SPDK receive start_subsystems_init RPC, SPDK start initialization of
subsystems. The RPC waits for completion of initialization of subsystems.

When SPDK completes initialization of subsystems, SPDK change
g_rpc_state to SPDK_RPC_RUNTIME and then start application.

Upcoming new RPCs to initialize options of NVMf-tgt and iSCSI-tgt will be
able to be allowed before start_subsystems_init RPC is called.

Change-Id: I4fa9c22b64e2fdbc9b9fdb2c47f0018f73f84f7e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/406919
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-03 19:48:15 +00:00
Shuhei Matsumoto
e008db08e7 rpc: Add state_mask to each RPC method to make sets of RPCs
Add state_mask to each RPC method and state to RPC server, respectively.
State mask of RPC method is set at registration. State of RPC server
is changed according to the state of the SPDK.

When any RPC method is recieved, if the bit of the RPC server is on in
the state mask of the RPC method, it is allowed. Otherwise, it is
rejected.

When any RPC is rejected by state_mask control, the new error code
is returned to describe the error clearly.

Change-Id: I84e52b8725a286e9329d61c56f498aa2c8664ec1
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/407397
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-03 19:48:15 +00:00
Dariusz Stojaczyk
90dfc392cc event/reactor: take into account ring metadata size in event mempools
See previous patch for some background.

rte_mempool uses the following formula for its ring allocation size:
```
count = rte_align32pow2(mp->size + 1);
sz = sizeof(struct rte_ring) + count * sizeof(void *);
sz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE);
```

With count==262144, rte_mempool was trying to allocate
(2MB + sizeof(struct rte_ring) physically contiguous memory.

Change-Id: I69e8cdcbcaaaa8a053540588afa6eb2fd36c525b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408926
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-03 19:46:11 +00:00
Dariusz Stojaczyk
408bb168ac event/reactor: take into account 1 extra slot in event mempools
The following assumes we use env_dpdk underneath.

rte_mempools use rte_rings internally. When creating
a mempool with capacity N, we internally try to create
a ring with least N+1 size. That's because rte_rings
need one extra empty element to differentiate between
the full and empty state. To make it worse, the ring
size has to be a power of two, so rte_mempools use
`rte_align32pow2(mp->size + 1)` for the size calculation.
And rte_ring memory has to be physically contiguous.

Allocating a mempool of capacity 262144 requires at
least (2 * 262144) * sizeof(void *) = 4MB memory. This
made us require at least 2 physically contiguous
2MB hugepages.

Change-Id: Iabc984a29a60c0b2cf5309a78cd1bcce28ac7b3d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408925
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-30 17:25:51 +00:00
Young Tack Jin
d546e3d958 app: pci_black/whitelist on global config and command line option
Ioat config's Whitelist is late for DPDK EAL and single application
occupies all IOAT copy engines.

Change-Id: I8749f740ff1bec5bb022b39fc2256880369b467a
Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/405911
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-30 17:25:41 +00:00
Pawel Wodkowski
5b424282c1 nbd: add JSON config dump
Change-Id: Ib3c97c6d9152a3f61a56d640c875151bdab40278
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/408320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-24 21:46:42 +00:00
Shuhei Matsumoto
df8a61c253 app: Fix the wrong order of usage of command line options.
I add the usage comment for -u option into the middle of -s option
by mistake.

Change-Id: Iee013122f9bf3b58969c3ff14b0cc5b079f125a3
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/408595
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-23 15:53:14 +00:00
Ben Walker
6518338fa0 event: Handle invalid lcore passed to spdk_event_allocate
Change-Id: Ib438db398f899946ef7d2f1be3d4c7424ed2fbcf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408252
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-04-19 15:48:36 -04:00
Ben Walker
1d94536417 nvmf: Bound the maximum number of namespaces that can be configured
Make the bound enormous, but bound it so that we don't run out
of memory.

Change-Id: I014b3df3be92ae8bd85fea95f514225adc3eefe2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408247
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-04-19 15:48:36 -04:00
Seth Howell
4ca87a01b4 nvmf: make spdk_nvmf_subsystem_remove_ns asynchronous
Update the thread-local caches with new namespace data during each call
to spdk_nvmf_subsystem_remove_ns to handle the case where the user
requested to remove a namespace and then immediately add a different
one at the same namespace id. This makes the call asynchronous.

Change-Id: I8fd1968f7da78966386de18506b98d403b82d80e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/408220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-18 15:41:00 -04:00
Ben Walker
4d2e54a635 nvmf: Handle addresses that don't contain a port
Change-Id: I0c0c455ccf6f00ff95e7f1d2f0391fc44c6b4b2a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408219
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-04-18 15:35:12 -04:00
Daniel Verkamp
0a162815d6 Revert "subsystem.c: make subsystem_remove_ns asynchronous"
This reverts commit 498f9add11.

Making the subsystem removal asynchronous seems to be triggering an
intermittent failure in the NVMe AER test.  Let's revert this for now
until we can diagnose the issue.

Change-Id: Ie1d598f0d5cce07e6869d87cd8388848caa78e46
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408118
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-17 20:17:27 -04:00
Seth Howell
498f9add11 subsystem.c: make subsystem_remove_ns asynchronous
Performing a subsystem update on each poll group after the addition or
removal of a namespace allows us to avoid the case where we pause a
subsystem, perform a removal, then an addition, resume the subsystem and
don't update the channel for that subsystem. This, however requires that
spdk_nvmf_subsystem_remove_ns be asynchronous.

Change-Id: I856572c02e6267f708da3a956accbbedae7260fb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/407012
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-17 18:23:19 -04:00
Pawel Wodkowski
a3f8876777 vhost: add JSON config dump
Change-Id: If6c9ea6f9959b6c34ef90b8e382ceba9889040ee
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/404373
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>
2018-04-16 19:27:33 -04:00
Shuhei Matsumoto
e5c5740911 app: Add "NoPci" to command line options
Add "NoPci" to command line options as '-u' to avoid lost of
compatibility when JSON config file is supported.

Change-Id: I8ee429f4f66f8837da22ef8e259a1a011edd9257
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/407036
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-16 12:42:15 -04:00
Shuhei Matsumoto
67f2fb6363 app: Fix scan-build errors due to optarg handling
Change-Id: Ia952f0a962ee63d25ac5297498bffb7e70e5204b
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/407029
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-16 12:42:15 -04:00
Daniel Verkamp
be0eef0a0d nvmf: check for missing NQN in conf parsing
Avoid dereferencing a NULL pointer if NQN wasn't specified in the
configuration file.

Change-Id: Ie43111fce2c5fcf06bad00af10413a665dfbc45f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/407484
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-12 17:56:21 -04:00
Ben Walker
2b79861deb nvmf: Make spdk_nvmf_tgt_listen asynchronous
This was internally asynchronous already, but make it
explicitly asynchronous so other code can properly
wait on the operation to complete.

This fixes an intermittent CI crash.

Change-Id: I81c9b19673566047dcffa94796236ca9fd7fa7d0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406226
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-04-05 12:54:31 -04:00
Daniel Verkamp
9770ee7817 nvmf: reduce log level of informational messages
Change-Id: I595f0ec871174557a35811fe3b102c33a5a60ab0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405931
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-05 12:06:45 -04:00
Shuhei Matsumoto
0fed4e0704 copy_engine: Support dump config text for IOAT config
IOAT module of copy engine requires config information in the .INI
config file. However dump config text is not supported yet.

Dump config text is legacy feature but this becomes a preparation
for the upcoming JSON config file.

Change-Id: I9b7349cac9c00ca3ce1d944a84cbc445a6f1aec4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405845
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-04-04 12:18:31 -04:00
Daniel Verkamp
e134fa47c2 app: set default print log level INFO, log NOTICE
This causes INFO logs to be printed to screen, but only NOTICE and more
critical logs to be sent to syslog.

Change-Id: I1371cd1485348da82d073d7f929d90609adbc3d8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405932
Tested-by: SPDK Automated Test System <sys_sgsw@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>
2018-04-03 13:52:35 -04:00
Shuhei Matsumoto
af7cbd44b0 event/app: Refactor initialization of trace in spdk_app_start()
Refactor spdk_app_start() in lib/event/app.c to support JSON config file.

Change-Id: I259f17dd2b2a9c886bae729b40792f04aa638c3a
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405364
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-03 13:21:22 -04:00
Shuhei Matsumoto
93cb4a311a event/app: Refactor initialization of app environment in spdk_app_start()
Refactor spdk_app_start() in lib/event/app.c to support JSON config file.

Change-Id: Iedcbdeef5cc48c9aab4137735c1eae8daeb63950
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405363
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: Ben Walker <benjamin.walker@intel.com>
2018-04-03 13:21:22 -04:00
suman chakraborty
5e98dfd126 nvmf: add capability to add namespaces dynamically during active connection
1) The user should provide MaxNamespaces during the construction of the subsystem
2) The namespace which is added should have nsid less than or equal to MaxNamespaces
3) If the user does not provides MaxNamespaces then the exsisting behaviour continues where the nisd can grow dynamically when it is not connected.

Change-Id: I54769d9669575a5f6bf56fe5a262191ac51c474d
Signed-off-by: suman chakraborty <suman.chakraborty@wdc.com>
Reviewed-on: https://review.gerrithub.io/405375
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-30 19:24:29 -04:00
Shuhei Matsumoto
cf4cf8d52a event/app: Refactor read global params of config file in spdk_app_start()
Refactor spdk_app_start() in lib/event/app.c to support JSON config file.

Change-Id: Ia2b36e517b59b6ac1ffb12cb818efc8064fae495
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405362
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-30 17:31:04 -04:00
Shuhei Matsumoto
a4c86be7f0 event/app: Refactor check config file operation in spdk_app_start()
Refactor spdk_app_start() in lib/event/app.c to support JSON config
file.

Change-Id: I157573eea48b774579158f41a9010e5faa1a3de5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405361
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-30 17:31:04 -04:00
Pawel Wodkowski
44758678e6 rpc: free req before kill() to make asan complain a little bit less
Change-Id: I1c33687d37b2108acbc15ef09902ded194106633
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/405428
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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-30 16:18:34 -04:00
Dariusz Stojaczyk
aa8e7002ba app: add -g flag hinting dpdk to create just one hugetlbfs file
This makes use of the `--single-file-segments` DPDK param.

Change-Id: I21ddd955841748ea087c0d006875514be56f2107
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/401112
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-27 21:23:53 -04:00