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 99E754327C; Fri, 3 Nov 2023 16:14:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32BDD40273; Fri, 3 Nov 2023 16:14:13 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A0EF84014F for ; Fri, 3 Nov 2023 16:14:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699024450; x=1730560450; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=QPxZet2Dp50+MeoV6Bs4EqUdVqfTwc+hsHoEKJoGEHk=; b=KHfLyo4A4KWj766qX+W2EiZ0JNmC2JTBmrtl5aFGu0iQh6EH3h05NzcW QkmHUWlg3Sr9uzNR7Zq4mYFVXQBYeEZ5MbsyYx7be/RJlBLi61105MuEI sI77JNsjR3wKmuPIJnKik3KPdrzN9S02uG+Qd528IyHTYC/QCeKHXKf/h ziN8aHnqnprL5lGXntFLaWaTUI+m+YSyFmr/TEOmG/LmbJLPpPtzKag4c ZFf0IP1TPhy8N1aYViaam4Jim0U6H4JEo/OfGsj3ULZvWcvk811LzRij9 DwfVVO4OlEbxfw1fWQFROcOpxjO5NpflpqVlRbThKz2RyBiWOZGMCCTQt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="453257708" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="453257708" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 08:14:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="832042879" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="832042879" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Nov 2023 08:14:08 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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:14:07 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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:14:07 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) 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:13:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OW034dBg8bRpDpNDVoY3gBvu0/viMV2ZE4dKT95QKd/IE8g0921ql8NEXyChJjTd+OyGGCasL3c0Nl/VoVqyttSPHibnIlWXI3CC4+J7mnu1bLP/5w2gdcaqDn3TXFD/a4KmfVqZyz0Ngkpz2bfXGyz5+z2R3XlMCZV+2fq3hwd4wrRL6x2udi8QtBuqDU/qLruqVhV0iy5usiIbjmdEE5il08C4fqHErHTr2iuBKsmrFj2U06QQQpAD5tTcGqsTdPjvhT9kOmbpGRVId5jOJPJgppoxPMqsd9W2m5INlmgVrDXZSAB+rDUIQsJRbiWOPDFVyB8ajEckL/EOtxGbDw== 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=APnzljOaBFaCvmSrUyj7GbLkhFN+txVNzaDk1zy6e7s=; b=Awa05iEgs+nym1TCyByKsg83W2WcVSoJJPj7PhHxSl+6GWdCrHia1744FBCRJttDEk12oKgiB0GUB8pYVqlogsIPnhe7ZYN0zCUWpHlZmziKnuePx5MzGwpfFtJFjFkZ8rkz6u3I0Wb2Cs/r8S+8v8mEy59eBSGBt+3qKUelQGT93jaoeGrxuk5N2L/3qwPn37td+QZHI32HOLljgkqi2F2Mg9ZF/gPUBXX9JVihWo7xAXwAW9yEOOil3/vhq4eU26eeuZBc5UW9dVepgY06uLxV2WULbWXTUsaV/SF4ffiea3XMBZ6WicbbEMumR+z4e4NftIrCCBjM+1YinaiDVQ== 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 DM4PR11MB8225.namprd11.prod.outlook.com (2603:10b6:8:188::12) 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:13:46 +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:13:46 +0000 Date: Fri, 3 Nov 2023 15:13:39 +0000 From: Bruce Richardson To: David Young CC: , Aaron Conole Subject: Re: [PATCH v3 4/7] Section 4: Running Applications Message-ID: References: <20231103040202.2849-1-dave@youngcopy.com> <20231103040202.2849-5-dave@youngcopy.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231103040202.2849-5-dave@youngcopy.com> X-ClientProxiedBy: DUZPR01CA0022.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB8225:EE_ X-MS-Office365-Filtering-Correlation-Id: 86a62548-482d-413a-be38-08dbdc7f7950 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Zeo2y+1uiY4GAXIuqy+t7T6/YzhgB3+SZ79CQMYgHmULeRB+0SpURJ1YMIhjzkvxHi+MqOpJjNnlyFa5+9OQEGsfmUVxAaIIbIZc9X9f0CFWN+C7QJJ9b0Jur+CitZdT63hlX4lBCcqxrZ+T0h4nSCIOauGMssfp3hGbmd79wL6lVqsVWRR6BLprbIAzgpT94AKi7DcZoGL0GA78nYZYnUZOXuZYXfMqOQTbb8IRaNTdqGJsDW+DuM/cJjewFYf6bewESiDNQl/MM1zjPhQH5uao2YtEY0O8XbXULbUymCpw5CqUTk4Hx8BWXBfhz/sppsjMpV5Qdd+e5xtejC/8NjyNkY+okZby7uHZgkOeXTOoYv33/zVBZJE8xQMNCSkHBywG/a0y8pfbGeRu3cuMHyVBnHfI/C0S0Ytn5lbghWJSkElyfPDjQfQiJhru1rn+BNsAloSyEvFA0bPt2FlqMtmEjmN1uJSG3DuX3DkOxrXjfCUxfg/0/P4axSQNZviz2bUJAJywf333gEqBt8zjmIqRJE8HY/8iNiWqJqjceoajWAMpxeAayROYkpna+v/C+p5j+fACroRaoFLkoqdLJjwYB1jRSY6wfPUO0TtuduYZCVzK6tqfzetnFfsbVW+7p64YsPyDl8i2indq5N52w== 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)(346002)(396003)(39860400002)(366004)(376002)(136003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(6486002)(66476007)(66556008)(5660300002)(316002)(8676002)(6916009)(4326008)(2906002)(8936002)(66946007)(6666004)(478600001)(44832011)(6512007)(41300700001)(26005)(6506007)(83380400001)(82960400001)(86362001)(38100700002)(460985005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dERjdzdtUFFsMGY3K2FaTU5tNzkxZkhTQjZrZ0lGeDJldmFyV2lDWGU5TUVm?= =?utf-8?B?SnJYeCtzcEMyMGtvYWZhMmlyMlFqRXlPZmROaGMzVzdpMlo1UnZvdzhGUE1S?= =?utf-8?B?cVRmWGs4NGFla2RUODhxZElUSk4vWk9ZVlB0UEY5YmhHTGhwYUhUNndzUmZG?= =?utf-8?B?RWp3MjkxN1Q1RWxBb1VVZkg5bThFc3RWa2xqeE80NWQ3Q1Npc1BFam1OMzYx?= =?utf-8?B?Yjk3MXNJSzZyZkZZRUhYSllSTlVLSG5CUUUwbHJPem1Pb1dLUHZOc1NTSFFH?= =?utf-8?B?NXN5a3B5dzRlNXE1VmQ0dk9WRjVGRW5GRVhMUUVYYU5GbEF1RElWaTk0NSto?= =?utf-8?B?eE43a0Y5S0xXN3NWL28vd3NocmtWbTArRHA4bm85RkxKYVlvWlYyTjBCVzl6?= =?utf-8?B?UkZsT1JlbmF1Z0tORGo0ZmhxYVRYalhjNXRpREZPM3RJU01kZjhQaFg0ZDJ6?= =?utf-8?B?TlI5Z1kyeEdSaTNCeTFIaW9weHBPYjBtVXFIT2RGSkhVWW9SQUlqOEZ4VXd0?= =?utf-8?B?bEVuR3Z0cDVUUlF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mR0hWMC8zOEVoOS9oeWh0L3JkR2hQK0thWkdKa1BteXNpanphcEtZWEZX?= =?utf-8?B?enU4elVUYXhrbEFQWEkrSzgxZU0xQUxkKzkwUkwxVmlGYjFFQTU1RU94Vnda?= =?utf-8?B?VVRNTjZjTGFLOVFDS3E2Y21SRE14NlJKR0RFaVA5T2ZCMW56MVAydjlEN0tP?= =?utf-8?B?ajRYbEtLOFlPV0cxT3JESVRudkYxQ0djMDhadVp1OTlZSmgxK1V6ek91N1dr?= =?utf-8?B?UHZrTjh5anl1NnhOTm9LWFNnVlROMnV1RmJKRmtWY0ZySjBrOURqbFpodWVS?= =?utf-8?B?YUV0eUpJbXVjenBRbDVYelUvWnEyRjZSNTV5ZzJCR2ErZVBBTFpSaXVEN2Vw?= =?utf-8?B?SWNxaElQbjFaOEVHalNPYjlXZUR1cmpKL3dpbjNwQWdMaG01Sy9qa1pnc0pq?= =?utf-8?B?ZGF5ci9kc3RrV2tXcWFxNGtpa0hzNHZaelNCV2ZjNkxyY2RBTllaWFJlYThK?= =?utf-8?B?Zm8xUE5FYXBvWlkwL2FsL3NUT0FDTjNLMzdVaEpoemI0b0JweWp6d0NJZ1U3?= =?utf-8?B?bUZpNlBvMTRhMmNVblMzOVRSMTRHY0x0VGcxMG5vRW5IMEYzN2tXQVdWckFW?= =?utf-8?B?bmtrNTBPUGdVSk5WcjdTampqeXYxSVplaUVPalVwQVZDR3hoTlAzR3FDUmFG?= =?utf-8?B?Q3VYVmlPKzFqeUxTK0o2RzZIUkROcDNhOXhMdDE0bXpKVzQ1Z1NocWV2OFh1?= =?utf-8?B?UVE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 86a62548-482d-413a-be38-08dbdc7f7950 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:13:45.9399 (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: V+HY/RnFBI+UoBXZi3D2u3OVC8jNn0vsLbo5Sr64e5FWHLhyf5DFzikXQ3IwXl/Q0BtubwK9p/YvIvjGAMVbf+uLl+eDNjSGNlseuF95Xuc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB8225 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 On Fri, Nov 03, 2023 at 12:01:50AM -0400, David Young wrote: > --- > .../getting_started_guide/run_apps/index.rst | 10 ++ > .../run_apps/run_apps.rst | 118 ++++++++++++++++++ > 2 files changed, 128 insertions(+) > create mode 100644 doc/guides/getting_started_guide/run_apps/index.rst > create mode 100644 doc/guides/getting_started_guide/run_apps/run_apps.rst > > diff --git a/doc/guides/getting_started_guide/run_apps/index.rst b/doc/guides/getting_started_guide/run_apps/index.rst > new file mode 100644 > index 0000000000..f033cac5f0 > --- /dev/null > +++ b/doc/guides/getting_started_guide/run_apps/index.rst > @@ -0,0 +1,10 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +Running Applications > +==================== > + > +.. toctree:: > + :maxdepth: 2 > + > + run_apps > \ No newline at end of file There seems to be only a single run_apps file, so we don't need a whole subdir for it. > diff --git a/doc/guides/getting_started_guide/run_apps/run_apps.rst b/doc/guides/getting_started_guide/run_apps/run_apps.rst > new file mode 100644 > index 0000000000..339d4c0a68 > --- /dev/null > +++ b/doc/guides/getting_started_guide/run_apps/run_apps.rst > @@ -0,0 +1,118 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2010-2025 Intel Corporation. > + > +.. _run_apps: > + > +Running Applications > +==================== > + > +The following instructions apply to Linux, FreeBSD, and Windows. > + Do they apply for windows? I see windows at the end, so yes, we have instructions but they are split. I'd drop this opening line. > +.. contents:: Table of Contents > + :local: > + > +Running Applications on Linux and FreeBSD > +----------------------------------------- > + > +Compiling and Running Sample Applications > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +To compile a sample application: > + > +1. Navigate to the application's directory in the DPDK distribution. > +2. Execute the ``make`` command on Linux or ``gmake`` on FreeBSD. > + > +For instance, to compile the ``helloworld`` application: > + > +:: > + > + cd examples/helloworld > + make # On Linux > + gmake # On FreeBSD > + There is an assumption here (maybe all through this doc) that DPDK is installed system-wide. If not, maybe we tell the user they can compile the examples as part of a DPDK build itself using meson option "-Dexamples=...". > +To run the application, use: > + > +:: > + > + ./build/helloworld -l 0-2 > + > +The ``-l`` option indicates the cores on which the application should run. > + > +Sample Applications Overview > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +1. **Hello World**: A basic application that prints a "hello world" message. > +2. **Basic Forwarding**: A skeleton example of a forwarding application. > +3. **Command Line**: Demonstrates the command line interface in DPDK. > +4. **Ethtool**: Showcases the Ethtool API in DPDK. > + I'd drop this list. The reference below for the sample app guide is best. > +For a comprehensive list of sample applications and their guides, > +refer to the `DPDK Sample Applications User Guides `_. > + > +EAL Parameters > +^^^^^^^^^^^^^^ > + > +Every DPDK application is linked with the DPDK target environment’s > +Environmental Abstraction Layer (EAL) library, which provides generic options. > +Some of these options include: > + > +- ``-c COREMASK`` or ``-l CORELIST``: Specifies the cores to run on. Unrelated to your work, there has been some discussion on the DPDK mailing list around moving away from coremasks in DPDK, since they are unwieldy to use. Therefore, for simplicity, just document the -l option, and give a couple of examples e.g. '-l 1-3' to run on 3 cores, 1, 2 and 3 '-l 8,16' to run on 2 cores, 8 and 16 '-l 1-7,9-15' to run on 14 cores, using 1 through 7 and then 9 through 15 > +- ``-n NUM``: Number of memory channels per processor socket. > +- ``--socket-mem``: Memory allocation from hugepages on specific sockets. > + I would drop these last two options, they are very much for advanced users. So in the opening paragraph, instead of saying "some of these options include", we can just talk about the "most important option" or similar to that. Again, we have a refence link to get more info. > +For a detailed list of EAL options, > +refer to the `EAL parameters section `. > + > +Running Without Root Privileges > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +Refer to :ref:`running_dpdk_apps_without_root`. > + > +Running Applications on Windows > +------------------------------- > + > +Running DPDK applications on Windows involves a few different steps. > +This guide provides detailed instructions on how to run the helloworld example > +application, which can be used as a reference for running other DPDK applications. > + > +Grant Lock Pages in Memory Privilege > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +Use of hugepages ("large pages" in Windows terminology) requires > +``SeLockMemoryPrivilege`` for the user running an application. > +This privilege allows the DPDK application to keep data in physical memory, > +preventing the system from paging the data to virtual memory. > +This can significantly improve the performance of your DPDK applications. > + > +To grant this privilege: > + > +1. Open Local Security Policy snap-in, either through Control Panel / Computer Management / Local Security Policy, or by pressing Win+R, typing ``secpol``, and pressing Enter. > +2. Open Local Policies / User Rights Assignment / Lock pages in memory. > +3. Add desired users or groups to the list of grantees. > + > +The privilege is applied upon the next logon. If the privilege has been granted to the > +current user, a logoff is required before it is available. > +More details can be found in the `Large-Page Support in MSDN `_. > + > +Running the helloworld Example > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +After setting up the drivers, you can run the helloworld example to verify your setup. > +Here are the steps: > + > +1. Navigate to the examples in the build directory:: > + > + cd C:\\Users\\me\\dpdk\\build\\examples > + > +2. Run the helloworld application:: > + > + dpdk-helloworld.exe -l 0-3 > + > +The output should display a hello message from each core, like this: > + > +:: > + > + hello from core 1 > + hello from core 3 > + hello from core 0 > + hello from core 2 > -- > 2.41.0.windows.1 >