Commit Graph

68 Commits

Author SHA1 Message Date
Jim Harris
d132ee3531 build: use DEPDIRS variables to build SPDK_LIB_LIST
All of our Makefiles duplicate huge lists of libraries
in SPDK_LIB_LIST.  We have a very precise and accurate
accounting of the library dependencies in
mk/spdk.lib_deps.mk which can be used to generate
the full list if the app specifies the modules and
subsystem libraries it wishes to link.

I did a first pass through all of the existing
Makefiles to take advantage of this new functionality.
There may be more optimizations we can make later but
don't want to hold up this patch for all of them.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icdaf6f749a6908df2c2ce2db22631a4af4ff3a9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5553
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-18 09:40:01 +00:00
Ziye Yang
48701bd955 lib/event: support ABI compatibility for spdk_app_opts.
This patch is used to support ABI compatability issue for spdk_app_opts.

Fixes #1484

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6fed777fa15b367f7c3706b8f218d86d56493906
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5330
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-12-16 08:40:14 +00:00
Tomasz Zawadzki
cda1d2cf11 build: remove unused references to conf library
- Removed slew of conf.h includes
- No longer require mk vars that include conf

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica7e8e8bf1d4a5d0b0200bfe689aa13afd77bfaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4746
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 02:42:16 +00:00
Changpeng Liu
6bd7bd0da2 vhost: deprecate internal vhost library support
The internal vhost library is used when DPDK's version
is older than 19.05 and the experiemntal vhost nvme
target.

For the CONFIG_INTERNAL_VHOST_LIB option, SPDK doesn't
enable this option by default over one year and CI
doesn't cover it either, so we may remove it with
this release.

As for the vhost-nvme target, since we are developing
a new vfio-user target solution, it's OK for us to remove
it now.

Change-Id: Ib2cce1db99cd09754307c2828b3187f2d4550304
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4562
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 02:42:16 +00:00
Jim Harris
ebc227d9b2 bdev: move bdev_rpc library contents
We have some RPCs defined in the bdev library itself,
others in a separate bdev_rpc library.  There's no need
for the separate library - just move them all into the
bdev library.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I298eedb88924197e64eb315369efb10f402903a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4364
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
73b483c6d2 event: move app_rpc contents
There is no need to have the application-level RPCs
defined separately from the event library itself
(which defines the application framework).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic264ed761f5ec1a40d604e63395c5740af4be1a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4363
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
2e31825512 event: move log_rpc contents to event library
The log_rpc library serves little (if any) use in
isolation.  It makes more sense to just include
this code in the event library.  The event library
already depends on and uses the log library, and it
is natural to just enable these RPCs directly in
that library instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie39b8598ce0c06729a13d188ce00da44a996accc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Evgeniy Kochetov
c5c9a150a3 make: Create variable for event_bdev dependencies
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7468dd242b83af8b41d72e503c212c1ffac1abd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/614
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
Seth Howell
de467ec91d env_dpdk/rpc: add rpc to get memory stats.
This will enable us to create a helper applciation to print memory
statistics for a given SPDK application.

Change-Id: I0ad5a8163166a5d67d9a5533303ec0858297ba6b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477511
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-13 11:05:57 +00:00
Seth Howell
bc83adc2db lib: move trace_rpc into lib/trace
Combinining these two libraries removes some directory complexity. It
also helps us to align on a common practice for including the rpc code
with a given module. This is how all of our bdev modules already do it.
The nbd, net, and scsi modules also follow this pattern.

Change-Id: I5e4c99d7f0facacc6dfe30b2274b60e0d151f8d8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465210
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-19 06:10:30 +00:00
Wojciech Malikowski
fd508c14ca app/vhost: Optional VMD enumeration
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.

Change-Id: Id22e0b940e789a32507e582efda564adae5beb28
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459642
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-01 03:53:06 +00:00
Piotr Pelplinski
de5f53220c notify: add notification library
This patch adds library that will provide ability to notify about
events. On one side each spdk library can specify what kind of
notification it can produce and on the other side libraries can fetch
those notifications.

Example is bdev module, which lib notify about added or removed bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Change-Id: Ia95e564a8a43400b2745d9de8217b9cc84cd1b16
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-29 21:15:14 +00:00
Ben Walker
deb8ee5c33 event: spdk_app_start now takes spdk_msg_fn
This callback type takes 1 argument instead of 2.

