You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am accustomed to using sudo instead of directly using the root user. When I forget to add the sudo prefix, the program only outputs an error message with a reason that is hard to guess.
aaa@aaaubuntu:~/speedtest$ /data/f-stack/tools/sbin/ifconfig
EAL: Cannot open '/run/user/1000/dpdk/rte/config' for rte_mem_config
EAL: FATAL: Cannot init config
EAL: Cannot init config
EAL: Error - exiting with code: 1
Cause: Error with EAL initialization
This is a known DPDK behavior: when running as a non-root user, DPDK uses a per-user runtime directory (/run/user/<uid>/dpdk/) instead of the system-wide /var/run/dpdk/. Since the F-Stack primary process is typically started as root, the shared memory config ends up in /var/run/dpdk/rte/config, and a non-root secondary process looks in the wrong place — causing the Cannot open rte_mem_config error.
The root cause is straightforward: F-Stack applications and their tools must all be run as root (or the same user that started the primary process) so they share the same DPDK runtime directory.
Suggestion for improvement: It would be helpful if the tools printed a clearer error message when they detect they are not running as root, e.g.:
Error: F-Stack tools require root privileges. Please run with sudo or as root.
A simple check at the start of ff_ipc_init() or in each tool's main():
if (getuid() !=0) {
fprintf(stderr, "Error: F-Stack tools must be run as root.");
exit(1);
}
This would save users from debugging cryptic DPDK EAL errors. Pull requests for this improvement are welcome.
A fix has been submitted in PR #1049. The root privilege check is added at the start of ff_ipc_init() in tools/compat/ff_ipc.c, so non-root users will now see a clear error message instead of the cryptic DPDK EAL failure.
Activity
jfb8856606 commentedon Mar 18, 2026
This is a known DPDK behavior: when running as a non-root user, DPDK uses a per-user runtime directory (
/run/user/<uid>/dpdk/) instead of the system-wide/var/run/dpdk/. Since the F-Stack primary process is typically started as root, the shared memory config ends up in/var/run/dpdk/rte/config, and a non-root secondary process looks in the wrong place — causing theCannot open rte_mem_configerror.The root cause is straightforward: F-Stack applications and their tools must all be run as root (or the same user that started the primary process) so they share the same DPDK runtime directory.
Suggestion for improvement: It would be helpful if the tools printed a clearer error message when they detect they are not running as root, e.g.:
A simple check at the start of
ff_ipc_init()or in each tool'smain():This would save users from debugging cryptic DPDK EAL errors. Pull requests for this improvement are welcome.
tools/compat: add root privilege check in ff_ipc_init() (#829)
jfb8856606 commentedon Mar 18, 2026
A fix has been submitted in PR #1049. The root privilege check is added at the start of
ff_ipc_init()intools/compat/ff_ipc.c, so non-root users will now see a clear error message instead of the cryptic DPDK EAL failure.