Commit Graph

51 Commits

Author SHA1 Message Date
Michal Berger
089cbda8bf autobuild: Adjusting crypto build for latest DPDK (21.11)
Details of the changes here:
918fd2f146.

They mainly target the aesni_mb driver which was moved to ipsec_mb and
bump the minimal supported version of the ipsec to v1.0.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ica3b4fd66684751939159511845eb6ac6f7d5205
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10003
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-10-28 07:08:26 +00:00
Krzysztof Karas
3c5cff613b dpdk: update DPDK to 21.08 version
Update submodule DPDK to version 21.08 and modify
CHANGELOG.

Added bus auxiliary dependencies to dpdkbuild/Makefile
and lib/env_dpdk/env.mk. This dependency was introduced
in DPDK 21.08.

Change-Id: I72d9fde456583dc129f4c7fced4f10875bbc38e2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9211
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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>
2021-08-25 07:26:17 +00:00
Alexey Marchuk
e269bf4e84 mk: Enable build of mlx5_pci compress PMD
This PMD is availabe for BlueField2 DPU.
It requires libmlx5, so configure file is
updated to check if this library exists

Change-Id: Ic0cfbfdf24af393381667435009fb6afc49d9181
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8780
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
2021-08-16 08:48:31 +00:00
Michal Berger
7232c450f9 configure: Build against installed DPDK instance
Interpret bare --with-dpdk opt as user's request to find installed
(provided by the distro) DPDK's libs|include files and use them during
the build.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9da99671b95af0121194b3a6d53636b0ded71f1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8348
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-06-29 18:17:43 +00:00
Jacek Kalwas
99b1257154 build: swap pci with bus_pci libs on the list
bus_pci depends on pci so it shall be listed before, otherwise it can
result in linking issue e.g.

/usr/bin/ld: /home/jkalwas/spdk/dpdk/build/lib/librte_bus_pci.a(bus_pci_pci_common.c.o): in function `pci_parse':
pci_common.c:(.text+0x6e): undefined reference to `rte_pci_addr_parse'

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Idff446df82c37844edc122d5171e8ffa684b296f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-25 10:26:48 +00:00
Tomasz Zawadzki
232f34d754 lib/env_dpdk: add rte_net dependency
Vhost is enabled by default, so rte_net was always included.
When disabled, rte_power failed as it depends on rte_ethdev and rte_net.

