title: Can you run DPDK in a non-privileged container as as non-root user?
body: <p>I am trying to run DPDK in a non-privileged docker container. While I can limit the container's privileges and specify the container as non-privileged, I still need to run a dpdk application (say testpmd) as root. I can also run the container as non-root and use sudo to start testpmd.</p>
  <p>I was wondering if anyone is able to run dpdk (without the --no-huge option) as non-root user, inside a docker container. If so, are there certain privileges or permissions that need to be granted?</p>
  <p>UPDATED:</p>
  <p>I'm using DPDK 20.02. I think I've narrowed down the problem to a ulimit -l setting.</p>
  <p>From testpmd:
  <strong>EAL:   cannot set up DMA remapping, error 12 (Cannot allocate memory)</strong></p>
  <p>From Dmesg
  <strong>dmesg: [ 5697911.199003] vfio_pin_pages_remote: RLIMIT_MEMLOCK (65536) exceeded.</strong></p>
  <p>In response to Vipin:</p>
  <p>Did you need to adjust the limits for the container? if so how?
  I am using helm to deploy the pods so I'm not sure if I can modify the docker run command, it looks like I would need to edit /etc/security/limits.conf on the host and redeploy.</p>
  <p>Also, what did you use to give ownership of the fs? Doesn't having a non-privilieged container prevent you? For testing, I just sudo it, but ultimately I want to be able to drop SETUID/SETGID.</p>