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 90DEF4327C; Fri, 3 Nov 2023 16:24:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27F3240273; Fri, 3 Nov 2023 16:24:17 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B13EE4014F for ; Fri, 3 Nov 2023 16:24:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699025054; x=1730561054; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=9K2XqxSisPJ4bdT4lTbInfNJIZ8bU1sFmBNVsVW9kF8=; b=c4H+HBAJB31HL7jKr1Qu5oooKSllhj+8mHX/X0bcGtKJvKQS1P++4V10 g2fVWFGhhDlIZc9UKK0HH+Zw6pi/XayEnSTcCfjhy1jsjdKUlKPA81cCC ef2X6qnHXav5KM6P//3bEp7cASVITchCEZpaFOmuJBMW/fFDBV9gbzg2d tBUAzZedkhLh3MDoRrU6inG9YytC+wW0hHuEd7NYPQ5GRZOvH4GH68ww3 HALeGPSVaxv8nPoM8YABsnPlMxaKytH9C+17EdqE2jXvcKs98X34tQXqW 9OuGdxr6VbcRJv4EVFT4HMypC4bLpg9BNHzRiN/5Mp+6fNupMRwWQ6aXq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="392846412" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="392846412" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 08:24:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="9762142" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Nov 2023 08:24:13 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 3 Nov 2023 08:24:12 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 3 Nov 2023 08:24:12 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 3 Nov 2023 08:24:12 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 3 Nov 2023 08:24:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqnRDOxuPc1GKgj2ZM0VLoGsu0CMl6SsXbK/+4pbN2FgK9t0nLtFUGnFQvp+zPiehqXD2v/tLvq7Im2Ist2Up00oHWpFtFIAqoAFhj2MOfHpm1ef0OX0p3wfzdiD6+y/g5sDN/5YlSWsaJhTX5mgMDX5h8RvWTbirgsgGzWF3j/Nr1vkVdEtimF7exnggrDFvPfbq6U50XfCgQmTLKT8nZrDs3zu5EUomctCxW9j/AVAesGil0Pit3aFCAxwbxtXcM5gRmhENTYQk9SOr75jaUgwVu1N/8Rl1ULFGq3jaqgc2ZSYV5L+mOzWxH7toVEvYXWAUas/1bWhuLe7YYRQsg== 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=OpKBfrItG/D15gO/LJ1rzMR7QquO1FcZ43SrU6Vr0tY=; b=ETOem7ljk06OABexPQlthj0vzAgu9pkr3S8O2sWHpDDgXWIFuOI/YgqooxonHmRebOrQTy3yZFQIMqFq88GythoaeUAvGofFnf0yrQLsArO0L+1L1qzG2lYLujdu8LG729o+iR07sX9qwqf6BR6T5AhVZZzWLtEEMrTbc99DFQIweYmT6PviPcB6vmKnnrG6tPD7pVz7U7j4VJfilcUjMSntH0dXfA9TCRwP/pELgdczBrx5RFbMys4IVEFsxW/Ft0qIQDaVb3RAYLQo9xqC4n5BAKwD3YWv1DrRpc7kyv7pLpQpJcHUotX0lZXeyuTGtwsVPYZq7q52rHkzxGQSLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH7PR11MB7051.namprd11.prod.outlook.com (2603:10b6:510:20e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 15:24:04 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44%6]) with mapi id 15.20.6954.021; Fri, 3 Nov 2023 15:24:03 +0000 Date: Fri, 3 Nov 2023 15:23:58 +0000 From: Bruce Richardson To: David Young CC: , Aaron Conole Subject: Re: [PATCH v3 5/7] Section 5: Appendix Message-ID: References: <20231103040202.2849-1-dave@youngcopy.com> <20231103040202.2849-6-dave@youngcopy.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231103040202.2849-6-dave@youngcopy.com> X-ClientProxiedBy: DU2PR04CA0327.eurprd04.prod.outlook.com (2603:10a6:10:2b5::32) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH7PR11MB7051:EE_ X-MS-Office365-Filtering-Correlation-Id: f08c0282-7167-4f2b-e5cd-08dbdc80e917 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 65IG5mJYLHCKOCWoYhT+Tqt3ymnuK9nhOGjqVxnXbcQkJAdnBCQRM6p9GLUxPy1gdalqTqWUALQJP8GoTVY2QZBTnk2zXpTea3yBZlBDO16V+oBM8or/h3e7BwsCSqb+2J/sQoFsEwtLcZr+Bn22yf4B6+ZguxmaZ174W+yL/oMTzwjCUh6xJi/4IZyQVAzhl06bL1LliyoMl+PmFzGZv0eRkLf1v+JSlqL5OrK9FN20B0FhRVUA2t+lM0v3WH2DtL5inpldfgfMhNRLmaXaVjzsaCDAfDl8J6imn4gI4ypajS5HEY5GYkkDyM5fO/g1gl59m8HA58mpQpVOzZgpzQGRsre3TtP1cLG0xVvE7Ad4YIg6JmeDk40l1x6o2cN0UnT67fqy4HwO5SmZYCfAYAEUcU2e7gQFyl/Cn7yPgFIujzxEoj+bOObXGzHi4yv2jJ/HCAM6M3cP9WWp1s51LmrP3iBAQyEucH0eBiTmeXTOvI+vuITkXHBxkWwdzbjsRZd9xKsHyuhjDueOZHPy+sEsUmoQx4q1q0xxZxOjheI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(366004)(396003)(136003)(346002)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(26005)(6512007)(478600001)(6666004)(2906002)(83380400001)(6506007)(41300700001)(44832011)(5660300002)(66946007)(6486002)(8676002)(316002)(66556008)(66476007)(8936002)(4326008)(6916009)(38100700002)(82960400001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dXR3Qk1TRE10M0F0OVNVcUNUYnFkQlpjT3hYK1RRQnN2VFV2dGV0UUNzL2pD?= =?utf-8?B?aUFoR0svb0d4OHRnQ1FqYlhEaUVyL3hBTDNRRzZkdlFoa2JDTWVMRmpuWlJy?= =?utf-8?B?UXVGc1ljNWhQRUlBOTJnNFJxTE16ZVk5bml0UXRqa29WTFo4YkhYS05HR3J5?= =?utf-8?B?bnJ4cDgxKzZzVWhaTkMyNG1jcEpOd0dkSnRDcmQvZ2NrWktZV092Ym90UEJH?= =?utf-8?B?N21wRmNZY3JHZk9TNW1WcE1nK1c4ZW1wdmhNbEhVa083aXFkU2pnVXowcnBU?= =?utf-8?B?ajVVSFRZMTl5cy9TTkt5Ny8rbXVsenFESVNyV25iMXNmcW5pWHZnYXpyM2ZL?= =?utf-8?B?L2tuWC9LcnY0RkZHaENrL3lQOHdobmc5TzNzS20rOWpiMWxKdDMwWjRwRGUy?= =?utf-8?B?R0UvZksyWGswYXdpSXpheDgzYXdEVUYwV1RhYU1RTEI3by9kSzFKaHBsczBk?= =?utf-8?B?Y1ltc1NNUVVnR2pYTVBoQXVjenkyM011MFNxUmN4Ym4zVVl4VmpER1ZkTDds?= =?utf-8?B?R2tRdnNYZlAvdXQyQldITFg1eEFFMzRQcWorZlI2R1c5Nk45SzdBZWpKVWdH?= =?utf-8?B?VTRXSndXVTI2RVlPZ2U2NVFVaUtCTEZkei9SSmNJODZnUUJNUTR1eXNYNjg2?= =?utf-8?B?THFYY2prZDdFRzQrSE9VYSt3ZXNkRE9SNTMyblNpbDk2OStyOFEzOC84bGZi?= =?utf-8?B?LzUxS1ZCcWxHRGNpLzJySkJqYkhDbm1Ec3NUbDdoZTVMcyt5NnBBRmNPUUI4?= =?utf-8?B?Vlh0OXNYdDZtakdZLy9vNEE0ZTZKV2c2K3RMODNsTXI0MmhuVUM1T0JQTVRT?= =?utf-8?B?UStPMDh3ZENrY1NvTHBRS2hkNUJPYVJ0RG43REhKbE9BcGRhWmhORkFRVUlO?= =?utf-8?B?VnBCMHd5VEFYS3p6UzdEekxzajlEaTFEbHhnakxKbDVaZlJoTlVzbGs2M2M2?= =?utf-8?B?VlMwemtERkh0WEZYVkdMRmlScWtsZWlGRUF6dHYwYWVkbFlBUnNRM1B0cWls?= =?utf-8?B?WTcyNHJYak12cXJwNEZlMGRsN1BpMzVaSG1qRWlTTExrNm1GczZuVlFCTGhQ?= =?utf-8?B?NHRJSHgySlMrbDZ1MnpJRUUrcDQxUFVtZW9NWHRPSEIrK3VHd29QckpCNjVZ?= =?utf-8?B?T3R1dDA5QjFQZmZyT01ZTVhIaE9IVkF0V2szS0hrUUNHdjd4bGVyM3JreG0x?= =?utf-8?B?NHk0cTI5R3MvdzFaWTFvWW5QOUozM1hYNW5jQ0V1WnJhMDF5a0F1SjRiaFp2?= =?utf-8?B?bk4yZitZWU84TER1WFc3SW5tSDNrWnBLYWUzSlZ0RTUvclo4U05ZRlRLanJk?= =?utf-8?B?OW9OcEJ0b2NKeGlydDAwZFNHMnFDUU9UMVA2WkVnODdOK0NRZUtXZXBreFdD?= =?utf-8?B?YUhGckxzbGZieEpmNHJxb2pZbWg2TlVMc3YrMkxtSXhMWGZHc3VMN2xTL3N3?= =?utf-8?B?WkFpZWRzY0JjVXdQOUtaZWF2S0l0SUk3MlU5WW5abi9uSjZIQ0hPRTMzZmdo?= =?utf-8?B?RDg4L2Z3bjBqYkx6Q2dSdERTbHBuQnpCaTArMEVIek5JaWljNnhuelMzb2Rv?= =?utf-8?B?dTRGWGNaZFZwcGczYzVUeFVmT2UwVDIvSW9OTEhHV0w4WTBVQ3hJbVVkWk9I?= =?utf-8?B?WXl5dmNzdEJJK0cvY3JrdFFlNjV6QWpSSmVQK3RDNTVKc00xUXh2NkxOV21z?= =?utf-8?B?M0dpNVVCOUduSkFyaTkvUWcwMmR5ajUvRlFOelVsTGp1S1owZDVvMjAxQW8z?= =?utf-8?B?NW04UXNYWVN0SkpSZFdpc1JyNzZONmVRZEFhRSt2OFFGKzdaZHBKTEt3TGlq?= =?utf-8?B?TmRpQk9WeFVmS0V2RE9WVkhkbzBsY2VwSVhXMFNYUExJZzZsZU1lUkN0cFNX?= =?utf-8?B?bVg5bmNvMm5kUGM0NzZiZ0tGM2VzRGZpU2dyUHNzME0ycmNLdXRyWUQrQXZ6?= =?utf-8?B?eWJjU0hQS29BWk9MVkdHbm9NU3dTUDBHVEVtK1JOTEIvYnpYM0NFTFdyTHFa?= =?utf-8?B?Vmk2MmxwV3FySlVwRWU1TjVQc2tCMERMYXhyQUd4dlM5NXlXOGU4ZDRlNUEx?= =?utf-8?B?Vm4xd0s3YXhQcGdlU3F0SUVOUHZZWDRUWGpuckhXUUJpNnNRVlNwZXVnYlJL?= =?utf-8?B?eFplZytnVzJqUzlkY09tV1g4LzRGQUl3SEp4THBmYm4wZUhaanRDbWdkMXJQ?= =?utf-8?B?eHc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: f08c0282-7167-4f2b-e5cd-08dbdc80e917 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 15:24:02.9656 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C95vstgFNhoiWdgv/vv8zEbpvcLz4gD++k5ZxZZ4BaVNRXOyapRz5UfwTIRTPB6z9+Vwsgqnuzwg5ReJCNSdf3Ke0mqQOu99CPMyKVtT78M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7051 X-OriginatorOrg: intel.com 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 I haven't reviewed this whole file in detail, as I assume most content is copy-pasted from existing docs and so is correct. One comment inline below, though. /Bruce On Fri, Nov 03, 2023 at 12:01:51AM -0400, David Young wrote: > --- > .../appendix/cross_compile_dpdk.rst | 37 +++ > .../appendix/dpdk_meson_build_options.rst | 57 ++++ > .../getting_started_guide/appendix/index.rst | 17 + > .../running_dpdk_apps_without_root.rst | 36 +++ > .../appendix/vfio_advanced.rst | 295 ++++++++++++++++++ > 5 files changed, 442 insertions(+) > create mode 100644 doc/guides/getting_started_guide/appendix/cross_compile_dpdk.rst > create mode 100644 doc/guides/getting_started_guide/appendix/dpdk_meson_build_options.rst > create mode 100644 doc/guides/getting_started_guide/appendix/index.rst > create mode 100644 doc/guides/getting_started_guide/appendix/running_dpdk_apps_without_root.rst > create mode 100644 doc/guides/getting_started_guide/appendix/vfio_advanced.rst > > diff --git a/doc/guides/getting_started_guide/appendix/cross_compile_dpdk.rst b/doc/guides/getting_started_guide/appendix/cross_compile_dpdk.rst > new file mode 100644 > index 0000000000..3e4efe23a4 > --- /dev/null > +++ b/doc/guides/getting_started_guide/appendix/cross_compile_dpdk.rst > @@ -0,0 +1,37 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +.. _cross_compile_dpdk: > + > +Cross-compiling DPDK for Different Architectures on Linux > +========================================================= > + > +Cross-compiling DPDK for different architectures follows a similar process. Here are the general steps: > + > +1. **Get Compiler and Libraries**: Obtain the cross-compiler toolchain and any required libraries specific to the target architecture. > + > +2. **Build Using Cross-File**: Use Meson to set up the build with a cross-file specific to the target architecture, and then build with Ninja. > + > +Prerequisites > +------------- > + > +- NUMA Library (if required) > +- Meson and Ninja > +- pkg-config for the target architecture > +- Specific GNU or LLVM/Clang toolchain for the target architecture > + > +Cross-Compiling DPDK > +-------------------- > + > +1. **Set Up the Cross Toolchain**: Download and extract the toolchain for the target architecture. Add it to the PATH. > + > +2. **Compile Any Required Libraries**: Compile libraries like NUMA if required. > + > +3. **Cross-Compile DPDK with Meson**: > + > + .. code-block:: bash > + > + meson setup cross-build --cross-file > + ninja -C cross-build > + > +Refer to the specific sections for ARM64, LoongArch, and RISC-V for detailed instructions and architecture-specific considerations. > \ No newline at end of file > diff --git a/doc/guides/getting_started_guide/appendix/dpdk_meson_build_options.rst b/doc/guides/getting_started_guide/appendix/dpdk_meson_build_options.rst > new file mode 100644 > index 0000000000..6669f98371 > --- /dev/null > +++ b/doc/guides/getting_started_guide/appendix/dpdk_meson_build_options.rst > @@ -0,0 +1,57 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +.. _dpdk_meson_build_options: > + > +DPDK Meson Build Configuration Options > +====================================== > + > +DPDK provides a number of build configuration options that can be adjusted using the Meson build system. These options can be listed by running ``meson configure`` inside a configured build > +folder. > + > +Changing the Build Type > +----------------------- > + > +To change the build type from the default "release" to a regular "debug" build, > +you can either: > + > +- Pass ``-Dbuildtype=debug`` or ``--buildtype=debug`` to meson when configuring the build folder initially. > +- Run ``meson configure -Dbuildtype=debug`` inside the build folder after the initial meson run. > + > +Platform Options > +---------------- > + > +The "platform" option specifies a set of configuration parameters that will be used. > +The valid values are: > + > +- ``-Dplatform=native`` will tailor the configuration to the build machine. > +- ``-Dplatform=generic`` will use configuration that works on all machines of the same architecture as the build machine. > +- ``-Dplatform=`` will use configuration optimized for a particular SoC. > + > +Consult the "socs" dictionary in ``config/arm/meson.build`` to see which SoCs are supported. > + > +Overriding Platform Parameters > +------------------------------ > + > +The values determined by the platform parameter may be overwritten. For example, > +to set the ``max_lcores`` value to 256, you can either: > + > +- Pass ``-Dmax_lcores=256`` to meson when configuring the build folder initially. > +- Run ``meson configure -Dmax_lcores=256`` inside the build folder after the initial meson run. > + > +Building Sample Applications > +---------------------------- > + > +Some of the DPDK sample applications in the examples directory can be automatically built as > +part of a meson build. To do so, pass a comma-separated list of the examples to build to the > +``-Dexamples`` meson option as below:: > + > + meson setup -Dexamples=l2fwd,l3fwd build > + > +There is also a special value "all" to request that all example applications whose dependencies > +are met on the current system are built. When ``-Dexamples=all`` is set as a meson option, > +meson will check each example application to see if it can be built, and add all which can be > +built to the list of tasks in the ninja build configuration file. > + > +For a complete list of options, run ``meson configure`` inside your configured build > +folder. > \ No newline at end of file > diff --git a/doc/guides/getting_started_guide/appendix/index.rst b/doc/guides/getting_started_guide/appendix/index.rst > new file mode 100644 > index 0000000000..23bb1fcf78 > --- /dev/null > +++ b/doc/guides/getting_started_guide/appendix/index.rst > @@ -0,0 +1,17 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +.. _appendix: > + > +Appendix > +======== > + > +This section covers specific guides related to DPDK. > + > +.. toctree:: > + :maxdepth: 2 > + > + dpdk_meson_build_options > + running_dpdk_apps_without_root > + vfio_advanced > + cross_compile_dpdk > \ No newline at end of file > diff --git a/doc/guides/getting_started_guide/appendix/running_dpdk_apps_without_root.rst b/doc/guides/getting_started_guide/appendix/running_dpdk_apps_without_root.rst > new file mode 100644 > index 0000000000..9f214bbdc8 > --- /dev/null > +++ b/doc/guides/getting_started_guide/appendix/running_dpdk_apps_without_root.rst > @@ -0,0 +1,36 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +.. _running_dpdk_apps_without_root: > + > +Running DPDK Applications Without Root Privileges > +================================================= > + > +Although applications using the DPDK use network ports and other hardware resources > +directly, with a number of small permission adjustments, > +it is possible to run these applications as a user other than “root”. > +To do so, the ownership, or permissions, on the following file system objects should be > +adjusted so the user account being used to run the DPDK application has > +access to them: > + The text above implies that we would just be listing a set of files to change. For FreeBSD that is the case, but for Linux, not so much! :-) I'd change the linux section to be a similar list of files to FreeBSD: * VFIO entries in /dev, /dev/vfio/, where id is the VFIO group to which a device used by DPDK belongs. * the hugepage mount directory: /dev/hugepages on many distributions, or any alternative mount point configured by the user, e.g. /mnt/huge, /mnt/huge_1G We also need to note that to run as non-root on linux, you need to use DPDK with iommu support through vfio. > +Linux > +----- > + > +1. **Create a DPDK User Group**: Create a new user group for DPDK and add the desired user to this group. > + > +2. **Set Up Hugepages**: Configure hugepages for the user. > + > +3. **Bind the NIC to a User-Space Driver**: Use the DPDK tool ``dpdk-devbind.py`` to bind the NIC to a user-space driver like ``vfio-pci`` or ``igb_uio``. > + > +4. **Set Permissions for UIO/VFIO Devices**: Change the ownership and permissions of the UIO or VFIO devices to allow access by the DPDK user group. > + > +5. **Run the DPDK Application**: Run the desired DPDK application as the user who has been added to the DPDK group. > + > +FreeBSD > +------- > + > +- The userspace-io device files in ``/dev``, for example, ``/dev/uio0``, ``/dev/uio1``, and so on > +- The userspace contiguous memory device: ``/dev/contigmem`` > + > + > +Refer to the `DPDK Release Notes `_ for supported applications.