Commit Graph

129 Commits

Author SHA1 Message Date
Alexey Marchuk
daee62a05b rdma: Add mlx5_dv RDMA provider
The new RDMA provider can be enabled by passing
--with-rdma=mlx5_dv parameter to configure script
This provider uses "externally created qpair"
functionality of rdma cm - it must move a qpair
to RTS state manually

Change-Id: I72484f6edd1f4dad15430e2c8d36b65d1975e8a2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1658
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-20 12:03:50 +00:00
Michal Berger
6c23a6f4d9 configure: Add extra dir for header|lib files lookup
These paths are not being looked up by clang (cc) by default, hence
currently it's not possible for vm_setup.sh to compile ref spdk on
FreeBSD as the compiler is not able to find libunwind.* files.

The reason why it looks for libunwind is because get_config_params(),
which is passed to ./configure, uses hardcoded gcc (not $CC) to check
if libunwind is supported.

This fixes the particular issue with libunwind (and potentially other
files for different options), inconsistency mentioned above should be
addressed separately (Issue: #1397).

Change-Id: I2afe11a669ba248ddb7854aa2a36a36372e944f4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2434
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-18 10:17:07 +00:00
Jim Harris
cfb65ba611 test: add generic unlink wrapper
reduce library uses unlink, but the unit tests need to
override it in a specific way.

But linking unit tests with LTO requires the wrapper
definitions be in objects/libraries listed *after*
the object/library that refers to it.  So we need to
make the unlink wrapper somewhat generic.  We do this
by exporting a string and callback function that the
user can set to enable a user-defined function to be
called when unlink() is called with a specific file
name.

Also revert 3ef6d06 as part of this patch, since we
no longer require the workaround that it implemented.

Fixes issue #1357.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1ee4c424ad31fe7d91d7b524ed47aedd279e5b5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1948
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-06 12:43:57 +00:00
paul luse
2755fbdf35 scripts: fix configure & autotest scripts that check for Intel proc
Used to determine whether IDXD isto be  configured, previous check
did not work on FreeBSD, only Linux.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I70148ee2f0fffc83c2b89d2de6e81193b9357d3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2060
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
Jonathan Richardson
51d69a7f54 configure: Fix parsing of DEFAULT_CC from cc.mk
Commit 649367850 (make: Allow CC and CXX to contain spaces) requires a
change to configure script also so that when it reads DEFAULT_CC from
cc.mk it retains all characters after DEFAULT_CC=. Currently only the
first two fields are retained.

Change-Id: If28493f7f2fb8e96fdf5a653ec30700abc8ce55e
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:42:09 +00:00
Seth Howell
3ef6d0613d autopackage: Don't build unit tests with lto.
Some of the unittests require symbols that don't work well
with the lto option. For example when you build reduce_ut.c
with the lto option, the __wrap_unlink symbol cannot be found.

Also, while we are here, add a check to configure for unit tests
built with lto.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaf76cd050565ce2ff13b4230d7a3b735fd5384a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2055
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-29 06:32:12 +00:00
paul luse
e58e9fbda8 lib/idxd: add low level idxd library
Module, etc., will follow. Notes:

* IDXD is an Intel silicon feature available in future Intel CPUs.
Initial development is being done on a simulator. Once HW is
available and the code fully tested the experimental label will be
lifted. Spec can be found here: https://software.intel.com/en-us/download/intel-data-streaming-accelerator-preliminary-architecture-specification

* The current implementation will only work with VFIO.

* DSA has a number of engines that can be grouped based on application
need such as type of memory being served or QoS. Engines are processing
units and are assigned to groups. Work queues are on device structures
that act as front-end groups for queueing descriptors. Full details on
what is configurable & how will come in later doc patches.

* There is a finite number of work queue slots that are divided amongst
the number of desired work queues in some fashion (ie evenly).

* SW (outside of the idxd lib) is required to manage flow control, to not
over-run the work queues.This is provided in the accel plug-in module.
The upper layers use public API to manage this.

* Work queue submissions are done with a 64 byte atomic instruction

* The design here creates a set of descriptor rings per channel that match
the size of the work queues. Then, an spdk_bit_array is used to make sure
we don't overrun a queue.  If there are not slots available, the operation
is put on a linked list to be retried later from the poller.

* As we need to support any number of channels (we can't limit ourselves
to the number of work queues) we need to dynamically size/resize our
per channel descriptor rings based on the number of current channels. This
is done from upper layers via public API into the lib.

* As channels are created, the total number of work queue slots is divided
across the channels evenly. Same thing when they are destroyed, remaining
channels with see the ring sizes increase. This is done from upper layers
via public API into the lib.

* The sim has 64 total work queue entries (WQE) that get dolled out to the
work queues (WQ) evenly.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I899bbeda3cef3db05bea4197b8757e89dddb579d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1809
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 15:48:32 +00:00
Tomasz Zawadzki
4d2e26d888 configure: fix LTO and CROSS_PREFIX
Starting with patch 873c874, it was not possible to configure SPDK
with LTO enabled or setting a cross compilation prefix.

detect_cc.sh was moved before the configuration options
were read from command line.
This patch fixes this behavior by reading passed options
before invoking detect_cc.sh.

Next loop that reads all options has empty handling for those,
as otherwise "Unrecognized option" condition would trigger.

Added LTO to NIGHTLY release build tests.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I21802e14c0565cb7f323bcbd805967a3c4781b46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1714
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-14 11:36:17 +00:00
Ziye Yang
465f4c1254 sock/uring: Add the async network I/O support for socket
This patch is used to add the async network I/O support in
sock layer. If code is configured with I/O uring, --with-uring,
we can use io uring in Linux (version >=5.4-rc3).

PS: We also make VPP's default priority > uring, because
for the iSCSI or sock test linked with VPP. It tests VPP with
a given address (which is not a special VPP can only open address),
so using uring can also listen those address succefully. And if we make
uring with priority > VPP, actually, VPP will not tested in those cases.

Additionally, the current CI pool is not ready for test, we need
wait for the CI system ready. And I test on my local platform, it works.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie8ee3c8ddf8d2a7264f2b382376733e002816dcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/952
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-20 08:41:28 +00:00
Michal Berger
db3ebfe69a configure: Dump build CONFIG to sourceable file
Change-Id: I33d03d1850c92673f28107d52c886df5bfb685f1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-17 14:44:20 +00:00
Michal Berger
c3329b52a0 configure: Use /usr/src/fio as a default location for the fio repo
This allows to run ./configure with plain --with-fio argument
depending on its default CONFIG value.

Change-Id: Icb3facc5a07d38030cda836ec49a54fe9535de71
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1105
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-17 14:44:20 +00:00
Michal Berger
5a7649559b configure: Use uname for system name check
On FreeBSD, the value that $OSTYPE returns may differ, depending on
which user owns the shell.

To be consistent, use uname call instead as it should always return
the same value ("FreeBSD" in this case).

Change-Id: I2edd221b63ac4bff0ee722cbce6ee6e8a5823e7a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1230
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-12 09:03:38 +00:00
Richael Zhuang
325010bf91 configure: check nasm only on x86
For other architectures like arm64 don't depend on nasm package
when using isa-l or crypto. Limit the check to x86.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I8ee1a711fc76c25a9173853dbb075dffe7df056b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1208
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-11 11:35:16 +00:00
Tomasz Zawadzki
9fcb1cb0e1 build: add option to disable building unit tests
If unit tests are not required, add option to disable them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I387ec043fd47d3033726a51ab673752a521d45c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1171
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: Ben Walker <benjamin.walker@intel.com>
2020-03-10 09:12:21 +00:00
Jacek Kalwas
9b2c645294 build: add option to disable building examples
If examples are not needed using that option can reduce build time and
output logs so it is easier to spot most important issues/warnings.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Id279cba96ddf25d50a8748555d511d21f243bd7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1047
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-04 10:05:10 +00:00
Artur Paszkiewicz
73763d40ec module/raid: raid5 module
Add raid5 module and unit tests. Use './configure' with option
'--with-raid5' to enable it.

Change-Id: I9f07da8c3567fa65499444899c899adaa2e29550
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/855
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-03-04 10:03:45 +00:00
Alexey Marchuk
94966468ae nvme/rdma: Introduce transport_ack_timeout
Add transport_ack_timeout parameter to nvme controller opts.
This parameter allows to configure RDMA ACK timeout according
to the formula 4.096 * 2^(transport_ack_timeout) usec.
The parameter should be in range 0..31 where 0 means use
driver-specific default value.

Change-Id: I0c8a5a636aa9d816bda5c1ba58f56a00a585b060
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-27 10:16:00 +00:00
Tomasz Kulasek
873c8748eb config: fix fail if explicit dependency not met
This patch modifies default configuration disabling features
with known issues or incompatibilities.

If user tries to explicitly turn on feature which dependences are
not met it exits with error immediately.

	Fixes issue #1193

Change-Id: If7363506ee812c5135f5a3a023ab9e8d26268528
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/971
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-27 10:15:02 +00:00
Alexey Marchuk
157b1a339a configure: Check nasm - redirect stderr to null device
configure prints an error if nasm is not installed on the system:
./configure: line 554: nasm: command not found
Notice: ISA-L, compression & crypto auto-disabled due to nasm dependency.
These features require NASM version 2.13.03 or newer.  Please install
or upgrade then re-run this script.
Redirect stderr to null device to disable error printing

Change-Id: Ifa596fba19ecaf5270614ab22f09f0a66af08475
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/871
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-02-21 09:39:41 +00:00
Seth Howell
cbc1e069ee configure: allow cuncurrent build of RBD and reduce
This was disabled in configure because at one time there was an ISA-L
dependency break between the RBD libraries and our own submodule.
It seems that the dependency break was fixed a while ago, but the check
to not allow one to build with the other was never removed.
Unfortunately, I don't have the details on what that fix was.

Either way, this compilation works now.

Change-Id: Ic249791549dae36c7279114d67e77be94e842ddf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479726
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Richael Zhuang
8cad9cc10a spdk: enable isa-l by default aarch64
In addition to x86, enable isa-l by default on aarch64.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I2db3f248bdc857326ec9b6f4b040a95d2a2ca1ca
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472107
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-18 13:14:41 +00:00
Alexey Marchuk
e4aee795c0 configure/ISA-L: Move log file to submodule directory
Running configure script by multiple users on the same machine
leads to access to the same ISA-L log file which is created
with read access for user's group. As the result only the
user who created this file can modify it and other users will
receive "permission denied" error. Move this log file to the
local ISA-L directory to prevent access by multiple users

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I1862738bc0ba242c98816a22dc39bd11ef5d02dd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473855
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: Ben Walker <benjamin.walker@intel.com>
2019-11-14 03:46:17 +00:00
Tomasz Kulasek
805d994281 lib/nvme: add NVMe character device
NVMe character device implementation. This patch adds implementation
of IO producer using CUSE library. It allows to create nvme device
nodes in linux kernel for controller as well as for namespace and
process ioctl requests as usual from linux environment.

Both devices (controller and namespaces) are exposed as character
devices.

To compile NVMe CUSE module use "./configure --with-nvme-cuse".

Names for created CUSE devices can be retrieved using
spdk_nvme_cuse_get_ctrlr_name() and spdk_nvme_cuse_get_ns_name().


Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I0fc9a9a1ef3c9c2b3112d07c2b4b1f8d49665ee1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Xiaodong Liu
7fa15e28e4 configure: add --with-fuse option
blobfs_bdev module may contain functions related to
FUSE which will utilize libfuse3.
By default, it is diabled to compile blobfs_bdev module
with FUSE related functions. Running './configure' with
option '--with-fuse' can enable it.

Change-Id: I6552a6c04cc3412c739691630a7a481e0ae6b59c
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470712
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-10-10 16:20:46 +00:00
Alexey Marchuk
131c9aad05 configure: Use -march=native for x86 architecture only.
Exclude -march=native parameter from build command for other architectures since it causes a compilation error in ARM.

Change-Id: Ida22ea4b3afba9759102d2e2203fc9e6e312c3ba
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469390
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-10-01 14:02:40 +00:00
Tomasz Zawadzki
d43ee98c36 configure: disable internal rte_vhost on FreeBSD
On master DPDK (d03d8622d), building SPDK on FreeBSD
fails due to attempt to build internal rte_vhost.

This started occuring with SPDK patch:
28099e0 "make: add dependencies for the rte_vhost build."

This patch disables VHOST_INTERNAL_LIB on FreeBSD,
along with vhost/virtio.

Errors seen:
./configure --enable-debug --enable-werror --with-fio=/usr/src/fio --without-isal --with-dpdk=/var/jenkins/workspace/Other_systems/freebsd_autotest/dpdk/build
Using default SPDK env in /var/jenkins/workspace/Other_systems/freebsd_autotest/spdk/lib/env_dpdk
Notice: DPDK's rte_vhost not found or version < 19.05, using internal, legacy rte_vhost library.
Vhost is only supported on Linux. Disabling it.
Virtio is only supported on Linux. Disabling it.
...
gmake -j4
...
  CC lib/rte_vhost/socket.o
In file included from socket.c:52:
./vhost.h:41:10: fatal error: 'linux/vhost.h' file not found
#include <linux/vhost.h>
         ^~~~~~~~~~~~~~~
....
  CC lib/rte_vhost/vhost_user.o
vhost_user.c:41:10: fatal error: 'asm/mman.h' file not found
#include <asm/mman.h>
         ^~~~~~~~~~~~

Change-Id: Ia2f5fd98a82412a5691bc0f2201f7259a45d2b4d
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468043
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-20 20:33:14 +00:00
Seth Howell
00dd9e8519 configure: add -march-native to dpdk build check.
Some older versions of gcc fail with errors when -march=native is not
supplied to the build cmd for checking DPDK rte_vhost support.

Change-Id: I88e12f6823b2a143dc8406c7c01041c00c25011c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-20 20:22:05 +00:00
Seth Howell
a988124db9 make: override scan-build for unit tests.
The unit test mock macro function doesn't mesh well with the scan-build
static analysis tool. So we need to reset cc to the user provided value
or default before running the unit tests.

Change-Id: Ib636f6e396b09f9bf1cb8f930e6befa56ce99848
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466816
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-11 16:30:38 +00:00
Seth Howell
43a713f9f0 configure: make BUILD_CMD an array variable.
Most modern shells know how to interpret the string version of commands
when parsing them from a variable, but some shells like the one centos 7
uses misinterpret the command causing the dpdk version check in
configure to fail erroneously. This can be observed in the CentOS logs
of recent vs dpdk master jobs on the CI.

This method looks to be the more conservative way of doing the same
thing and fixes the issue on my dev machine.

Change-Id: Ib51c537ec88c781eb62519e08e4252ae05e554ef
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467714
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 21:38:43 +00:00
Seth Howell
e62a3c6553 config: configure can be run from outside spdk.
This is just a little convenience thing for people attempting to do an
automated make of SPDK from outside of the spdk directory. make and git
have -C options for the same purpose.

Change-Id: Id4b3768a6aaeb0f7149bb78c2fd2467faecbda97
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466348
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-05 20:25:41 +00:00
Anil Veerabhadrappa
ed56a3d482 NVMe-oF Target: Add FC transport.
- New files and updates to existing SPDK files to add the NVMf-FC transport.
  - Depends on an existing low level driver library. This driver is not part of SPDK repository.
  - Makefile updates to build FC transport (using CONFIG_FC)
  - Update configure script for FC build.
  - New FC unit test for FC-LS commands.
  - Update unittest.sh to run FC unit test (when built).

Signed-off-by: John Barnard <john.barnard@broadcom.com>
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: If31d4d25feab76c2dbe90a7faf71d465c2c3a354
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 22:17:17 +00:00
Amelia Blachuciak
3def834c65 make: add cross-compilation support
There might be a need for user to cross-compile SPDK for other platforms
than native. Since DPDK supports cross-compilation already, only enablement of
cross-compilation for SPDK is missing. This patch aims to provide the user
with additional option to configure script that works similar to what DPDK already provides.

To enable cross-compilation run ./configure.sh with additional --cross-prefix parameter.
The parameter should work in similar manner to DPDK CROSS parameter
and specifies prefix of cross-compiler defined in PATH variable.

Note: To cross-compile, toolchain must have SPDK dependencies such as e.g. Libaio.

Signed-off-by: Amelia Blachuciak <amelia.blachuciak@intel.com>
Change-Id: Ia7cb879d39d624552cad1af98a563070ea7676b2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460977
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-26 16:22:27 +00:00
Ben Walker
c510bd8830 build: Disable ISA-L if the target build architecture is not x86
It doesn't matter what the system itself is - it matters what the
compiler is targeting.

Change-Id: Ifb901f137a828725c3064aca2c1142d6214eec14
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-07-26 16:22:27 +00:00
Ben Walker
73439e6f46 build: Detect compiler toolchain in configure
We need to know this up front.

Change-Id: I3a9ceb90cf62eacbf3fdf518a9ccb4c4978b3a05
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463014
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-26 16:22:27 +00:00
Ben Walker
0e6ddfd66a build: Allow the user to set target architecture in configure
Change-Id: I7f2a1464c0c8872e5e7856a830aaf7ea8cdf4e81
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463013
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-07-24 22:55:06 +00:00
Darek Stojaczyk
161c88a099 configure: cleanup help msg
Change-Id: I716eaebb6162257f39cf41b57e057732d5bf1fce
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459586
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-16 11:08:26 +00:00
Darek Stojaczyk
27b920a2a4 configure: unset CONFIG_VHOST on BSD
Remove linux #ifdefs from the vhost code and just
implicitly disable CONFIG_VHOST for BSD systems.

This serves as cleanup.

Change-Id: I8b0e0e8f80478f50ca8586cc974f7afcee2566f0
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460562
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-16 11:06:03 +00:00
Darek Stojaczyk
2201e2e701 Makefile: handle multi-word CC and LD variables
Besides executable name, those variables might also
contain some predefined flags. So far we didn't pass
those correctly to detect_cc.sh, causing it to fail
on argument parsing.

While here, also fix accessing CONFIG[LTO], which
needs to be done in curly brackets ${} just like any
other bash array element.

Change-Id: Icb830a11ca128eb8ee327dad44dae62ab0cf2cce
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-16 11:06:03 +00:00
Tomasz Kulasek
14a62d67ac net/vpp: allow to compile with vpp
This patch prepares environment to allow compile applications and
libraries with VPP.

Change-Id: Icc067c17b57932062afa5e6a67791bd58de3a2cc
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-06-27 08:23:08 +00:00
Darek Stojaczyk
e58dfd5669 configure: silence gcc errors on rte_vhost checks
Redirect the entire gcc output to null for rte_vhost test
build - this gcc will be run even without any custom options
passed to `configure`, so don't bother the user with error
messages when he didn't do anything wrong.

Change-Id: I05136556ab81d78a6f27edd150b68f6e2b5cd8b5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457779
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-18 12:18:16 +00:00
Darek Stojaczyk
b18f19d8a7 configure: run rte_vhost gcc check explicitly with -Werror
We check rte_vhost version by trying to compile a program
using a public rte_vhost API function. We only compile the
program - without linking it - because rte_vhost has
a number of dependencies on other libs and we want to keep
the configure script simple. However, the function could
be still implicitly declared by the compiler, making the
compilation succeed when it should not.

To fix it, compile that test program with -Werror.

Change-Id: I0f187dfec909f7cd5cacb7b7a2fc21f5816c4632
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-18 12:18:16 +00:00
Darek Stojaczyk
17e0283db1 configure: use the external rte_vhost lib by default
It is supported with DPDK 19.05+, so `configure` will now
automatically fall back to the internal rte_vhost copy if
the external one is not available.

Change-Id: I83746154f07a907d361a7511478112082710174f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456190
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-06-11 01:14:45 +00:00
Liang Yan
985169456b doc/vpp: update vpp document and configuration
Update the configure and doc for VPP.

Change-Id: I922c02de108abd4bd4ac0c853b49080e449539cd
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453758
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-06-07 18:27:53 +00:00
Darek Stojaczyk
baa6eac040 configure: clear cc.flags.mk on each run
Once set, those flags could be only overwritten - there
was no way to unset them using our configure script.

$ CFLAGS="-pedantic" ./configure
$ ./configure # pedantic still set

We'll now clear cc.flags.mk on each configure run, just
like we already do with config.mk.

Change-Id: I75c88606f21ca2c62bd322f3972ebf7dd815258b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453789
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>
2019-05-10 22:26:41 +00:00
Darek Stojaczyk
3674c1d3c3 configure: fail --with-asan if it's not available
Change-Id: I3e9209627125ae222559c98efa215d0a50320b32
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453711
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-09 04:32:23 +00:00
Darek Stojaczyk
02406e5654 configure: fail --enable-log-bt if it's not available
Change-Id: Id8c5eca81124f06b62087bd64fb8a20ae8c69d28
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453710
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-09 04:32:23 +00:00
Darek Stojaczyk
5cb1804002 configure: fail --with-iscsi-initiator if it's not available
Change-Id: If84bc3302c2d44a439a1028edfa0ceeaf3f32260
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453709
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-09 04:32:23 +00:00
Darek Stojaczyk
55bd0d3afc configure: fail --with-rbd if it's not available
Change-Id: I9767582835c0ef7ae1a341f60134bb74efbe3fd4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453708
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-09 04:32:23 +00:00
Darek Stojaczyk
ce71172650 configure: fail --with-pmdk if libpmemblk is not available
Change-Id: Ibbd84374dac6c2ac2eba30dd2664b8a4b56277a6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453707
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-09 04:32:23 +00:00
Darek Stojaczyk
eed0c6be16 configure: fail --with-rdma if it's not available
While here, also refactor IBV_WR_SEND_WITH_INV check
to use the new BUILD_CMD command.

Change-Id: Ieefe77d769f2b1369d204ec54b976fa11441af46
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453706
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-09 04:32:23 +00:00