rte_vhost was only possible to enable on Linux, so there
is no conflict with adding it next to rte_power under this condition.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2e183004d6457e404471740a0540dcb08aa738d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6398
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:33:46 +00:00
Jim Harris
710838103b env_dpdk: add rte_ethdev dependency
As of DPDK main commit 682a6454 ("power: add ethdev
power management"), rte_power depends on rte_ethdev.
So add rte_ethdev library, but only on Linux since
that is the only place where we use rte_power.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibc3473d6ec75c14a8c0c5517616950017cb2ea96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6210
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:34:30 +00:00
Tomasz Zawadzki
aff588d7e6 lib/env_dpdk: warn about deprecated API
__rte_experimental attribute in DPDK ends up being changed to
'deprecated'. See rte_compat.h in DPDK.

Goal of patch below was to allow SPDK to use experimental API
"(b6fce19) env/dpdk: add support for DPDK 18.05 dynamic memory allocation"

Yet it disabled warnings for both. This patch makes it so that
__rte_experimental will not produce warnings, but deprecations in DPDK
will.

It will help identify incoming changes when testing newer versions
of DPDK in the future.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a75e37c976d613c7ec6ee32e05fc6da79a60a1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5342
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-03 09:41:44 +00:00
Jim Harris
f896aa6f10 env_dpdk: add rte_rcu library dependency
rte_hash depends on rte_rcu starting in upcoming
DPDK 20.11 release.  rte_rcu was only added in
DPDK 19.05 release, so we need to check if it
exists before linking it.

Fixes issue #1661.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7e343c6f964b03cc62484b57803a3bad00f80288
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4947
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-29 10:39:05 +00:00
Maciej Szwed
68493f45af event: Add DPDK based governor
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ide0ac38497bc500886e26fd219cb120113896966
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4152
Tested-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 22:35:53 +00:00
Karol Latecki
507f8ae3ea lib/env_dpdk: update crypto and compress library names
Post DPDK 20.08 crypto, isa-l and qat shared object
libraries had their names changed. Detect which library
names are available and use them.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8c9b9b24f9232f303b99c959754a7f7550ffdf90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4780
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 10:14:12 +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
9c20557776 env_dpdk: refactor env.mk to prep for pkg-config
Here we add some new variables which we will be able
to use in a later patch to generate pkg-config files
for this env_dpdk library and our DPDK library
dependencies.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a256096ea08f97eba5d4460405f419624e6f0bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4468
Reviewed-by: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-05 08:29:08 +00:00
Jim Harris
e0986329bf env_dpdk: add DPDK_PRIVATE_LINKER_ARGS
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifd93f2566adff91bf975f67e11f5f0afe8451dc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4466
Reviewed-by: Mellanox Build Bot
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-10-05 08:29:08 +00:00
Jim Harris
84eaed39c1 env_dpdk: remove conditional rte_mempool_ring linkage
This library has existed since DPDK 17.05, so there are
no supported versions of DPDK that do not contain this
library.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I84f2b77046d093989dfa9533f3d1c76e8c243c3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4417
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: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Jim Harris
514fb34ca4 env_dpdk: remove special rte_pci and rte_bus_pci handling
These libraries have existed since DPDK 17.11.  We
do not support any DPDK versions older than that, so
there is no need to conditionally handle cases where
those libraries do not exist.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3906db4d07ae04344b4c3bfaac02da58f248bf75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4392
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: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Jim Harris
8998ac11c1 env_dpdk: remove rte_malloc library handling
This library was removed in DPDK 2.1 which SPDK has
not supported for a very long time now.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I01cf47078e69b9d396a80f5680a4f1c1c3a9be46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4391
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: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Darek Stojaczyk
6b41a08654 dpdkbuild: build dpdk with meson+ninja
Makefile support in DPDK was deprecated and will be removed soon,
so switch to the officially supported way of building DPDK -
with meson and ninja. Two new tools. Basically, our Makefiles
will invoke meson+ninja for DPDK, no other SPDK components are
affected.

Apparently DPDK wanted to move away from an octopus-like config
system and the ideology behind meson configuration is simple now:
build everything by default. Some PMDs can be explicitly disabled
with meson command line, but all libraries (both static and shared
versions) and test apps are built unconditionally.

How long does it take to build minimal DPDK with meson? Too much.
On my machine half of the total build time is spent on libraries
we don't need at all. (I have some hacks up my sleeve to disable
building those libraries - see the subsequent patch.) As for the
official way of building a minimal DPDK, there was a patch [1]
on dpdk mailing list to introduce more specific configuration,
but it was rejected:

> We talked about this a few times in the past, and it was actually one
> of the design goals to _avoid_ replicating the octopus-like config
> system of the makefiles. That's because it makes the test matrix
> insanely complicated, not to mention the harm to user friendliness,
> among other things.
>
> If someone doesn't want to use a PMD, they can just avoid installing it
> - it's simple enough.
>
> Sorry, but from me it's a very strong NACK.

Let's not follow that direction, hack the DPDK build system instead.

