Content-Type: multipart/mixed; boundary="===============2718375333424044144==" MIME-Version: 1.0 From: chandanga at google.com Subject: [SPDK] Clarification regarding VFIO driver bind in the setup.sh Date: Mon, 16 Aug 2021 22:36:24 +0000 Message-ID: <20210816223624.2778.21718@ml01.vlan13.01.org> List-ID: To: spdk@lists.01.org --===============2718375333424044144== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/nu= ll || 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 vend= or_id, device_id into "/sys/bus/pci/drivers/vfio-pci/new_id", this will aut= omatically assign all the VFs (which are not assigned to the NVMe driver) t= o the VFIO driver. Hence, the second line (echoing the $bdf to the bind fil= e) becomes redundant. Is this correct? Any reason why both of these steps a= re required? Thanks. --===============2718375333424044144==--