How to use non-root to start testpmd of dpdk 17.11 with mlx5 driver?

I can start testpmd of dpdk 17.11 with root user,after install MLNX_OFED driver。But can not start testpmd with non-root user。Why can not start testpmd with non-root?

EAL: Detected 128 lcore(s)
EAL: Probing VFIO support…
EAL: VFIO support initialized
EAL: PCI device 0000:41:00.0 on NUMA socket 0
EAL: probe driver: 15b3:1015 net_mlx5
Interactive-mode selected
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=203456, size=2304, socket=0
Configuring Port 0 (socket 0)
net_mlx5: mlx5_txq.c:395: mlx5_txq_ibv_new(): port 0 Tx queue 0 QP creation failure
net_mlx5: mlx5_trigger.c:185: mlx5_dev_start(): port 0 Tx queue allocation failed: Cannot allocate memory
Fail to start port 0
Please stop the ports first
Done

Hi,

Welcome to the NVIDIA Developer forums! This is the VGPU category, your issue looks to be related to Mellanox drivers. I am moving this to the appropriate category so the support team has visibility.

Hi ,

It looks like hugepages issue related to non-root user
You can refer to the below page
https://doc.dpdk.org/guides/linux_gsg/enable_func.html

Hugepages must be reserved as root before running the application as non-root.
If the driver requires using physical addresses ¶, the executable file must be granted additional capabilities:

SYS_ADMIN to read /proc/self/pagemaps
IPC_LOCK to lock hugepages in memory

Thanks,
Samer

Hi,

I tried it “https://doc.dpdk.org/guides/linux_gsg/enable_func.html”,but it does not work.
Now,it have the below info after starting testpmd with non-root,

EAL: Detected 128 lcore(s)
EAL: Probing VFIO support…
EAL: VFIO support initialized
EAL: PCI device 0000:41:00.0 on NUMA socket 0
EAL: probe driver: 15b3:1015 net_mlx5
Interactive-mode selected
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=203456, size=2304, socket=0
Configuring Port 0 (socket 0)
net_mlx5: mlx5_flow.c:2211: mlx5_flow_create_drop_queue(): port 0 cannot allocate QP for drop queue
net_mlx5: mlx5_trigger.c:179: mlx5_dev_start(): port 0 drop queue allocation failed: Operation not permitted
Fail to start port 0
Please stop the ports first
Done
testpmd>

Thanks

Hi,

Call ibv api at the dpdk mlx5 driver with non-root always fail.
Do you heard it?

Thanks,

Louyq