This will be decoupled from the build to start. Next
patches will modify this code to prepare it for use with
SPDK vhost-scsi. The final patch will replace the existing
v17.02-based code with this version, and make the necessary
SPDK vhost changes to use it.
This enables to better track the differences between upstream
DPDK and our internal copy, while not breaking the build at
any point in the git history.
While here, expand the POSIX include file check to exclude
any directory starting with lib/vhost/rte_vhost (which would
include this new directory).
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icf1202c1b7a898edff12aa226943a08b578cf962
Only filter the type of commenting misformat that the
vhost code actually violates currently.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7e978fc68fd81955a0b384e30b33fefa6124ce1
Scan the source for POSIX includes outside of the
allowed locations in check_format.sh. This only
tests for POSIX headers - not Linux Standards Base.
Also, fix one bug that was caught by this addition.
Change-Id: Ib0ca93fe6ac552dc49d95b27b4803e40282027e8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Fix up the existing comment blocks misaligned in the first column.
Also add line numbers to the comment checks.
Change-Id: I9d28c365271df36e7013d74cbb02d0023ab4f581
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix up all existing spacing errors in comments and add an automated
check for patterns like /*comment*/.
Change-Id: I28f61c93612dc0f8aed66bd509da78e91ea9737e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Add a configure script in the root of the repository
that looks and feels like one that would be generated
by autotools. This script simply generates a CONFIG
file for you, which used to be done by hand.
Now to build SPDK you can do the following:
./configure --with-dpdk=path
make
Change-Id: I44ebb91f0cb1468b86da4c0033ac1406595d4967
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Rather than re-running setup.sh during the vhost tests, just
pre-configure NRHUGE to the necessary value for all setup.sh invocations
during autotest.
Change-Id: I1a4d9a7f7ab52082a8f626c3c64807417a493b5f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
If we created /mnt/huge due to no hugetlbfs mount point existing, we
should also use that path in the chown step for VFIO.
Change-Id: I11614a67b16dbda6626b9adf58d8faea10205cab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Match the default FreeBSD core file location as well as the Linux one.
Change-Id: I4c9803d314e89dc7982682c145a83e41dc9027e4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The user now must choose the name for each AIO bdev. This
provides consistency for names across restarts.
Change-Id: I13ced1d02bb28c51d314512d60f739499b0c7d8d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Names for the NVMe bdevs are now assigned by the user.
This means the same name will always be assigned to the
same device, even across restarts.
Change-Id: If9825ec9abcb5236b4671bc44a825e4f0d704fe3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
All devices must be specified by BDF. Add support for scripts
to use lspci to grab the available NVMe device BDFs for the
current machine.
Change-Id: I4a53b335e3d516629f050ae1b2ab7aff8dd7f568
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Move claimed flag to struct spdk_scsi_lun and remove RPC call that allow
SCSI LUN to be deleted by user.
Change-Id: I0fe57d33ab017816ab4799bce259807735e0c783
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Line number regex match all numbers starting from X eg:
10 will match 100 101 102... Fix this by adding space to regex.
Change-Id: Id594550618fea74a22f50033eac101439253a371
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
This patch adds a library, application and test scripts for extending
SPDK to present virtio-scsi controllers to QEMU-based VMs and
process I/O submitted to devices attached to those controllers.
This functionality is dependent on QEMU patches to enable
vhost-scsi in userspace - those patches are currently working their
way through the QEMU mailing list, but temporary patches to enable
this functionality in QEMU will be made available shortly through the
SPDK github repository.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb
To aid debuging print file, line, function and code snipet of each stack
frame in script when error is generated.
Change-Id: Ib720b90049e7102a2e11755c6f10c016634efab9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Instance ID is too overloaded and the uses are beginning
to conflict. Separate the RPC configuration out.
Change-Id: I712731130339fee4fc8de4dc2d0fea7040773c58
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This scripts adds new parameter "status", which shows extra
information about devices connected to the system:
- Numa node on which device is located
- Currently bound driver
- Device name in OS if available
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: If77d5fc20330b2492afd87bf832664c450705624
Python versions older than 2.7 require numbered format specifiers.
Change-Id: I74dd204836c202a79c31c08f0096c31fcb325385
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Default is still 1024 2MB huge pages, but user can
override this by setting a different value in the
environment.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8d189d3a71f474469a44b6eb41b4443591863f3c
Only enable it on the Linux test machines currently, since linking fails
on FreeBSD.
Change-Id: Ib0b30baa90575c7ee93e291ec98883d987cc88f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This matches the behavior of Make and ensures that we rebuild correctly
when the configuration is only modified in the environment.
Change-Id: Iaf63c488b7c817d6c74a89da2d1de8e4c01be045
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Split the arguments into var=val once at startup and put them in a dict.
Change-Id: Ic6b337e010a185448c1dab20659575081f03a645
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
In some circumstances, no utmp entry is available, so logname fails.
In particular, gnome-terminal no longer creates a utmp entry:
https://bugzilla.gnome.org/show_bug.cgi?id=747046
As a workaround, try $SUDO_USER - the use case here is to determine
the (unprivileged) user name so we can give them ownership of
certain files, so this is usually the right thing to use anyway.
If we are not running under sudo, the caller should have passed the
username as a parameter to scripts/setup.sh anyway, since we can't
reliably determine which user is intended.
Also check if username is actually set before using it to run chmod - it
is possible that the scripts/setup.sh caller does not want to provide
access to an unprivilieged user and just wants to run everything as
root.
Change-Id: I20631c325b52884a378029dcf38568a2b311b457
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Add new commands:
get_vhost_scsi_controllers
construct_vhost_scsi_controller
add_vhost_scsi_lun
These RPC commands are in preparation for an upcoming SPDK vhost-scsi
target.
Change-Id: I8dc3045f832df76a34c55f41dba213d480a3e5fe
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Leave the RBD pool configured and running throughout the tests so that
it can be used in multiple test scripts.
Change-Id: I056ef29bd8d97fa63f1ca78ee728f9c51f4bdf41
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix typo in checking for mounted hugepages and replace expr with
arithmetic context as expr is returning error when expression is zero.
Change-Id: I2433fa938b3b2e758e1a4267414c10c5a3a5caff
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Add an RPC interface to list all blockdevs and their properties.
Change-Id: I50db730d5eff8cffcbe8fe5df6b3461457e8581e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Rename the construct_rbd_bdev "size" parameter to block_size so that it
is consistent with other bdev construct RPCs.
Change-Id: I88f8ed35444495ffce9550dc224fbcbd58231787
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Leading and trailing whitespace will otherwise lead to empty array
elements, which are not intended.
Change-Id: Ie7bd5dfce8cb9904090a06491d0bde4905de1e3a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>