Hi Team,
Currently we are exploring our DPDK application using af_xdp in a non-root mode.
When the DPDK application invokes AF_XDP, it calls xsk_umem__create() and thus requires CAP_IPC_LOCK capability to be enabled. if the application does not provide CAP_IPC_LOCK capability, it fails in the buffer allocation.
Looks like the kernel is reporting ENOBUFS when xsk_umem__create() is invoked without CAP_IPC_LOCK.
Can we use AF_XDP without any capability( to run as non-root mode) in our dpdk application ?
Please advise us.
Please see the code pointers.
DPDK logs show eth_rx_queue_setup in rte_eth_af_xdp.c
Please see the below DPDK logs:
12-23-2022 08:40:42.401426 EAL: Restoring previous memory policy: 0
12-23-2022 08:40:42.401443 EAL: request: mp_malloc_sync
12-23-2022 08:40:42.401447 EAL: No shared files mode enabled, IPC is disabled
12-23-2022 08:40:42.401451 EAL: Heap on socket 0 was expanded by 32MB
12-23-2022 08:40:42.402929 eth_rx_queue_setup(): Set up rx queue, rx queue id: 0, xsk queue id: 0
12-23-2022 08:40:42.402973 xdp_umem_configure(): Failed to create umem
12-23-2022 08:40:42.402980 xdp_umem_configure(): ret, error number and string -105, 105, No buffer space available
12-23-2022 08:40:42.402986 eth_rx_queue_setup(): Failed to configure xdp socket
12-23-2022 08:40:42.403013 eth_rx_queue_setup(): Set up rx queue, rx queue id: 0, xsk queue id: 0
12-23-2022 08:40:42.403030 xdp_umem_configure(): Failed to create umem
12-23-2022 08:40:42.403037 xdp_umem_configure(): ret, error number and string -105, 105, No buffer space available
12-23-2022 08:40:42.403042 eth_rx_queue_setup(): Failed to configure xdp socket
12-23-2022 08:40:42.403065 eth_rx_queue_setup(): Set up rx queue, rx queue id: 0, xsk queue id: 0
12-23-2022 08:40:42.403080 xdp_umem_configure(): Failed to create umem
12-23-2022 08:40:42.403085 xdp_umem_configure(): ret, error number and string -105, 105, No buffer space available
Thanks,
Kamaraj