1

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind bash: echo: write error: No such device root@prab:/usr/src/dpdk-stable-22.11.1/usertools# sudo echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind echo: write error: No such device root@prab:/usr/src/dpdk-stable-22.11.1/usertools#

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# lsmod | grep uio_pci_generic uio_pci_generic 16384 0 uio 20480 1 uio_pci_generic root@prab:/usr/src/dpdk-stable-22.11.1/usertools#

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# lspci -v -s 0000:51:00.0 51:00.0 Ethernet controller: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ (rev 02)

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind bash: echo: write error: No such device root@prab:/usr/src/dpdk-stable-22.11.1/usertools# sudo echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind echo: write error: No such device root@prab:/usr/src/dpdk-stable-22.11.1/usertools#

Tried running the script dpdk-devbind.py, that also fails due to the abive reason

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# ./dpdk-devbind.py --status

... ... ... Other Network devices

0000:51:00.0 'Ethernet Controller X710 for 10GbE SFP+ 1572' unused=i40e,vfio-pci,uio_pci_generic

I am using the following versions :

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# uname -a Linux prab 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux root@prab:/usr/src/dpdk-stable-22.11.1/usertools#

root@prab:/usr/src/dpdk-stable-22.11.1/usertools# pkg-config --modversion libdpdk 22.11.1 root@prab:/usr/src/dpdk-stable-22.11.1/usertools#

Prab
  • 21
  • 1

1 Answers1

1

I do not know what sh -c means in your command.

A bind in fact needs two write actions: (for kernel > 3.15)

echo uio_pci_generic > /sys/bus/pci/devices/0000:51:00.0/driver_override

echo 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind

Also it should work only after unbind in previous action.

Why don't you use dpdk-devbind.py -b uio_pci_generic 0000:51:00.0 . This script has been developed for this purpose.

junka
  • 11
  • 2
  • Hi, Thanks for the reply. Initially i tried running the dpdk-devbind.py. But that script is also failing with the same reason : Error: bind failed for 0000:51:00.0 - Cannot bind to driver uio_pci_generic: [Errno 19] No such device When i run the script, the unbind happens successfully and the drivers are shown as unused : Other Network devices ===================== 0000:51:00.0 'Ethernet Controller X710 for 10GbE SFP+ 1572' unused=i40e,vfio-pci,uio_pci_generic – Prab Feb 21 '23 at 05:05
  • After this step, script calls, device override. That is also successful : cat /sys/bus/pci/devices/0000:51:00.0/driver_override uio_pci_generic After this step, the script tries to append the bind file. Thats where it fails with the following reason : Error: bind failed for 0000:51:00.0 - Cannot bind to driver uio_pci_generic: [Errno 19] No such device Since the script failed, i tried the same step manually. And that where i got this error : echo 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind bash: echo: write error: No such device – Prab Feb 21 '23 at 05:05
  • then have a try for this, sudo sh -c "echo 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind" – junka Feb 21 '23 at 09:17
  • tried doing that as well. It is not working. – Prab Feb 21 '23 at 15:57
  • have you tried any other uio drivers? like vfio-pci, igb_uio, etc. Some devices may fail for part of these drivers. – junka Feb 22 '23 at 05:48
  • Did you ever solve this? :( – MappaM Jun 15 '23 at 15:34