Commit Graph

36 Commits

Author SHA1 Message Date
Daniel Verkamp
806eb493ca genconfig: undef bool options so #ifdef works
Instead of always defining config values, only #define options that are
enabled, so that #ifdef/#ifndef can be used.  Generate #undef lines for
the disabled variables so the names are still visible in config.h.

Change-Id: Iaf56597ea6ae57b384387cc8a292d63960b611e4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-24 10:42:18 -07:00
Daniel Verkamp
92a02f580c build: generate config.h and implicitly include it
All source files will now depend on config.h, which is generated based
on the defaults in CONFIG and the command line arguments passed to make.

This ensures that any configuration changes, including on the command
line, cause a full rebuild.

Change-Id: I6b6fa3290941200dbcf32297c66df8dc5ee18e94
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-08 10:26:50 -07:00
Daniel Verkamp
91330eb5c8 nvmf: add automated fio and mkfs tests
Change-Id: I499ae29155b8f053babf18750cecb5c8d210d59c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-07 10:16:01 -07:00
Daniel Verkamp
0f912a0eaf nvmf: add NVMe over Fabrics userspace target
Change-Id: I739916824d033bd1a8f8b7f5def09e58f23d13cb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-06 15:21:25 -07:00
Daniel Verkamp
b7095d7b00 setup.sh: get hugepages in 64 MB chunks on FreeBSD
This increases the largest contiguous region available for any single
object (e.g. DPDK mempools) from 32 MB to 64 MB.

Change-Id: I46633b246bcf7843053ab9d0d92993a784287a57
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-26 09:27:16 -07:00
Daniel Verkamp
83aa00649c check_format.sh: check C++ files (.cpp)
Change-Id: Id3b2fb95b2770ff28c9a6561531ae787b54bdaeb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-11 14:10:58 -07:00
Cunyin Chang
7b25f04c43 spdk: Enable vfio for non-privileged user.
Change-Id: I72498ed727058e472b14c8ca8ee95b5858947afe
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-04-14 14:24:23 -07:00
Daniel Verkamp
c83f9378da scripts: merge hugepage config into setup.sh
For now, drop the option to configure the number of hugepages (just use
the default 1024).

Change-Id: I686b6151e4a32ffa4ae9a9cf2694693369e03f49
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-04-14 13:36:44 -07:00
Daniel Verkamp
21173cd036 setup.sh: factor out Linux driver binding
Change-Id: I7d0d919bc8b2ffbc8856648fe746468d9b9f6702
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-04-14 13:10:30 -07:00
Daniel Verkamp
42e10f3e01 autotest: only run NVMe AER test in nightly tests
Change-Id: I39c54db5474ec5fe56f83f1297aa2d0c0445baaf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-28 15:11:55 -07:00
Daniel Verkamp
6887721802 scripts/check_format: use git to find text files
Use 'git grep -I' to determine the list of files that git considers to be
text (rather than hardcoding a list of known text file extensions) and
check all of them for newline at end of file.

Change-Id: I9b947176af2792c139a2782856e3c41061e18f10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-28 10:24:57 -07:00
Daniel Verkamp
55d9ff6a66 config: make -Werror optional and off by default
Allow end users to build the code even if, for example, warnings are
added with new compilers versions.

-Werror is still enforced for automated builds.

Change-Id: I567009d55cf5b941c452bd41d09f75d03b037209
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-18 10:42:28 -07:00
Daniel Verkamp
57a1e89303 check_format.sh: enforce newline at end of file
Change-Id: I4fd1338ec3d95ffcd8a0727e87b845399676ccfa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-16 15:35:17 -07:00
Zeng Linggang
5096b4e033 build: remove redundant MAKEFLAGS set
Change-Id: I4596284950c491acc576192d8e9b3a31241fbe49
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-03-07 13:25:18 -07:00
Ben Walker
55dc5f2131 Add vfio support to scripts.
cleanup.sh and unbind.sh have been combined into a single
setup.sh that takes one optional parameter (reset). If no
parameter is given, the script will automatically bind
all NVMe and IOAT devices to either uio_pci_generic
or vfio-pci, as appropriate based on IOMMU settings. If
the reset parameter is given, the devices will be bound back
to the appropriate kernel drivers.

Change-Id: I25db3234f1ecfb352a281e5093f4c1aa455152ae
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-02-22 11:30:47 -07:00
Daniel Verkamp
85d69f7c36 autotest: enforce Valgrind checking for unit tests
If any memory is leaked or other errors occur, valgrind will now exit
with an error code and fail the tests.

Change-Id: I6c65cae17dcd21eb97d70bd82df828eaa0f8f109
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-19 15:24:09 -07:00
Daniel Verkamp
53d6437bb5 unbind.sh: fix ioat unbind to work with 'set -e'
Since the grep would fail for most devices and the result wasn't
checked, the script would exit on the first device ID that didn't match.

Also initialize $rootdir so ioat_pci.h can be located.