As for advantages of meson+ninja over Makefiles? I can't find any.
It's another build system that does a lot for you with some functions,
magic options, and a built-in dependency system. It seems nice if you know
the syntax, but it's another component that you need to learn, debug,
and possibly find bugs in (there's a lot of github issues open for meson).
I would compare it to CMake.

As for changes in this patch: rather that explicitly disabling
PMDs we don't need, specify a list of PMDs we do need and disable
everything else found in ./dpdk/drivers/*. This way we won't have
to disable the new PMDs as they're added to DPDK.

Meson configuration also sets RTE_EAL_PMD_PATH #define to a valid directory
with built PMD shared libs. When it's set, DPDK dynamically loads all shared
libraries inside. The drivers there depend on DPDK shared libs and fail to
load in static SPDK builds, so we disable them altogether by unsetting
RTE_EAL_PMD_PATH in the meson-generated config file - just like
DPDK Makefiles did. EAL checks for RTE_EAL_PMD_PATH being empty and skips
loading any external PMDs then. We do it for both static and shared libs.
We specify all PMDs at build time for now, so there's just no need to load
them dynamically.

We have three more hacks in our submodule:
 * disable building dpdk apps by commenting-out a line in dpdk/meson.build
 * disable building unnecessary libs (build everything that spdk *may*
   need)
 * build isa-l compress pmd with `-L[...] -lisal`. DPDK expects to find
   libisal with pkg-config. We don't want to prepare a pkg-config file,
   so comment-out a failing check in another meson.build file and provide
   isa-l through CFLAGS and LDFLAGS.

We also need to make some changes to our test/external_code. First of
all, -ldpdk is no more. Meson build generates a pkg-config file with all
libs, but we'll switch to it in a separate patch - for now just specify
all -lrte_ libs one by one. -Wl,--no-as-needed has to be added to some
test cases, otherwise rte_mempool_ring isn't loaded. We don't use any
APIs from this library, it only has a static constructor that provides
a few callbacks used by rte_mempool_create(). Also, since DPDK now builds
both static and shared libraries, we need to add -Wl,-Bstatic to force
using static libswhere required. It's only needed for DPDK libs, but we
use it for SPDK libs as well since there's no harm.

As for performance:
$ ./configure --enable-debug --with-crypto --with-reduce
$ time make -j40 -C dpdkbuild all
with meson:
real    0m8.287s
user    1m7.983s
sys     0m10.548s

before, with the old DPDK makefiles:
real    0m20.232s
user    0m55.921s
sys     0m16.491s

The subsequent builds are much faster too:
$ time make -j40 -C dpdkbuild all
meson:
real    0m0.876s
user    0m0.663s
sys     0m0.217s

makefiles:
real    0m10.150s
user    0m11.740s
sys     0m6.772s

[1] http://inbox.dpdk.org/dev/1a07d1cd59d84dce84e56c10fdabf5e5504560a6.camel@debian.org/

Change-Id: Ic65db563014100bafb12e61ee0530cc2ae64401d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1440
Community-CI: Mellanox Build Bot
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-07-24 22:06:11 +00:00
Darek Stojaczyk
d3e1aa05db dpdkbuild: add support for DPDK 20.05
EAL got a new dependency in 20.05: rte_telemetry.

Change-Id: I43df7afe9a84e88f034a7f87fc6a299f0bbd8bac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2590
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-24 09:40:37 +00:00
Darek Stojaczyk
046bdc4abb dpdkbuild: build and link with rte_hash if RAID5 is built
Compiling raid5 has a direct dependency on rte_hash,
which was only built if vhost was built.

The following didn't work:
./configure --with-raid5 --without-vhost

Change-Id: Id36a7d4a21c2e0db00b0641581542e244c4cbbb4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1013
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-03-18 08:02:43 +00:00
Darek Stojaczyk
87e7eed129 env_dpdk: link rte_vhost always when it's requested
We used to link with rte_vhost only if it was present as a file,
which doesn't make much sense - we should try to link with it
when we think it's needed.

Change-Id: I9609972d419fdf6e8d3b4644eff3f5dba83abe42
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1325
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-03-18 08:02:43 +00:00
Jim Harris
916f3d1471 env_dpdk: add functions to define dpdk_env make variables
Create dpdk_lib_list_to_libs and dpdk_env_linker_args
functions to generate the library filename list and the
linker arguments respectively.  Use these functions
internally as well.

These will be useful as part of the Seastar work, where
Seastar pkg-config includes a bunch of the DPDK libraries,
and SPDK needs to just add a few more.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469751
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-10-01 14:01:58 +00:00
Seth Howell
8f71ab3a2b mk: use the env shared lib when linking apps
Previously, aplications were always being linked against the
spdk_env_dpdk.a file even during the shared object build. Change this to
be consistent with our linking.

Also, the old behavior causes issues with resolving symbols in FreeBSD.

Change-Id: I96e2e6044c16e7579cff35ad46e3688ce6fa2b5a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464733
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-08-12 21:12:16 +00:00
Seth Howell
e29c6fe133 mk: force --no-as-needed for spdk libs.
When building shared libs, we specifically don't set the --as-needed
flag so that we still link against libraries that have constructor
functions. LD reports on its man page that the default behavior is
equivalent to --no-as-needed.

For RHEL based distros like fedora and centos this works fine. While
the LD man page shipped with ubuntu distributions also states that
--no-as-needed is the default, they don't respect that behavior and do
--as-needed linking unless you force them with --no-as-needed.

Change-Id: I914ab849323de198af5c5e53fffb1f57fcaff5fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464621
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-08-12 21:12:16 +00:00
paul luse
83afe68690 dpdk: build and link QAT for both crypto and compression
In prep for full QAT compression support later in this patch
series. dpdkbuild/Makefile slightly refactored for readability,
x86 crypto check removed as it pre-dated checks we now have in
configure.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iaaaf51b9eb5e18840f47d2d4f431c5a6e8c420ee
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456408
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-06-05 19:07:32 +00:00
paul luse
f123e84129 env_dpdk: update makefile to link rte_mbuf
Will need this for upcoming compress patches so remove
from its current conditional linking and link for all.

Change-Id: Iba0cf0f529a0765b6d54f7f88eb86e516c5b89ee
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453026
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-13 15:41:35 +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
paul luse
d9d4e40dd2 bdev/compress: Add configure option and build dependencies
Includes the required DPDK dependencies for SPDK block Reduce aka
Compression.

Change-Id: Ic1ea3cbeb9373a7700f6f0c2a3194d65d6a34a41
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/429523
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>
2019-02-11 19:23:17 +00:00
Jim Harris
f823b7f5c1 ipsec_mb: use EXTRA_CFLAGS to point DPDK to intel-ipsec-mb submodule
This allows us to remove the requirement to install intel-ipsec-mb to
system directories.

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

Reviewed-on: https://review.gerrithub.io/c/440785
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-18 17:21:02 +00:00
paul luse
8aaec569a0 dpdk-sub: move submodule and stop building cryptodev API in makefile
Addresses issues with building both compressDev and cryptoDev at the
same time that we will run into shortly.  We now build both API all
the time but those things that have ext deps are still built only
when their respective configure options are set.

Change-Id: Ia4b1d4f18826a8d78c2f09881fb268a8aff61f56
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/437989
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2019-01-02 13:01:34 +00:00
paul luse
5f24a23c55 dpdkbuild: stop building ipsec library with make
In early development of crypto we built the lirbary using
dpdkbuild/Makefile but later due to a DPDK change we needed
to move to a newer version of the ipsec library that is now
built and installed in pkgdep.sh btu we never removed it
from the makefile.

This patch removes the extra building of the ipsec module.

Change-Id: I367618440074d952ff13c6e2098fc3a572cc785e
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/429519
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-31 21:55:37 +00:00
Jim Harris
2c5b956ee5 mk: add spdk_lib_list_to_shared_libs
While here, change spdk_lib_list_to_files to
spdk_lib_list_to_static_libs to differentiate it from
the new spdk_lib_list_to_shared_libs.

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

Reviewed-on: https://review.gerrithub.io/429286
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-15 16:44:36 +00:00
Lance Hartmann
8337cc2d0c env_dpdk: Eliminate unneeded start group ld opt
The ENV_LINKER_ARGS was employing both the linker --[start|end]-group
and --[whole|no-whole]-archive options around the DPDK_LIBs. With
the use of whole/no-whole, the start/end bracketing is unnecessary.

Change-Id: I97a2ac22df8c6b48ba674b9b292f5eea01823901
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/428737
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-11 20:05:29 +00:00
paul luse
ff852667f8 crypto: Build QAT module when crypto is enabled
Didn't enable this in initial patch, probably could have, but we
need it for performance testing now and will need it to start getting
the hardware into CI.

Change-Id: I688cc94713146380933e5cddd7ed5b2d168c1fb2
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427274
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-09-28 20:21:49 +00:00
Paul Luse
51606ed402 bdev: Add crypto virtual bdev module
Initial support for softare AESNI_MB DPDK driver only.

Have tested (both aesni and QAT seprately and concurrrently) on underlying NVMe devices
with bdevio and a bdevperf script that runs IOs from 512B to 128K each with Q depths from
1 to 512 in powers of 2 for 30 seconds each run.

QAT can be included in the code (but not makefile) and marked as experimental
until we are ready to test in CI.  It works well on 2 systems but is a big PITA to get
the hardware setup and configured for use with DPDK (IMHO).

Change-Id: If518c3df8e74e00efa18afdf194824c5e69778fc
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/403107
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-09-17 21:23:14 +00:00
Jim Harris
ff6299f831 build: remove DPDK_DIR
This is an artifact from before SPDK had a configure
script or a DPDK submodule.  Make configure the
only supported way for specifying the location of the
DPDK installation to use with SPDK.

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

Reviewed-on: https://review.gerrithub.io/424893
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-09-07 16:01:28 +00:00
Dariusz Stojaczyk
13eb81e1ab env/dpdk: link with rte_kvargs by default
Starting with DPDK 18.08, rte_kvargs is a dependency
of rte_eal.

Change-Id: I0cde78f632fc313cec745d41ee519fb8b37de81b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422238
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: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:43:30 +00:00
Dariusz Stojaczyk
100e8427b6 env.mk: link libnuma if RTE_EAL_NUMA_AWARE_HUGEPAGES is set
We used to check RTE_LIBRTE_VHOST_NUMA to decide
whether or not libnuma should be linked, but EAL
may need it as well. With our DPDK 18.02 fork we
build fine just because RTE_LIBRTE_VHOST_NUMA is
always set

Change-Id: I2bdf03b328d3ae074437565c8b66e2b6adcbfe89
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/415481
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-15 18:42:02 +00:00
Dariusz Stojaczyk
b6fce1912d env/dpdk: add support for DPDK 18.05 dynamic memory allocation
This brings DPDK 18.05 support and introduces
dynamic hugepage memory allocation.

The following is now possible:
    ./spdk_tgt -s 32
    rpc.py construct_malloc_bdev 128 512

or even:
    ./spdk_tgt -s 0

Note that if no -s param is given, DPDK will still
allocate all available hugepage memory.

This has been tested with DPDK 18.05-rc6.

Fixes #281

Change-Id: Ic9521484c2871eb5b2a56445f1177f305b147707
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/410540
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-05-29 20:34:11 +00:00
Daniel Verkamp
488e6418a5 env_dpdk: remove hard-coded library paths
The default method for building DPDK now is via the submodule, and users
that explicitly want to link a different DPDK need to specify its path
during configure.  Therefore, nothing should be depending on these
hard-coded paths, and we can remove them.

Change-Id: Ic7d70ef10c46f9711691fb804f7dc854e05f7ed1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401075
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-02-23 11:07:38 -05:00
Dariusz Stojaczyk
779dd1bc10 env/dpdk: compile with rte_pci and rte_bus_pci for DPDK 17.11-rc1
DPDK 17.11-rc1 moved a part of it's
eal code into two separate libraries.

Change-Id: Ibcea448487a001c30abb68447e3fe2104ba9a7c3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/387655
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: Ben Walker <benjamin.walker@intel.com>
2017-11-15 17:52:05 -05:00
Daniel Verkamp
f62a37b22f env_dpdk: use detected include file path
env.mk already detects the location of the include path (which may or
may not have 'dpdk' in the name depending on the DPDK version), so put
that into a DPDK_INC_DIR variable and use it in the libnuma check so we
find the correct rte_config.h location.

Also check if rte_config.h exists before trying to pass it to grep -
this prevents error messages when running 'make clean' using the dpdk
submodule, because the rte_config.h file is removed before the other
SPDK directories get a chance to run 'make clean'.

Change-Id: I903c9f5801c04302407b2217723466cd6883fbda
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378163
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 16:43:20 -04:00
Daniel Verkamp
e92c068240 env_dpdk: link libnuma when necessary
Change-Id: I4e5f0694fc99e17dc405d7aa6b9e7215c63c0f52
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377608
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-07 18:02:09 -04:00
Changpeng Liu
e9bfc11043 env/dpdk: additional library required for DPDK 17.05 ring based mempool
Change-Id: I2ef4a330a5628c84657f516cb2e4fad609b6c6d8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-02 15:18:15 -07:00
Daniel Verkamp
aaa87dc00e env_dpdk: allow linking against DPDK shared libs
Detect whether the specified DPDK directory contains static or shared
libraries, and use the appropriate extension when building the library
list. Static libraries are still preferred.

Change-Id: I78c68fd38fba1ea42dd605fb77209651f8cdca75
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-26 10:51:11 -07:00
Daniel Verkamp
bc7b070deb env_dpdk: move system libraries out of ENV_LIBS
The $(ENV_LIBS) variable was including system library linker arguments
like '-ldl', but $(ENV_LIBS) is intended to be used as a dependency for
other Makefile targets, and those arguments don't belong there.

Add the system library linker arguments to ENV_LINKER_ARGS instead.

Change-Id: I247264d287047f1423365806042982b492eec311
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-26 10:51:11 -07:00
Daniel Verkamp
dfe9fa9bea env: do not link env lib with --whole-archive
It is not necessary, and it prevents the linker from removing unused
object files.

Fix the iscsi_tgt Makefile's library order so that env is added at the
end after the libraries that use it.

Change-Id: I241eb46703c12691444037a350be65143259e82e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-06 09:30:55 -07:00
Ben Walker
03f84b5bbf env: Detect correct DPDK header install location
Official installs of DPDK place headers in a 'dpdk'
subdirectory under include, so detect that.

Change-Id: If64421c84c91cae31688994484c22fce398dc622
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-11-23 13:37:29 -07:00
Jim Harris
407b550ff4 build: define SPDK_LIB_LIST to simplify building dependencies and linker args
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia969f9e5ed01f4b58cec2559133347d836118131
2016-11-22 11:45:48 -07:00
Daniel Verkamp
44e60dc47d build: consolidate library outputs in build/lib
Make it easier to use SPDK libraries by putting them all in a single
directory that can be added with -L rather than scattered around the
source tree.

Change-Id: I5c0f5dd6e7058b5f92fa9bc41548190ffc064761
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-17 13:15:09 -07:00