<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div>I have a question about using the mlx5 driver with LXC.</div><div>I'm trying to use dpdk-testpmd in an LXC container whose root user isn't mapped to the host's root user.</div><div>Note: The entire physical interface is given to the LXC container, not a virtual interface.</div><div><br></div><div>The following error occured:</div><div>mlx5_common: DevX create TIS failed errno=22 status=0 syndrome=0</div><div>mlx5_net: Failed to create TIS 0/0 for [bonding] device mlx5_2.</div><div>mlx5_net: TIS allocation failure</div><div>mlx5_net: probe of PCI device 0000:27:00.0 aborted after encountering an error: Cannot allocate memory</div><div>mlx5_common: Failed to load driver mlx5_eth</div><div>EAL: Requested device 0000:27:00.0 cannot be used</div><div>EAL: Bus (pci) probe failed.</div><div><br></div><div>The "transport_domain" is created, and the mlx5_devx_cmd_create_td() function runs normally.</div><div>The call to mlx5dv_devx_obj_create() receives an errno of 22.</div><div><br></div><div>I don't encounter any problems when the container's root user is mapped to the host's root user.</div><div>Has anyone experienced this before?</div><div>Is it possible to use the driver in an unprivileged LXC container?</div><div><br></div><div>Dpdk version: 23.11</div><div>Linux Kernel: 5.15</div><div>Stack:</div><div><span style="white-space:normal"><span style="white-space:pre">     </span>libibverbs.so.1!execute_ioctl(struct ibv_context * context, struct ibv_context * context@entry, struct ibv_command_buffer * cmd, struct ibv_command_buffer * cmd@entry) (\rdma-core-49.0\libibverbs\cmd_ioctl.c:147)</span></div><div><span style="white-space:normal"><span style="white-space:pre">    </span>libmlx5.so.1!_mlx5dv_devx_obj_create(struct ibv_context * context, const void * in, size_t inlen, void * out, size_t outlen) (\rdma-core-49.0\providers\mlx5\verbs.c:5794)</span></div><div><span style="white-space:normal"><span style="white-space:pre">      </span>libmlx5.so.1!mlx5dv_devx_obj_create(struct ibv_context * context, const void * in, size_t inlen, void * out, size_t outlen) (\rdma-core-49.0\providers\mlx5\verbs.c:5819)</span></div><div><span style="white-space:normal"><span style="white-space:pre">       </span>librte_common_mlx5.so.24!mlx5_glue_devx_obj_create(struct ibv_context * ctx, const void * in, size_t inlen, void * out, size_t outlen) (\dpdk-23.11\drivers\common\mlx5\linux\mlx5_glue.c:1045)</span></div><div><span style="white-space:normal"><span style="white-space:pre"> </span>librte_common_mlx5.so.24!mlx5_devx_cmd_create_tis(void * ctx, struct mlx5_devx_tis_attr * tis_attr) (\dpdk-23.11\drivers\common\mlx5\mlx5_devx_cmds.c:2037)</span></div><div><span style="white-space:normal"><span style="white-space:pre">     </span>librte_net_mlx5.so!mlx5_setup_tis(struct mlx5_dev_ctx_shared * sh) (\dpdk-23.11\drivers\net\mlx5\mlx5.c:1343)</span></div><div><span style="white-space:normal"><span style="white-space:pre">   </span>librte_net_mlx5.so!mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data * spawn, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\net\mlx5\mlx5.c:1784)</span></div><div><span style="white-space:normal"><span style="white-space:pre">    </span>librte_net_mlx5.so!mlx5_dev_spawn(struct rte_device * dpdk_dev, struct mlx5_dev_spawn_data * spawn, struct rte_eth_devargs * eth_da, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\net\mlx5\linux\mlx5_os.c:1169)</span></div><div><span style="white-space:normal"><span style="white-space:pre">     </span>librte_net_mlx5.so!mlx5_os_pci_probe_pf(struct mlx5_common_device * cdev, struct rte_eth_devargs * req_eth_da, uint16_t owner_id, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\net\mlx5\linux\mlx5_os.c:2648)</span></div><div><span style="white-space:normal"><span style="white-space:pre">        </span>librte_net_mlx5.so!mlx5_os_pci_probe(struct mlx5_common_device * cdev, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\net\mlx5\linux\mlx5_os.c:2797)</span></div><div><span style="white-space:normal"><span style="white-space:pre">   </span>librte_net_mlx5.so!mlx5_os_net_probe(struct mlx5_common_device * cdev, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\net\mlx5\linux\mlx5_os.c:2881)</span></div><div><span style="white-space:normal"><span style="white-space:pre">   </span>librte_common_mlx5.so.24!drivers_probe(struct mlx5_common_device * cdev, uint32_t user_classes, struct mlx5_kvargs_ctrl * mkvlist) (\dpdk-23.11\drivers\common\mlx5\mlx5_common.c:938)</span></div><div><span style="white-space:normal"><span style="white-space:pre">  </span>librte_common_mlx5.so.24!mlx5_common_dev_probe(struct rte_device * eal_dev) (\dpdk-23.11\drivers\common\mlx5\mlx5_common.c:1028)</span></div><div><span style="white-space:normal"><span style="white-space:pre">        </span>librte_common_mlx5.so.24!mlx5_common_pci_probe(struct rte_pci_driver * pci_drv, struct rte_pci_device * pci_dev) (\dpdk-23.11\drivers\common\mlx5\mlx5_common_pci.c:168)</span></div><div><span style="white-space:normal"><span style="white-space:pre">        </span>librte_bus_pci.so.24!rte_pci_probe_one_driver(struct rte_pci_driver * dr, struct rte_pci_device * dev) (\dpdk-23.11\drivers\bus\pci\pci_common.c:312)</span></div><div><span style="white-space:normal"><span style="white-space:pre">   </span>librte_bus_pci.so.24!pci_probe_all_drivers(struct rte_pci_device * dev) (\dpdk-23.11\drivers\bus\pci\pci_common.c:396)</span></div><div><span style="white-space:normal"><span style="white-space:pre">  </span>librte_bus_pci.so.24!pci_probe() (\dpdk-23.11\drivers\bus\pci\pci_common.c:423)</span></div><div><span style="white-space:normal"><span style="white-space:pre"> </span>librte_eal.so.24!rte_bus_probe() (\dpdk-23.11\lib\eal\common\eal_common_bus.c:78)</span></div><div><span style="white-space:normal"><span style="white-space:pre">       </span>librte_eal.so.24!rte_eal_init(int argc, char ** argv) (\dpdk-23.11\lib\eal\linux\eal.c:1287)</span></div><div><br></div><div>Best regards,</div><div>Julien Marcin</div><div><br></div></div></div></div>