Spdk/test
Michal Berger 1f59abaebf scripts/setup: Use driver_override to bind devices
Using new_id attribute is global in scope, meaning that depending
on the kernel's setup seen prior running setup.sh, single write
to it may re-bind ALL matching devices. This doesn't play well
with our PCI_{ALLOWED,BLOCKED} options as they can't be enforced
in such a case. Consider the following example:

  > modprobe -r nvme # all nvme ctrls are detached from the kernel
  > echo 0xdead 0xbeef >/sys/bus/pci/drivers/uio_pci_generic/new_id

  # setup.sh-wise

  > modprobe -r nvme
  > PCI_BLOCKED=some:dead:beef.bdf setup.sh
  # PCI_BLOCKED device still ends up bound to userspace driver.

After this single write, ALL matching devices will end up bound to
uio_pci_generic. To avoid this, we should override preferred driver
on per-bdf basis.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ic4613e33321303b92b47ce3f4d7e1f29ecca3036
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-08 14:16:40 +00:00
..
accel add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
app llvm_vfio_fuzz: call spdk_thread_exit() 2022-11-23 08:22:04 +00:00
bdev module/raid: show raid_bdev details in bdev_raid_get_bdevs rpc 2022-12-07 08:43:52 +00:00
blobfs add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
blobstore add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
common pkgdep/git: do not use install_refspdk for newer fedora images 2022-12-08 12:56:18 +00:00
compress add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
cpp_headers update Intel copyright notices 2022-11-10 08:28:53 +00:00
dd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
dma test/dma: call spdk_thread_exit() 2022-11-23 08:22:04 +00:00
dpdk_memory_utility add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
env add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
event Add SPDX header to various files 2022-11-29 08:27:51 +00:00
external_code add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
ftl add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
fuzz fuzz/vhost: assign unique core masks to vhost and fuzz app 2022-12-07 09:21:13 +00:00
interrupt Add SPDX header to various files 2022-11-29 08:27:51 +00:00
ioat add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
iscsi_tgt iscsi_tgt/fuzz.sh: change overlappling CPU masks 2022-12-08 14:16:00 +00:00
json_config add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
lvol add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
make nvmf: Add copy command support 2022-11-30 08:50:06 +00:00
nvme scripts/setup: Use driver_override to bind devices 2022-12-08 14:16:40 +00:00
nvmf add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
ocf Add SPDX header to various files 2022-11-29 08:27:51 +00:00
openstack add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
packaging add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pmem add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
rpc lib/trace: add trace_get_info RPC 2022-12-05 09:50:38 +00:00
rpc_client add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler Add SPDX header to various files 2022-11-29 08:27:51 +00:00
setup add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
sma Add SPDX header to various files 2022-11-29 08:27:51 +00:00
spdkcli add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
thread thread: test SPDK spinlocks in an application 2022-12-06 21:20:17 +00:00
unit test/reduce: fix missing mem free call and add test call to UT script 2022-12-08 12:55:27 +00:00
vfio_user Add SPDX header to various files 2022-11-29 08:27:51 +00:00
vhost test/vhost_boot: Use string to check for disk device 2022-12-06 08:40:46 +00:00
vmd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_cunit.h update Intel copyright notices 2022-11-10 08:28:53 +00:00