From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBDC246E62 for ; Thu, 4 Sep 2025 08:50:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA4CB40EF1; Thu, 4 Sep 2025 08:50:31 +0200 (CEST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mails.dpdk.org (Postfix) with ESMTP id 2E04A40281 for ; Wed, 3 Sep 2025 16:54:50 +0200 (CEST) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-336af63565dso44871501fa.1 for ; Wed, 03 Sep 2025 07:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756911289; x=1757516089; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=//SR7PDcWMD8z7gnzGwS2C3E9P3+7rZe8RsmnERTWZw=; b=C4SNkWJIDl1YFvqdNSOwAm+DM5PwlnT6peQpKFbc3bFPZzPpEepvSPeWwoXLpmzGv3 EyDSSycH8QYOLh6DeGb2ENr/eHZIc9D6v9pzB0phRfG6AvcY3P2dgny9jsHe59gHxEiy YZUQpZAelmlxC0gpLjvTF+Wn/QNV3F06XQ9RYR3qfVY8a439sKIVohQGtI4mv9YgT3QZ r3Nt24UvENOoBEDgumidloLY9UZxXcaaFW0UeoxwU4jpdla9dQe0+pXUFs1Yr0YWugI4 EPm14vAn5zQCCNTEdiKnkCa4OcC95eP3/sb0CVPXzoIBWb73mWVeTKEw8814amoOuaVQ hXaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756911289; x=1757516089; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=//SR7PDcWMD8z7gnzGwS2C3E9P3+7rZe8RsmnERTWZw=; b=nG+Ji6FbpgjBk0i5Y6uMtvojq9rtJsfaW51Qcs28Zu0XtMm8cd6DMmmVDJ6flN/HrC QdvzjfZXSkoTB+xgmZJUklcCt+vjhCzDBc29FmRJXSkcz5xX9E09GJn0SAAlU1Cg80AW lePiAyo3y0rUM9WqgGXj3u5M0rh3KDESlPAnwtrh8e/C67XuosCWZ1CqZCpsxj9u4wAS KF+uO2m53F50s8CgLaRFf+ePpgO1Iy7i5oNeE/Ye2SFQ832j7EMVoVzZ7h7596z+26zO 1dVLf2CM169fAwKVsrbI4c7kc6KzWctvz5KBX0pmi/lNrhUCKRE0/3Ei0bjucHn8TfVY yCZA== X-Gm-Message-State: AOJu0Yw1JrfsNmOM5Jhc0bzwhOZ2u22MtJcBYNgO21dPzKcAZvhlD/WD kTOeSAPdpwzu2yLyXu0d8yQu74sGnZ21Bsf8bNoV9yrNrMTdmQ8hqnLZvgjaTZgr/XzhfsPaZW1 C0bQl6l9VUBCJ3MogqvyTYb0ET4MY48Q= X-Gm-Gg: ASbGnct29rNj8cruczk3IdnaWxPipNd+gpYfQYCW/cGq53DiX8eKyjSnpAGtLiqSeFz GuxC+hn0EX8OnxWQUlW98vF6/60yzWWtLMLZ49reGj59cVwsYdJ5LCY06bT67yhqezPd1DIc1Uq A89UrwD8e8p6z3+HOQDeiV4fh8F7uU6huiK8XLB2U2NBv+3AwQ1iZBANiXRhKNhPjcF26UJqb7V 3lweX3TI+OnPRD1KhT8Zvc= X-Google-Smtp-Source: AGHT+IE3LRFjIb3ttShkPJWbCUuxHAy/x4r74j/lklHPYfPmHxVIHlrNDn1e+InJPQ2XmM9AJgTYEt9blsm7Tacc9YQ= X-Received: by 2002:a05:651c:4005:b0:338:f:5cec with SMTP id 38308e7fff4ca-338000f7420mr9082591fa.12.1756911288852; Wed, 03 Sep 2025 07:54:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Julien Date: Wed, 3 Sep 2025 16:54:37 +0200 X-Gm-Features: Ac12FXxKzT0pjDfvSgnyGBWD6vmHzMlB18U-PGh7H002-lHuJn3VQ1zrzmIrJ7Q Message-ID: Subject: Re: [mlx5 driver] Usage of mlx5 with unpriviledged LXC container To: David Marchand Cc: users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000004627e1063de6c9a9" X-Mailman-Approved-At: Thu, 04 Sep 2025 08:50:30 +0200 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000004627e1063de6c9a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for the response. Yes, these capabilities are necessary in order to run dpdk-testpmd inside a container. However, they are not sufficient. I tried again with a 6.8 kernel and the Nvidia tools/libraries suite: "doca-host_3.1.0-091000-25.07-ubuntu2404_amd64.deb". The log is more informative this time: "mlx5_common: DevX create TIS failed errno=3D121 status=3D0x3 syndrome=3D0x6a6678". Do you have any idea how to investigate this issue, especially regarding "status" and "syndrome"? On Mon, Aug 25, 2025 at 2:24=E2=80=AFPM David Marchand wrote: > On Mon, 25 Aug 2025 at 14:09, Julien wrote= : > > > > Hello, > > I have a question about using the mlx5 driver with LXC. > > I'm trying to use dpdk-testpmd in an LXC container whose root user isn'= t > mapped to the host's root user. > > Note: The entire physical interface is given to the LXC container, not = a > virtual interface. > > > > The following error occured: > > mlx5_common: DevX create TIS failed errno=3D22 status=3D0 syndrome=3D0 > > mlx5_net: Failed to create TIS 0/0 for [bonding] device mlx5_2. > > mlx5_net: TIS allocation failure > > mlx5_net: probe of PCI device 0000:27:00.0 aborted after encountering a= n > error: Cannot allocate memory > > mlx5_common: Failed to load driver mlx5_eth > > EAL: Requested device 0000:27:00.0 cannot be used > > EAL: Bus (pci) probe failed. > > > > The "transport_domain" is created, and the mlx5_devx_cmd_create_td() > function runs normally. > > The call to mlx5dv_devx_obj_create() receives an errno of 22. > > > > I don't encounter any problems when the container's root user is mapped > to the host's root user. > > Has anyone experienced this before? > > Is it possible to use the driver in an unprivileged LXC container? > > There is probably something missing in terms of capabilities. > I don't know how LXC behaves in this regard. > > I suggest you look at "5.5.1.5. Run as Non-Root" in > https://doc.dpdk.org/guides/platform/mlx5.html. > > > -- > David Marchand > > --0000000000004627e1063de6c9a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the r= esponse.
Yes, these capabilities are necessary in order to run dp= dk-testpmd inside a container. However, they are not sufficient.
= I tried again with a 6.8 kernel and the Nvidia tools/libraries suite: "= ;doca-host_3.1.0-091000-25.07-ubuntu2404_amd64.deb".
The log= is more informative this time: "mlx5_common: DevX create TIS failed e= rrno=3D121 status=3D0x3 syndrome=3D0x6a6678".
Do you have an= y idea how to investigate this issue, especially regarding "status&quo= t; and "syndrome"?

On Mon, Aug 2= 5, 2025 at 2:24=E2=80=AFPM David Marchand <david.marchand@redhat.com> wrote:
On Mon, 25 Aug 2025 at 14:09, Juli= en <ju= lien.marcin.tech@gmail.com> wrote:
>
> Hello,
> I have a question about using the mlx5 driver with LXC.
> I'm trying to use dpdk-testpmd in an LXC container whose root user= isn't mapped to the host's root user.
> Note: The entire physical interface is given to the LXC container, not= a virtual interface.
>
> The following error occured:
> mlx5_common: DevX create TIS failed errno=3D22 status=3D0 syndrome=3D0=
> mlx5_net: Failed to create TIS 0/0 for [bonding] device mlx5_2.
> mlx5_net: TIS allocation failure
> mlx5_net: probe of PCI device 0000:27:00.0 aborted after encountering = an error: Cannot allocate memory
> mlx5_common: Failed to load driver mlx5_eth
> EAL: Requested device 0000:27:00.0 cannot be used
> EAL: Bus (pci) probe failed.
>
> The "transport_domain" is created, and the mlx5_devx_cmd_cre= ate_td() function runs normally.
> The call to mlx5dv_devx_obj_create() receives an errno of 22.
>
> I don't encounter any problems when the container's root user = is mapped to the host's root user.
> Has anyone experienced this before?
> Is it possible to use the driver in an unprivileged LXC container?

There is probably something missing in terms of capabilities.
I don't know how LXC behaves in this regard.

I suggest you look at "5.5.1.5. Run as Non-Root" in
https://doc.dpdk.org/guides/platform/mlx5.html.

--
David Marchand

--0000000000004627e1063de6c9a9--