From patchwork Tue Mar 9 23:31:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 88761 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5327CA0567; Wed, 10 Mar 2021 00:31:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11D2A22A552; Wed, 10 Mar 2021 00:31:40 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 240D122A552 for ; Wed, 10 Mar 2021 00:31:39 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C569E5C0094; Tue, 9 Mar 2021 18:31:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 09 Mar 2021 18:31:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=23HiqCcRXJCWg GdrKNmzaCXKux7hlgxbKNyRbBYXxgg=; b=qFSzLJSVaKSNz3U5q2BmyY1/m37Bk 9vxMfa2c1Tu2vAmrThPYKmHYyuJmborUj15MEeO0S264UtXYJ0lejoi/FX/nk9YC 97ROtNb1vBtQ2ickk+C6kfGxDVCEEm0vQCK5Bpl7Tdq25GFjSWXO8Sf0YLa0Yqgp xq0AO9WdoktBYEb8ZyMULZn/t/kwSB7sdsQVmx0LVetcOn0WCsEFaoiyQvZfRtq5 RRDcN4s6L33/WwktIjwIoZ8CWUONc99qkafgeQxNvzMcRS/ZW+0pW1Bph3HsOpZd K12gjGj72bKXO+ySeB1j7lsgRI3b3V45x7lYrDz3J91ILlk4WwPwNetgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=23HiqCcRXJCWgGdrKNmzaCXKux7hlgxbKNyRbBYXxgg=; b=uadVrxmy VHvzEXJ3LEVvhLO33+MKQZm9Z8cpc0dz/AEwGd7KLpd7IdxG5GW8yu+0i2dcByxy ssoIFbn0pT64v1HQZ0w2Mro84Id/iuTbMrZOiel9zAuKQKd1wzusRNVFkLurJWxY IqwOijTZpEE5KGOczQNfDQaXuD6mhFqFMHM9KFU97eKkKqNq9z2ncgqlPtsTb4Wv VZWWrQ1H8uquOZKxFQ1ggD0QjvxNbLFfqwU943ySHVj9qIvY/IAh8VnkjzOgJV51 tw1q7wq1o6hmajr1rrMuTXW/drj7x/f9bnKnBDQ974CSMI0j0/82fcOkIXXc2Qb7 OA/7LyJ/4ZrdIw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudduiedgudejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepvdehgfeivdejgedtve ehfefhteelfefgieevgfffveefjeegtdfguedthedtgeevnecukfhppeejjedrudefgedr vddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4D5F324005A; Tue, 9 Mar 2021 18:31:38 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com Date: Wed, 10 Mar 2021 00:31:05 +0100 Message-Id: <20210309233116.1934666-2-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309233116.1934666-1-thomas@monjalon.net> References: <20210309233116.1934666-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 01/11] eal: explain argv behaviour during init 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 Sender: "dev" After argument parsing done by rte_eal_init(), the remaining arguments are to be parsed by the application by progressing in the argv array. In this context, the first string represented by argv[0] is still the same program name as the original argv[0], while the next strings are the application arguments. This is because rte_eal_init() manipulates the argv array after EAL parsing, before returning to the application. This note was missing in the doxygen comment of the API. Signed-off-by: Thomas Monjalon --- lib/librte_eal/include/rte_eal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h index eaf6469e50..0cbeedb594 100644 --- a/lib/librte_eal/include/rte_eal.h +++ b/lib/librte_eal/include/rte_eal.h @@ -76,6 +76,8 @@ int rte_eal_iopl_init(void); * @param argv * An array of strings. The contents of the array, as well as the strings * which are pointed to by the array, may be modified by this function. + * The program name pointer argv[0] is copied into the last parsed argv + * so that argv[0] is still the same after deducing the parsed arguments. * @return * - On success, the number of parsed arguments, which is greater or * equal to zero. After the call to rte_eal_init(),