Spdk/scripts
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
..
bash-completion trace: update trace help inside SPDK target 2022-09-27 19:41:17 +00:00
bpf add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
ceph add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
perf scripts/run_vhost_test: fix shellcheck SC2294 warning 2022-12-08 12:56:18 +00:00
pkgdep pkgdep/debian: Install python3-dev 2022-12-08 14:15:52 +00:00
vagrant vagrant/create_vbox: add fedora37 2022-12-08 12:56:18 +00:00
ar-xnvme-fixer add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
arm_cross_compile.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
bpftrace.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
check_format.sh check_format: Add checker for the SPDX-license 2022-11-29 08:27:51 +00:00
common.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
core-collector.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
detect_cc.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
dpdk_mem_info.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
eofnl add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
fio-wrapper add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
gdb_macros.py update Intel copyright notices 2022-11-10 08:28:53 +00:00
gen_ftl.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
gen_nvme.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
genconfig.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
get-pmr add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
histogram.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
iostat.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
lspci add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pc_libs.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pc_modules.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pc.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
pkgdep.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
posix.txt build: Automatically detect use of POSIX includes 2017-05-08 13:20:37 -07:00
prep_benchmarks.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
qat_setup.sh scripts/qat_setup: Remove VFs' pci id from the target bind driver 2022-12-08 12:56:56 +00:00
rpc_http_proxy.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
rpc.py bdev: Add mode to bdev_reset_iostat RPC to reset only max/min fields 2022-12-08 12:54:23 +00:00
rxe_cfg_small.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
setup.sh scripts/setup: Use driver_override to bind devices 2022-12-08 14:16:40 +00:00
sma-client.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
sma.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
spdk-gpt.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
spdkcli.py add (c) and SPDX header to python files as needed 2022-11-10 08:28:53 +00:00
spdx.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
sync_dev_uevents.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00