[dpdk-users] Running DPDK as non-root

Adrien Mazarguil adrien.mazarguil at 6wind.com
Tue Jul 12 19:09:17 CEST 2016


On Thu, Jul 07, 2016 at 06:17:21PM +0200, Thomas Monjalon wrote:
> Hi
> 
> 2016-07-07 16:47, Jez Higgins:
> > Is it possible to get DPDK up and running as non-root - if so, can
> > anyone guide me to what I'm missing? Or should I be giving this up as a
> > bad job?
> 
> You can try the --no-huge option.
> But most of drivers won't work without hugepage currently.
> A rework of the memory allocation is needed to make it work better.

A little late but just for the record, mlx4 and mlx5 should run fine with
--no-huge since these devices use virtual memory addresses directly
(although I must admit this feature is not tested very often).

There is still a requirement for root in order to create raw Ethernet TX and
RX queues for security reasons, as it would be like setting a network
interface in promiscuous mode to sniff traffic (tcpdump) or creating raw
sockets (ping) as a mere user, but this may be possibly achieved (not sure,
to be verified) by running applications with the CAP_NET_ADMIN capability.

Raw Ethernet QP creation can be allowed by default without special user
capabilities by installing MLNX_OFED with the --vma flag.

A few features will still be missing such as setting interfaces up and down,
updating MTU of the physical link and so on, basically all netdevice
operations that are not queries. Those can be performed as super-user on the
related netdevice directly from a separate process, even before starting the
DPDK application.

-- 
Adrien Mazarguil
6WIND


More information about the users mailing list