I have C application that is using DPDK 19.11. Currently, the application is running with root permissions (using sudo command). In addition my application is running with huge pages (1GB).
Network devices using DPDK-compatible driver:
0000:02:00.0 'Ethernet Controller X710 for 10GbE backplane 1581'
drv=igb_uio unused=
I would like to run my application without the root permissions - get rid from "sudo" command. I change permission for those files/folders:
/sys/class/uio/uio*/device/resource*/sys/class/uio/uio*/device/config/dev/uio*/dev/hugepages/*
when I run my application without "sudo"- I run in a problems with rte_eal_init function. I got this error:
EAL: FATAL: Cannot use IOVA as 'PA' since physical addresses are not available
EAL: Cannot use IOVA as 'PA' since physical addresses are not available
My OS is Ubuntu 18.04, kernel 4.15.0-128-generic I noticed that at DPDK docs there is a remark about Running DPDK Applications Without Root Privileges - "since version 4.0, the kernel does not allow unprivileged processes to read the physical address information from the pagemaps file, making it impossible for those processes to be used by non-privileged users. In such cases, using the VFIO driver is recommended."
After reading comments I tried to use vfio-pci. I load the module using:
sudo modprobe vfio-pci enable_unsafe_noiommu_mode=1
I also changed permission for /dev/hugepages/* and /dev/vfio/*
running with vfio-pci and sudo was successfully.
when running without sudo i got the same error:
EAL: FATAL: Cannot use IOVA as 'PA' since physical addresses are not available
EAL: Cannot use IOVA as 'PA' since physical addresses are not available
I wonder if someone has experience to run DPDK application without root with kernel 4.0 and above?
Also, as an alternative solution is to launch simple DPDK application with root privileges that will init DPDK. In parallel run another application without root privileges - this application will consume the packet and perform the business logic, is it possible?
thanks
3.9and4.12usingDPDK 18.11LTS and19.11 LTS. I am not able to find any issues that you have faced or listed here.So have you tried running with necessary changes?The alternative solution you have mentioned will not work as long as you using Huge pages. Note: I am not recommending to use syscall to hide or skipsudoprivellege checks to run asnon privellegeduser. - Vipin Vargheseinsufficent detailsyet - Vipin Varghesehttps://stackoverflow.com/users/13121879/useme-alehosainimarkingNo Action Required. I humbly requestuseme-alehosainto justify why logs and DPDKlog-level=8is not required for debugging the issue? As mentioned in my first comment I have been able to run withoutsudowith DPDK 18.11 and 19.11. - Vipin Varghese