Change-Id: Ic3710fafb2828f08fc064f7658849b3d20521092
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446997
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-19 15:54:34 +00:00
Darek Stojaczyk
2b846acc49 configure: add option not to use the internal rte_vhost copy
It's disabled by default, so no functionality is changed yet.
The intention is to use the upstream rte_vhost from DPDK,
which - starting from DPDK 19.05 - is finally capable of
running with storage device backends.

SPDK still requires a lot of changes in order to support
that upstream version, but the most fundamental change is
dropping vhost-nvme support. It'll remain usable only with
the internal rte_vhost copy and with the upstream rte_vhost
it simply won't be compiled. This allows us at least to
compile with that upstream rte_vhost, where we can pursue
adding the full integration.

Change-Id: Ic8bc5497c4d77bfef77c57f3d5a1f8681ffb6d1f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446082
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-03-13 14:26:20 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Chunyang Hui
26979c50c7 app/parse: add default return value for app parse function
Change-Id: Icae46bb96502c7edf3a453e0fff1d8560241c5ab
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-01-22 01:03:39 +00:00
Chunyang Hui
01e5610da8 parse: add return value to app_parse callback
Need to check user input and return status of parsing
to prevent app or target from crashing.
Input checking function will be added in the future.

Change-Id: I8167ac13306ae4f81e2cacb80edd9dcf9382c374
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-18 10:08:09 +00:00
Liu Xiaodong
ae0aae1532 lib/trace: add 3 RPC method for tpoint_group_mask
Now trace facility can be enabled/disabled at runtime,
besides app starting parameters

Change-Id: I086564665ba4375b946a5339d5921d6584e9bfda
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/435470
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-12-14 21:29:12 +00:00
Jim Harris
5b16c18d17 build: move app rules to spdk.app.mk
This removes a ton of duplicate from a lot of
Makefiles.  Note that spdk.unittest.mk still keeps
its own app rules, and now just includes
spdk.app_vars.mk instead.  Fixing Makefiles that
include this .mk file requires more work that is
deferred for now.  We do need to add the
"install: all" rule explicitly to this .mk files.

Note that Makefiles need to include spdk.app.mk
now at the end of the file, so that things like
APP and SPDK_LIB_LIST are defined before including
it.

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

Reviewed-on: https://review.gerrithub.io/434283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-12 22:35:21 +00:00
Jim Harris
20c69bbc30 env: remove default pre-reserved memory size
Much of this was originally applied by Darek in
6f5840d22 but then had to be reverted due to NVMe-oF
MR issues in a817ccf5.  Now that the NVMe-oF MR issues
have been resolved, we can reapply these changes.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6

Reviewed-on: https://review.gerrithub.io/436547
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-12-12 11:00:57 +00:00
Jim Harris
5704be8987 build: remove xx_MODULES_LINKER_ARGS and xx_MODULES_FILES
Application Makefiles can now just add xx_MODULES_LIB_LIST
to SPDK_LIB_LIST.  This is possible now since all
SPDK libraries are linked with --whole-archive, so there
is no need to differentiate between "modules" libraries
and other SPDK libraries.

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

Reviewed-on: https://review.gerrithub.io/434277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 16:43:01 +00:00
Jim Harris
42b6771f40 build: add ALL_MODULES_* variables to spdk.modules.mk
This allows a lot of simplification to SPDK application
makefiles.

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

Reviewed-on: https://review.gerrithub.io/434274
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 10:21:45 +00:00
Jim Harris
3da5847023 build: add ENV_LINKER_ARGS to LINK_C and LINK_CXX
This allows us to remove $(ENV_LINKER_ARGS) from all of the
application Makefiles.

Modify spdk.unittest.mk to explicitly set ENV_LINKER_ARGS
to nothing, to avoid DPDK libraries from getting linked
into unit tests.  This seems better than creating separate
LINK_C rules for unit tests.  Provide a UNIT_TEST_LINK_ENV
flag to allow select unit tests to override this behavior -
it's needed for some of the env unit tests.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I647f2c848cf434023cf5a1f3a45869bbc4fc8102
Reviewed-on: https://review.gerrithub.io/434145
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 10:21:45 +00:00
Jim Harris
0b5fa082db build: remove sock from SOCK_MODULES_LIST
The various *_MODULES_LIST are intended for the modules
that implement the specific interface - not for the
associated core library itself.