Change-Id: I6a714772e22692ab002e1971134d2a86edc81d92
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 09:50:57 -07:00
Ziye Yang
2c94318f92 Update bind.sh to bind nvme/ioat to uio_pci_generic driver
This patch is used to detect the nvme and ioat devices
in the tested platform and bind it to uio_pci_generic
driver. Thus, when we can smoothly use pci device functions
provided by DPDK instead of using libpciaccess.

Change-Id: Ibfe504fd2864c9b4980eacd0adc5ff2a029b5eaf
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-02-01 15:37:00 -07:00
Changpeng Liu
bf927b44c8 spdk: add the ioat_kperf test tool to autobuild system
Change-Id: If45a7fd3d6d3a7a52e71595de32ea4cf04e23d36
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-22 07:58:13 -07:00
Jim Harris
b61b099030 autobuild.sh: git diff when astyle errors detected.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife57a75c8e5ea6f7cc43d12a73a487b82e1bcd65
2016-01-14 11:25:36 -07:00
Daniel Verkamp
e634bb8db1 autotest: use generic DPDK path on Linux
Switch to /usr/local/share/dpdk on Linux to use the latest installed
DPDK.

This is the filesystem layout from building DPDK with:

  make install T=x86_64-native-linuxapp-gcc DESTDIR=/usr/local

Change-Id: I95cb0a3ee2ad1fcc89f6abb73ff0005aa65110e5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-05 13:31:07 -07:00
Ben Walker
a46c7d6fba build: autobuild.sh now detects number of cpu cores
It was just using 16 make threads by default before.
Now it uses the number of CPU cores.

Change-Id: I695705eb73fc5f5ed3eafe1f85c686bde0e4b7d6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2015-12-31 10:28:18 -07:00
Daniel Verkamp
d4ab30ba33 ioat: add user-mode Intel I/OAT driver
The ioat driver supports DMA engine copy offload hardware available on
Intel Xeon platforms.

Change-Id: Ida0b17b25816576948ddb1b0443587e0f09574d4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-09 10:14:15 -07:00
Daniel Verkamp
c714a9f06f configure_hugepages: use number of pages on FreeBSD
Also request fewer huge pages overall during autotest.

Change-Id: I6744c9a948e8db24b8ed3c7d9d99c89e1e50ba9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-07 16:32:19 -07:00
Jim Harris
df7eb6361a Improve parsing of readelf output in process_core logic.
Sometimes readelf prepends an "fname: " note, to the line
with "psargs", and in that case just using awk with $2 does
not work.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6695352da641111f90be9f3e519accbf05107e91
2015-12-02 13:58:58 -07:00
Daniel Verkamp
497d40b19b build: add CONFIG_COVERAGE code coverage option
Collect coverage information for use with gcov.

Coverage is disabled on FreeBSD because the current version of clang
provided by FreeBSD can't successfully link with -ftest-coverage enabled
(the compiler-rt support libs are too old).

Change-Id: Icc444936caa852bfb9a02b37223209319a27a770
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-02 14:40:49 -07:00
Daniel Verkamp
3e5fe6f602 autobuild: unbind NVMe devices on FreeBSD
Change-Id: I5e6a6ca6751d77aed48bedc2e59f97139dd8ef00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-09 10:03:25 -07:00
Daniel Verkamp
17f255e208 autotest: use inherited output_dir if it's set
Change-Id: I182ebe8dbbd650b6093ac34e52a2ff595811e047
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-08 17:25:58 -07:00
Daniel Verkamp
84b8f0cc8b autotest: output timing in flamegraph format
Change-Id: I9f571ce635431613fc6a84e106e5052cce2dbf54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-08 16:07:47 -07:00
Daniel Verkamp
f0b3db3f1e autobuild: FreeBSD portability fixes
Change-Id: Id6db5d80ee7fa602da8763372f92555e7e299445
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-06 09:09:00 -07:00
Daniel Verkamp
8780063f2c nvme: run unit tests under Valgrind if available
Change-Id: Iad8403903d420418692793d9940e33e2d3772e6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-05 11:00:29 -07:00
Jim Harris
ae2c3152c4 Add unbind_nvme.sh script.
This will rmmod nvme on Linux, and use the DPDK nic_uio driver
to unbind nvme devices from the nvme driver on FreeBSD.

"nic_uio" is actually a misnomer - it is not NIC driver specific,
and can safely be used to bind NVMe devices to an effectively
null driver.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8b964a070586166d762d79696385b82eeb2e88bd
2015-09-25 12:45:04 -07:00
Jim Harris
ae09ffb720 Update hugepage script for FreeBSD.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8adbc9480493c3b6318e0b2a9d170451a0540c71
2015-09-25 12:45:04 -07:00
Daniel Verkamp
7004492324 build: check formatting with astyle
Change-Id: Ic09b4dd7ccccb557e8236fc0b7e3105fce1644b3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-23 09:05:51 -07:00
Daniel Verkamp
a65aafd006 build: add automated build infrastructure
Change-Id: Ie929debaaa74b0d8460b508199e842a244e090fa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-21 15:53:09 -07:00
Daniel Verkamp
1010fb3af1 SPDK: Initial check-in
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-21 08:52:41 -07:00