scrtips/setup.sh: Add support for IAA device
Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I59cfa9c9c673a2215a8cd42450b94dfcfc959971 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12763 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
bf234f4202
commit
9c55555c71
@ -241,23 +241,24 @@ function get_used_bdf_block_devs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function collect_devices() {
|
function collect_devices() {
|
||||||
# NVMe, IOAT, DSA, VIRTIO, VMD
|
# NVMe, IOAT, DSA, IAA, VIRTIO, VMD
|
||||||
|
|
||||||
local ids dev_type dev_id bdf bdfs in_use driver
|
local ids dev_type dev_id bdf bdfs in_use driver
|
||||||
|
|
||||||
ids+="PCI_DEVICE_ID_INTEL_IOAT"
|
ids+="PCI_DEVICE_ID_INTEL_IOAT"
|
||||||
ids+="|PCI_DEVICE_ID_INTEL_DSA"
|
ids+="|PCI_DEVICE_ID_INTEL_DSA"
|
||||||
|
ids+="|PCI_DEVICE_ID_INTEL_IAA"
|
||||||
ids+="|PCI_DEVICE_ID_VIRTIO"
|
ids+="|PCI_DEVICE_ID_VIRTIO"
|
||||||
ids+="|PCI_DEVICE_ID_INTEL_VMD"
|
ids+="|PCI_DEVICE_ID_INTEL_VMD"
|
||||||
ids+="|SPDK_PCI_CLASS_NVME"
|
ids+="|SPDK_PCI_CLASS_NVME"
|
||||||
|
|
||||||
local -gA nvme_d ioat_d dsa_d virtio_d vmd_d all_devices_d drivers_d
|
local -gA nvme_d ioat_d dsa_d iaa_d virtio_d vmd_d all_devices_d drivers_d
|
||||||
|
|
||||||
while read -r _ dev_type dev_id; do
|
while read -r _ dev_type dev_id; do
|
||||||
bdfs=(${pci_bus_cache["0x8086:$dev_id"]})
|
bdfs=(${pci_bus_cache["0x8086:$dev_id"]})
|
||||||
[[ $dev_type == *NVME* ]] && bdfs=(${pci_bus_cache["$dev_id"]})
|
[[ $dev_type == *NVME* ]] && bdfs=(${pci_bus_cache["$dev_id"]})
|
||||||
[[ $dev_type == *VIRT* ]] && bdfs=(${pci_bus_cache["0x1af4:$dev_id"]})
|
[[ $dev_type == *VIRT* ]] && bdfs=(${pci_bus_cache["0x1af4:$dev_id"]})
|
||||||
[[ $dev_type =~ (NVME|IOAT|DSA|VIRTIO|VMD) ]] && dev_type=${BASH_REMATCH[1],,}
|
[[ $dev_type =~ (NVME|IOAT|DSA|IAA|VIRTIO|VMD) ]] && dev_type=${BASH_REMATCH[1],,}
|
||||||
for bdf in "${bdfs[@]}"; do
|
for bdf in "${bdfs[@]}"; do
|
||||||
in_use=0
|
in_use=0
|
||||||
if [[ $1 != status ]]; then
|
if [[ $1 != status ]]; then
|
||||||
@ -311,6 +312,7 @@ function collect_driver() {
|
|||||||
[[ -n ${nvme_d["$bdf"]} ]] && driver=nvme
|
[[ -n ${nvme_d["$bdf"]} ]] && driver=nvme
|
||||||
[[ -n ${ioat_d["$bdf"]} ]] && driver=ioatdma
|
[[ -n ${ioat_d["$bdf"]} ]] && driver=ioatdma
|
||||||
[[ -n ${dsa_d["$bdf"]} ]] && driver=dsa
|
[[ -n ${dsa_d["$bdf"]} ]] && driver=dsa
|
||||||
|
[[ -n ${iaa_d["$bdf"]} ]] && driver=iaa
|
||||||
[[ -n ${virtio_d["$bdf"]} ]] && driver=virtio-pci
|
[[ -n ${virtio_d["$bdf"]} ]] && driver=virtio-pci
|
||||||
[[ -n ${vmd_d["$bdf"]} ]] && driver=vmd
|
[[ -n ${vmd_d["$bdf"]} ]] && driver=vmd
|
||||||
fi 2> /dev/null
|
fi 2> /dev/null
|
||||||
@ -668,6 +670,7 @@ function status_linux() {
|
|||||||
desc=${desc:-${nvme_d["$bdf"]:+NVMe}}
|
desc=${desc:-${nvme_d["$bdf"]:+NVMe}}
|
||||||
desc=${desc:-${ioat_d["$bdf"]:+I/OAT}}
|
desc=${desc:-${ioat_d["$bdf"]:+I/OAT}}
|
||||||
desc=${desc:-${dsa_d["$bdf"]:+DSA}}
|
desc=${desc:-${dsa_d["$bdf"]:+DSA}}
|
||||||
|
desc=${desc:-${iaa_d["$bdf"]:+IAA}}
|
||||||
desc=${desc:-${virtio_d["$bdf"]:+virtio}}
|
desc=${desc:-${virtio_d["$bdf"]:+virtio}}
|
||||||
desc=${desc:-${vmd_d["$bdf"]:+VMD}}
|
desc=${desc:-${vmd_d["$bdf"]:+VMD}}
|
||||||
|
|
||||||
@ -724,6 +727,9 @@ function status_freebsd() {
|
|||||||
DSA DMA
|
DSA DMA
|
||||||
$(status_print "${!dsa_d[@]}")
|
$(status_print "${!dsa_d[@]}")
|
||||||
|
|
||||||
|
IAA DMA
|
||||||
|
$(status_print "${!iaa_d[@]}")
|
||||||
|
|
||||||
VMD
|
VMD
|
||||||
$(status_print "${!vmd_d[@]}")
|
$(status_print "${!vmd_d[@]}")
|
||||||
BSD_INFO
|
BSD_INFO
|
||||||
@ -735,6 +741,7 @@ function configure_freebsd_pci() {
|
|||||||
BDFS+=("${!nvme_d[@]}")
|
BDFS+=("${!nvme_d[@]}")
|
||||||
BDFS+=("${!ioat_d[@]}")
|
BDFS+=("${!ioat_d[@]}")
|
||||||
BDFS+=("${!dsa_d[@]}")
|
BDFS+=("${!dsa_d[@]}")
|
||||||
|
BDFS+=("${!iaa_d[@]}")
|
||||||
BDFS+=("${!vmd_d[@]}")
|
BDFS+=("${!vmd_d[@]}")
|
||||||
|
|
||||||
# Drop the domain part from all the addresses
|
# Drop the domain part from all the addresses
|
||||||
|
Loading…
Reference in New Issue
Block a user