[SPDK] Clarification regarding VFIO driver bind in the setup.sh
chandanga at google.com Mon, 16 Aug 2021 22:36:24 +0000
| Newsgroups | dev.linux.lists.spdk |
|---|---|
| Message-ID | <[email protected]> |
I needed a clarification regarding the VFIO setup script for SPDK (https://github.com/spdk/spdk/blob/master/scripts/setup.sh). In the linux_bind_driver() method, we have the following lines: echo "$ven_dev_id" > "/sys/bus/pci/drivers/$driver_name/new_id" 2> /dev/null || true echo "$bdf" > "/sys/bus/pci/drivers/$driver_name/bind" 2> /dev/null || true I'm wondering if both steps are necessary? It looks like if we set the vendor_id, device_id into "/sys/bus/pci/drivers/vfio-pci/new_id", this will automatically assign all the VFs (which are not assigned to the NVMe driver) to the VFIO driver. Hence, the second line (echoing the $bdf to the bind file) becomes redundant. Is this correct? Any reason why both of these steps are required? Thanks.