For example, BLOCKDEV_MODULES_LIST doesn't contain bdev,
it contains all of the bdev modules.  Similar for
COPY_MODULES_LIST and copy.

So make SOCK_MODULES_LIST consistent.  This is a real
pain because we have to add sock explicitly to a bunch
of individual Makefiles, but I have plans to clean that
up in some future patches.

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

Reviewed-on: https://review.gerrithub.io/434125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 08:13:46 +00:00
Jim Harris
e0b669312a spdk_tgt, vhost: move vhost libraries earlier in SPDK_LIB_LIST
Upcoming changes will use --whole-archive on all libraries.  This
introduces some issues with the shared library builds, although
it's not entirely clear why these issues don't occur today.

vhost depends on both scsi and bdev - but for the spdk_tgt and
vhost application Makefiles, vhost is listed later than scsi
and bdev.  It's best practice to list the libraries in order
of dependence - at least until we add dependencies to the shared
libraries themselves.

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

Reviewed-on: https://review.gerrithub.io/433356
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-16 08:57:16 +00:00
Darek Stojaczyk
a817ccf571 Revert "env: remove default pre-reserved memory size"
Apparently this patch revealed an issue somewhere in SGL
handling in NVMf initiator which is causing our CI to fail.
Let's revert it while we work on a proper fix.

This reverts commit 6f5840d225.
This is not a full revert, some app.c changes to the usage text
were kept unchanged.

Change-Id: Iddea5c2b9df50bd12ef8f6226165883f6622ab33
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432576
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
2018-11-09 18:31:45 +00:00
Darek Stojaczyk
6f5840d225 env: remove default pre-reserved memory size
Now that we utilize DPDK dynamic memory allocation, we
no longer need to set the default pre-reserved memory size.
It'll now be 0, which implies all memory will be allocated
at runtime.

The option to pre-reserve all hugepages on the system is
now only available on BSD, so also clarify that bit in the
app usage text.

Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432204
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:07:32 +00:00
Jim Harris
b6ee6f9241 iscsi, nvmf, vhost: remove default config file pathnames
Config file pathnames have been possible on the command line
for a very long time, and all of the SPDK testing infrastructure
uses it.  The default pathnames were added a very long time ago,
and now can cause weird issues like conflicting with --wait-for-rpc
when an INI config file is not passed on the command line but is
pulled in by the default pathname instead.

So remove the default pathnames.

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

Reviewed-on: https://review.gerrithub.io/424606
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-05 19:46:17 +00:00
Jim Harris
3f38382c37 build: fix some library dependencies
Upcoming patches from Lance Hartmann have pointed out
some places where the library lists should be
reordered to enable linking with shared libraries
without building dependencies into the shared
libraries themselves.  We will build these dependencies
into the shared libraries at some point, but these
patches let us defer that for a bit.

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

Reviewed-on: https://review.gerrithub.io/422438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Dariusz Stojaczyk
c2dc15a0ec app: allow full-name command line options
The following commands now have the same effect:

```
$ spdk_tgt -w -p 1 -m 3 -s 2048
$ spdk_tgt --wait-for-rpc --master-core 1 --cpumask 3 --mem-size 2048
$ spdk_tgt --wait-for-rpc --master-core=1 --cpumask=3 --mem-size=2048
```

Change-Id: I8540a377abf7e02987e9ecd957d142212e9609c4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420864
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-13 17:30:10 +00:00
Daniel Verkamp
64823f28a8 modules: rename NET_MODULES_* -> SOCK_MODULES_*
Also remove libspdk_net from the list and add it to each app that
originally linked it via NET_MODULES.

This will allow the use of SOCK_MODULES in application Makefiles without
pulling in the RPC libraries required by spdk_net.

Change-Id: Iad68ddd25bea24bba53a681c78d41e6e703f866d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416476
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-22 17:09:57 +00:00
Ben Walker
02d75f6237 thread: Move threading abstraction code out of util
This makes more sense as a first class library.

Change-Id: Ibd5c578f8708bd8c7d83fe1629e97c9a3316b56b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414698
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>
Reviewed-by: Madhu Pai <mpai@netapp.com>
2018-06-12 15:24:07 +00:00
Liang Yan
8561b30502 app: remove unnecessary header file
Change-Id: I21299224e9d25f47a4098d4ea491d1fae3a549c0
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/403460
Reviewed-by: Jim Harris <james.r.harris@intel.com>
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>
2018-03-29 12:22:38 -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
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
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
Lance Hartmann
b9be940ae9 lib: Return instead of exit in event
Modifies behavior of spdk_app_start() and spdk_app_parse_args()
such that they return on failure instead of terminating with
exit().

