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 C1EC2A0032; Fri, 24 Jun 2022 10:48:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 761E14280B; Fri, 24 Jun 2022 10:48:44 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2088.outbound.protection.outlook.com [40.107.94.88]) by mails.dpdk.org (Postfix) with ESMTP id 649CB427FF; Fri, 24 Jun 2022 10:48:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KnjeVb+wMwH1h5MJfphFZraF9lIl7DAxH9LTDbsPnuL9zfyqiuwzLlhLny4XxQNAgk2dcmQZ/hxXqQv8qRsYlV4Ei7k9wh9pcU3LVj2WAbICF0p/lebsKJ21M7KmSFq9cMGqY4T8tQeYBuIeQ39UddjdrINam10mio0mmZu7kIxkBtsXQxtz+qnRs9mRqEC/KaGiUapsHoTGwQbhEBAtQcd79ghpLXGsEfSC9aIecXVvkAPtLznVYN8/2iffIosUFMw/uXgqqn0YgwYT2jlH+4rlSVN5iM3p+pbAhA2GiT19EUMHpVU3fRRk+1RQDJ7ma78R6cdGgS+zEFK1fo0IjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3PZsvV8UxwsCCg8Cj9IG54/SfJSnJ2wFglvspkVHfQs=; b=KagJYE5sZfrBptU9MsfARw6p5tukEQQ42z63P+IT1qrocF+daZOWYxqGzkjfy/Krlh/mdtEHZjMiuwWH/74+tZXY4zW7ijfKZ+EuwF9ZQ2fCXmhAFMH6+ZrIFOOxsy6VjUjlc4DNOK1OOPWV7nXuNpQwHHVILPZz3u3rj0EC1Cldyi5vr1Qz0gf7axJnxMe9Xi64CRXRJyRYTWbZ5gXPRwCXrKdA8jcWYgXtztUNgYlkmjGY2+z2CTtBHprgjTgRQ7OSX6Stdw2TtOJ+FjzrteQ0XfaWX5jNumXqFZwqTJJrDg/lYfjiSedjo36uFUAowZy7OtUhMKGQw2bUlkzswg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3PZsvV8UxwsCCg8Cj9IG54/SfJSnJ2wFglvspkVHfQs=; b=miVCujcvfpaHnDC5cFO6fc1Ar9ES6r6Fy/JLrqnn4cW0D3YFuzpaHy4UZWLX86sFPoEjGGSAIt1tqQQJuIh8sUTEWhjTSFfTq0aNPrJpB8uDHFXkU/vQIhNGXpHa13HJ4iI/w0u9z7aFVESkvctGmRU6aJTu/HhlZ6UIE/KYYgZf71RO1C+swtiUVOI4MDj4qCtGXFJw2dHU90HAn93kMBUu4Mg5qgsg7dqTf8UlfFZfc2yEKN6jHmW2bEGzXBpboRVAVaEqijdpdL3Omeyt9KPjZaBK+nCctkTCFUrjPqYSwfFoHJeKo9IRm4wqSomJAAZ2AwxVnZu04e4+Vm2ygQ== Received: from DM6PR07CA0096.namprd07.prod.outlook.com (2603:10b6:5:337::29) by SA0PR12MB4557.namprd12.prod.outlook.com (2603:10b6:806:9d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.16; Fri, 24 Jun 2022 08:48:33 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:5:337:cafe::fc) by DM6PR07CA0096.outlook.office365.com (2603:10b6:5:337::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 08:48:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 08:48:32 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 08:48:31 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 01:48:31 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 01:48:30 -0700 From: Dmitry Kozlyuk To: CC: Subject: [PATCH v3 4/5] doc: update instructions for running as non-root for MLX5 Date: Fri, 24 Jun 2022 11:48:16 +0300 Message-ID: <20220624084817.63145-5-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624084817.63145-1-dkozlyuk@nvidia.com> References: <20220617112508.3823291-1-dkozlyuk@nvidia.com> <20220624084817.63145-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cdf972b4-82bb-429d-c811-08da55be51a4 X-MS-TrafficTypeDiagnostic: SA0PR12MB4557:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u9asqqEiL2ZhnFvkoQyDMl1QrFRc1WPi9t2Z3Jfjdm5uJiuE9rQ4Dbkbo2w+xSccxQzR92NxR3tnZS5+vofR+2Af20L09wyh3Vn95HxV0YeIsIEt0AATcc/w8m3+qvn6TSgsONTXpi6G8TtyV16Tu1VnqMiqXcRaxwWHFVFlqHITr706PyxVFpMivcVF96pm0xVXsJ4WhS8450sQjFZG11voV1BsS7Zm4IAZau8rCVt/33xePAL8QgUsuz/L2eklh9yXbwaB9G4vCs/uNfY4g7NBomMg9ccy/w6tZH+kjttiNv8GWPHd1puWeORlJO7Oj5491Yc0mIM4O5u9gvZmibDYnlLCtHls7aaGcThTsr2lggL8Hi93f7dcdKInzjSUfVVtlGvIaFdp9+gcTX8zmz691Tt4TyH0SiCYH5fxhDm0yUGsB/a9NPA3LkoFOFgGohM3ius8I9R2l9m1dBD1w7tJ3nVXt84sSX32Vk00YwhEas3a95AX3vrSXHVlvQDpc9zkq4Tnx3FeB4D0i6X/8Kj4cdR8pbAJzJ1OSRgOabIIv4vCavzSTThiQMb4ggmTbVbblw5S5TKbE8OSBfeZEHYlmBOYPdkHvBLKji97T6ijBDbcaoyjOjd8eXlQkk/Sj6opms7o6SljY8kc2ph9BMZyRh7w3wWEEbyqLfTN/YaxO+leyC7Rmtd97YpRpXYaohH8Z2wa0Xk0k9bNSklDqhTVJGYEC9f8EaqG82DBiIdW27p753QvU/SoGhvGik0RvwYZuZ8HJGAZRXxk0CVzS9vOnGcKRFL1qCZtamsVIK+LuAueH5UguiD6fBixGYap4mL2FSSW5Cnz9AGoaUwEsg== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(346002)(376002)(396003)(46966006)(40470700004)(36840700001)(83380400001)(26005)(6666004)(7696005)(41300700001)(6286002)(2616005)(426003)(336012)(47076005)(186003)(356005)(1076003)(81166007)(82740400003)(316002)(5660300002)(40480700001)(36860700001)(8936002)(4326008)(8676002)(82310400005)(36756003)(55016003)(2906002)(6916009)(450100002)(40460700003)(86362001)(478600001)(70586007)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 08:48:32.6841 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cdf972b4-82bb-429d-c811-08da55be51a4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4557 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Reference the common guide for generic setup. Remove excessive capabilities from the recommended list. Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk --- doc/guides/platform/mlx5.rst | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst index 64a4c5e76e..18d38f3488 100644 --- a/doc/guides/platform/mlx5.rst +++ b/doc/guides/platform/mlx5.rst @@ -404,25 +404,30 @@ The device can be bound again at this point. Run as Non-Root ^^^^^^^^^^^^^^^ -In order to run as a non-root user, -some capabilities must be granted to the application:: +Hugepage and resource limit setup are documented +in the :ref:`common Linux guide `. +This PMD can operate without access to physical addresses, +therefore it does not require ``SYS_ADMIN`` to access ``/proc/self/pagemaps``. +Note that this requirement may still come from other drivers. - setcap cap_sys_admin,cap_net_admin,cap_net_raw,cap_ipc_lock+ep +Below are additional capabilities that must be granted to the application +with the reasons for the need of each capability: -Below are the reasons for the need of each capability: +``NET_RAW`` + For raw Ethernet queue allocation through the kernel driver. -``cap_sys_admin`` - When using physical addresses (PA mode), with Linux >= 4.0, - for access to ``/proc/self/pagemap``. +``NET_ADMIN`` + For device configuration, like setting link status or MTU. -``cap_net_admin`` - For device configuration. +``SYS_RAWIO`` + For using group 1 and above (software steering) in Flow API. -``cap_net_raw`` - For raw ethernet queue allocation through kernel driver. +They can be manually granted for a specific executable file:: -``cap_ipc_lock`` - For DMA memory pinning. + setcap cap_net_raw,cap_net_admin,cap_sys_rawio+ep + +Alternatively, a service manager or a container runtime +may configure the capabilities for a process. Windows Environment -- 2.25.1