RPC is a default feature required for almost all usages,
so enable RPC by default, but with a UNIX domain socket
for security reasons.
-r can now be used from the command line to specify
an alternative RPC listen address from the default
/var/tmp/spdk.sock.
Remove the Enable parameter from the Rpc config section
but still allow specifying an alternative listen address
using the Listen parameter as an alternative to the
command line option. This keeps backward compatibility
for this release for anyone using the configuration file
still.
Remove the Rpc sections from all configuration files
that were using them, except for those that specified
alternate TCP ports for multi-process test cases. We
can fix these later to use an alternate UNIX domain
socket and to use the command line instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife0d03fcab638c67b659f1eb85348ddc2b55c4c4
Reviewed-on: https://review.gerrithub.io/386561
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
RPC is core functionality for SPDK applications and should always
be initialized last (after all subsystems have been initialized).
So make RPC a first class citizen and integrate it with the
app framework directly instead of making it an "optional" subsystem.
Then we initializing it after all subsystems have completed
initialization, and tear it down before tearing down subsystems.
We can also do some other cleanup while here - for example, reactors
are already started when spdk_rpc_initialize() is called, so remove
the extra event that was added during initialization since this is no
longer needed.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4cc63586a6d55be68786629a2176c61a88979267
Reviewed-on: https://review.gerrithub.io/385914
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
spdk_app_fini() changed to void, as no operation within it
can fail with meaningful return code.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If77cbf745a8e3fcba4ea24411aa1816f3910cde7
Reviewed-on: https://review.gerrithub.io/381537
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
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>
This allows us to query and configure the bdev
modules much more dynamically.
Change-Id: I11f757039892f4353721be422317b641d72bd2a9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/370584
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>
Rather than manually adding signal handlers, just convert
the stub app to use the event framework and use its
shutdown handler.
Still rm -f the sentinel file in the autotest_common.sh
kill_stub function, although it really isn't needed
anymore.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id9cb189b6b4afa3c724181ff190b640654d0804e
Reviewed-on: https://review.gerrithub.io/366545
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>
Remove dpdk_ prefix in spdk_app_opts and spdk_env_opts
Change-Id: I6f231f67072b808e84945d41b1fe31a180beb350
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365787
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>
DPDK's use of getopt() needs special handling of the optind global
variable since we are passing it a separate array of arguments (not the
typical argv and argc). Set optind to 1 internally to env_dpdk so that
the apps don't need to know about it, and restore optind in case the
calling app is also using getopt().
Change-Id: Icbf07002c99fa9f94c866e8eff707124b0ef679b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365062
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>
Change-Id: I8ae709876f7b189a8acfbf638108c1c555e92259
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365053
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is more reliable than checking for the DPDK generated
/var/run/*config file, and is not DPDK dependent.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iadaba1c715e6fe2aafd7375831961b79ae31714a
Reviewed-on: https://review.gerrithub.io/362628
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Starting SPDK applications can take a long time due to
two factors: DPDK memory initialization and NVMe
device initialization.
This stub application facilitates eliminating those
delays by leveraging DPDK's multi-process mode. This
stub application acts as the primary process,
initializing DPDK as well as all NVMe devices bound
to userspace modules (uio/vfio). Then another
SPDK process can be started using the same instance
ID, which will make that SPDK process a secondary
process of the stub and leverage the DPDK memory and
NVMe device initialization already performed by the
primary process.
To start this will be used to accelerate the iSCSI
system level tests (in test/iscsi_tgt) to significantly
reduce test time in the CI pool.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3019c7d883f40b3ee8fb3345db013df2afc25645
Reviewed-on: https://review.gerrithub.io/362453
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>