Change-Id: I82566417f04e1ae2e3ca60a00c72e664db26c9e4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/401243
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-08 11:47:01 -05:00
Jim Harris
bb24ce82a6 build: add @: to remaining 'all' targets
It is not ideal to have to add this in a bunch of
different Makefiles, but further consolidation of
Makefiles is going to be a more arduous process.

With this change, rebuilding SPDK after no changes
will result in no output - all of the "Nothing to
be done for 'all'" messages have been removed.  Note
that DPDK build output still remains - this can be
suppressed by either using an out-of-tree DPDK, or
using SKIP_DPDK_BUILD=1 when using the in-tree DPDK
submodule.

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

Reviewed-on: https://review.gerrithub.io/399918
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-14 17:38:25 -05:00
Dariusz Stojaczyk
3fb4bc717b vhost: move app fini to the vhost subsystem
We already have a vhost subsystem and have to do
its fini anyway, so let's remove application fini.
Technically, any SPDK app can use vhost library
and create vhost devices, so we need to delete them
on shutdown in all cases - in module fini.

Change-Id: I013b45b4e73fd19288b9c10bc995dc24894ecf35
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396573
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 11:05:01 -05:00
Daniel Verkamp
543cb17248 build: remove $(ENV_CFLAGS) where not necessary
Only Makefiles for libraries that directly depend on DPDK (rather than
the SPDK env abstraction) should add $(ENV_CFLAGS).

Change-Id: Ifdf44d3ef8c42bbf7f20edd524b330d00658235b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392818
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-01-03 12:05:59 -05:00
Dariusz Stojaczyk
1c54773979 vhost: link with Linux-only libraries by default
vhost supports only Linux, so there's no
need to check OS inside vhost Makefiles.

Change-Id: Ia7129200ee4cb8db898552a8a990f6fab84f8711
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/392671
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>
2017-12-21 13:32:09 -05:00
Daniel Verkamp
2302dc6cdc nbd: add NBD subsystem to apps
Enable the NBD subsystem and RPC methods in the iSCSI target, NVMe-oF
target, vhost target, and bdev_svc test app.

Change-Id: I1c2e53a4c031ae6d4dc0a8e698bbfa085db33154
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-12 13:36:22 -05:00
Jim Harris
fbb9430ec4 app: add spdk_app_parse_args()
This is a helper function that eliminates a lot of
duplicated code in our target applications, specifically
around common command line argument parsing and usage
messages.  This patch only moves the iscsi, nvmf and
vhost targets to use this function, but there are other
test/example applications that could also take advantage
of it to reduce duplicated code and improve consistency.

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

Reviewed-on: https://review.gerrithub.io/386542
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-13 14:57:49 -05:00
Jim Harris
246cdd08e1 iscsi, nvmf, vhost: break out common usage text to separate functions
This prepares for moving all of the common usage text into a library
that can be used by all applications using the app framework.

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

Reviewed-on: https://review.gerrithub.io/385929
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-13 14:57:49 -05:00
Jim Harris
0489bcb137 iscsi, nvmf, vhost: break out arg parsing into separate functions
This prepares for moving all of the common app framework argument
parsing into a library that can be used by all app framework based
applications.

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

Reviewed-on: https://review.gerrithub.io/385928
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-13 14:57:49 -05:00
Jim Harris
973a27d08c app: add print_level to opts structure
This allows us to remove some duplicated code from our
main target applications.

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

Reviewed-on: https://review.gerrithub.io/385714
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2017-11-10 17:00:58 -05:00
Jim Harris
4bcfef0021 rpc: remove rpc subsystem
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>
2017-11-10 17:00:58 -05:00
Daniel Verkamp
6a0e6abcd3 vhost: use int to store getopt() return value
getopt() returns int, not char, so assigning the return value into a
char will truncate it.

Fixes a warning on platforms where char is unsigned:

  vhost.c:109:61: warning: comparison is always true due to limited
  range of data type [-Wtype-limits]

Change-Id: I3a290096346db241a473434952e0f5fd69e98c2f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386347
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-09 12:42:45 -05:00