title: dpdk-devbind execute failed in pod container
body: <p>I am trying to bind vfio-pci driver to sriov vfs in k8s pod container，but got an error print <br/></p>
  <pre><code>#./dpdk-devbind.py -b vfio-pci 0000:19:02.1
  Error: unbind failed for 0000:19:02.1 - Cannot open /sys/bus/pci/drivers/iavf/unbind.
  # echo &quot;0000:19:02.1&quot; &gt; /sys/bus/pci/drivers/iavf/unbind
  bash: /sys/bus/pci/drivers/iavf/unbind: Read-only file system
  </code></pre>
  <p>But dpdk-devbind.py can works in another docker container created by <code>&quot;docker run --privileged &quot;</code>,
  I thinks this is maybe the <code>PodSecurityPolicy</code> issue.<br>
  After I create PodSecurityPolicy with <code>&quot;privileged: true, readOnlyRootFilesystem: false&quot;</code>, the issue still exist, I was confused.<br></p>
  <p>Why dpdk-devbind.py can not works in k8s pod container with privileged ?<br> should I move the binding operation to host? but some apps runs in container really want to pick the sriov VFs and bind the vfio-pci driver.<br></p>
  <p>Also, the <code>KNI</code> can not works well.<br/></p>
  <pre><code>KNI: Failed to open file: /sys/devices/virtual/net/vEth0_0/carrier.
  </code></pre>
  <p>update: <code>insmod rte_kni.ko carrier=on</code>, then comment code <code>rte_kni_update_link()</code> can fix KNI issue <br/></p>
  <p><strong>update</strong>: according to <a href="https://stackoverflow.com/questions/61926638/kubernetes-volumes-not-getting-mounted/61938522#61938522">Kubernetes volumes not getting mounted</a>, use <code>initContainers</code> to mount host <code>/sys</code> to pod <code>/sys rw</code>, now dpdk-devbind.py can works .</p>
  <p>Thanks a lot!</p>