Commit Graph

15 Commits

Author SHA1 Message Date
Cunyin Chang
6562e95092 scripts/setup.sh: support systems where more than one domain is used
Change-Id: I38aab093f3d06797e0d69f75978df47c72d279f7
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-04-25 10:16:12 -07:00
Daniel Verkamp
0b89cff2ea scripts/setup.sh: don't fail reset if hugetlbfs is empty
Change-Id: Ib399972b82adafbab5c8437e9141a1f3083292a1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-28 14:16:10 -07:00
Daniel Verkamp
641676ad0a scripts/setup.sh: clean up SPDK hugepages on reset
Change-Id: I272e6ccdb275fdf9663db05b9b6ff9b68c78a646
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-28 13:22:08 -07:00
Daniel Verkamp
9603193f86 scripts/setup.sh: use correct hugetlbfs mount point
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>
2017-03-28 13:22:08 -07:00
Piotr Pelplinski
5c42f21870 nvme_numa: add information about nvme drives to setup.sh script
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
2017-02-14 13:57:04 -07:00
Jim Harris
a9616e8497 setup.sh: allow overriding of NRHUGE
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
2016-12-14 10:27:28 -07:00
Daniel Verkamp
56306a468f scripts/setup.sh: add logname fallback
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>
2016-11-30 10:51:49 -07:00
Pawel Wodkowski
77c57e2ff8 setup.sh: two minor fixes
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>
2016-11-09 10:04:41 -07:00
Ben Walker
6b1e4e732d Drop libpciaccess and switch to DPDK PCI
This patch also drops support for automatically unbinding
devices from the kernel - run scripts/setup.sh first.

Our generic pci interface is now hidden behind include/spdk/pci.h
and implemented in lib/util/pci.c. We no longer wrap the calls
in nvme_impl.h or ioat_impl.h. The implementation now only uses
DPDK and the libpciaccess dependency has been removed. If using
a version of DPDK earlier than 16.07, enumerating devices
by class code isn't available and only Intel SSDs will be
discovered. DPDK 16.07 adds enumeration by class code and all
NVMe devices will be correctly discovered.

Change-Id: I0e8bac36b5ca57df604a2b310c47342c67dc9f3c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-04 15:59:00 -07:00
Daniel Verkamp
b9f3538e5c setup.sh: use 256 MB FreeBSD contigmem buffers
Allocate larger contiguous regions (but the same amount of total
memory).

Change-Id: I54d09c11afdc7bdf232cc3b0864719c063a74b1a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-21 09:56:41 -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
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
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