<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">HI Bruce,<div><br></div><div>Thanks for your reply.</div><div><br></div><div>I have removed the binding of all other ports. So , i can confirm that #2 is taken care of.</div><div><br></div><div>I tried using a different driver "<span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px">uio_pci_generic". I still see the same issue for that driver as well.</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px">The problem seems to be because the write operation is not happening in "bind" file.</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px">Infact tried doing the following step manually. That also failed</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind bash: echo: write error: No such device</span><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">I have required permission for the file.</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">I tried doing with "sudo"</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">I dont have selinux running</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">So not sure whats blocking me. Infact , even "cat </span><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">/sys/bus/pci/drivers/uio_pci_generic/bind" is failing</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">Can you please help.</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">Thanks</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">Nagendra</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px"><br></span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">Thanks</span></div><div><span style="color:rgb(35,38,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px">Nagendra</span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 21, 2023 at 8:15 PM Bruce Richardson <<a href="mailto:bruce.richardson@intel.com">bruce.richardson@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Feb 21, 2023 at 08:05:20PM +0530, Nagendra Prabhu A T wrote:<br>
>    Hi All,<br>
>    I am trying to bind vfio-pci using dpdk-devbind.py, But i am seeing teh<br>
>    following error :<br>
>    root@nat-kvm:/usr/src/dpdk-22.11/usertools# dpdk-devbind.py<br>
>    --bind=vfio-pci 0000:51:00.0 Error: bind failed for 0000:51:00.0 -<br>
>    Cannot bind to driver vfio-pci: [Errno 22] Invalid argument<br>
>    root@nat-kvm:/usr/src/dpdk-22.11/usertools#<br>
>    I see that Sarosh has faced the same issue earlier. I saw the mail<br>
>    thread and followed all the steps mentioned there. But it dint help.<br>
>    Can you please help.<br>
<br>
An error like that I would attribute to one of two possible likely causes.<br>
[There may be other causes, but these two come to mind immediately].<br>
<br>
1. No IOMMU available for use. In this case you need to enable no-iommu<br>
   mode for VFIO and see if that works.<br>
2. You have other ports on the same card bound to a kernel driver. You<br>
   cannot use one port bound to the kernel (and therefore using IOMMU<br>
   mappings for the kernel), while another port on the same card is bound<br>
   to userspace vfio (and therefore looking for userspace IOMMU mappings).<br>
   If this is the case, you need to unbind the other port from the kernel,<br>
   and leave it unbound or else also bound to vfio. It's possible that<br>
   no-iommu mode may help here too, but I have never tested that.<br>
<br>
Regards,<br>
/Bruce<br>
</blockquote></div>