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 8589346DCF for ; Mon, 25 Aug 2025 14:24:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 529AB402A2; Mon, 25 Aug 2025 14:24:31 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 088C04025A for ; Mon, 25 Aug 2025 14:24:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756124668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LhnEr9J+PKycFtBTHyvURs1HEQE2Gni+/UKnk5lzO4k=; b=diqcDWnE1ZQl9llX5zxon7XZ43o6MDVgCtX8Kp1tg0tZrSTeCFTQdAd6TL4+If7V5tdDOd DfQl0O9d3lWsWEHdrjU3LxSUCked0zwpWPQwZax4xuvXNlhY9q7/weKa9qXVA94f2vdYdm qVKwgkza7/gu4flOZ9+EePL8+jAIPJQ= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-66EOv0nqPNysJ_VY3pGZSw-1; Mon, 25 Aug 2025 08:24:27 -0400 X-MC-Unique: 66EOv0nqPNysJ_VY3pGZSw-1 X-Mimecast-MFC-AGG-ID: 66EOv0nqPNysJ_VY3pGZSw_1756124666 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-55cdf8bf33eso2977901e87.0 for ; Mon, 25 Aug 2025 05:24:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756124665; x=1756729465; 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=LhnEr9J+PKycFtBTHyvURs1HEQE2Gni+/UKnk5lzO4k=; b=UrBqmQVk2//lEKzo9Q7pEgp66IpiswWDkT1a0zypKx/pxwyxzYFC7hFAd/cE1kDd1Q lkNYQgiDsiq2IXgR7w4FBTsn5fk6ss2j2KRBnS1dJ9d7YjrINxVUGriQmmJvVpolNb+M S8ax4MmOUJP+l5bMJiQhBEJf3EiPDaBKFUaw1QJQEy1Q0GWv0zidJlH3lskEFwAjNttf GEmynjW4tNeXj9lEj4jxDqJzEyuhVWYEmodMDTNy/nEgUrwM2zQkXVrS4HkTXBKF7Vcg JSgnUx5vHWQ0YJdDDql1RLq5QIb9AOghWe7eupWACyejpHXErDN5i1J/0RudEizGDsLt euuw== X-Gm-Message-State: AOJu0YyEMTW178MGvvo8K1ggZphOVcacBC47jL+Z7ne3b2LNJ5D/yBMw CW00hDJXj6OolfwlMPELjO02h6pJ3sHJ2mKfBcbVQ4p18ixq/kkHj/EVk+TVB3nt3Mo0WcLEwYl QoQLgJzJQY5eW1HHeDYIoMEfYHzjRMh79LxLRaMZrIO+EaBooy+Q0BYRiOOASxNaroA3A7DOsER Us4C6Fe/SMrFCQIpdV/h8wBA== X-Gm-Gg: ASbGnctnvGLDafsMlKRW/GrB19DP9v/SiPwEJrPIDnDV461GfJBaXKgnF/160pIhS64 LW4ycRFGabFBC+OudiPp9P6suCivN5DaAIr7ATyVnjMFtXC5cLXq9rIFA9d8ckEe3GmbQbIbal+ 4FkpJzDXq6wZsAEPdi+m0HBTw= X-Received: by 2002:a05:6512:ba3:b0:55c:adae:37ae with SMTP id 2adb3069b0e04-55f215fc186mr3745898e87.5.1756124665436; Mon, 25 Aug 2025 05:24:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWa0sA8xa0unaZ5zKNJMahGoT2zUBKuYRYd/ByvaBGy49sGkAcu/JNMaKAElEUVE3G/uAx4+Xg6Wl5aDVFj+0= X-Received: by 2002:a05:6512:ba3:b0:55c:adae:37ae with SMTP id 2adb3069b0e04-55f215fc186mr3745889e87.5.1756124664924; Mon, 25 Aug 2025 05:24:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Mon, 25 Aug 2025 14:24:11 +0200 X-Gm-Features: Ac12FXw09uQfGDRJ2VEk4c0PJM2LCIqpgmjaUqvsWk5bZxte4E1RyUyk_Kz8FvQ Message-ID: Subject: Re: [mlx5 driver] Usage of mlx5 with unpriviledged LXC container To: Julien Cc: users@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WrTF6KA2ScNl8FMnrYrGrfcsVxHya__HrLWMOcClU2s_1756124666 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 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=22 status=0 syndrome=0 > 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_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