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 5D1D6A0567; Wed, 10 Mar 2021 14:28:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA0B222A5C4; Wed, 10 Mar 2021 14:28:35 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 01BAD22A5BC for ; Wed, 10 Mar 2021 14:28:34 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0CE861994; Wed, 10 Mar 2021 08:28:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 10 Mar 2021 08:28:34 -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=j6wjraCjtbUT7T7v5jCqAWMq1EmVH OgJD0zBbPEV3Mgs/k0d9urBEiKDYdPJlciQNcaQ2sITxWmNXlo8lqygcWdg54paO 0YbQqeepukZIOd9Zltmm5cdnYGRUre0u28/G3k97LJ4gw5oQ5mFV4p4FOMmcrLAH 7A3RowHih13o8c0galZ8P80GpspWSV/otmePTWuVxjac8xTPtU2xyOL8VfzRxpP0 RaGPERICQ+MycidNRsZdvAtnlwD97w3PKXpTccJBW5k8uhXntxxMmBz/R4BcLhCi pHgmVJyK2onM1s/oCTfJ6dTWTztrJUUCshmSKEbkeRN3rGUNvk1hWMGZw== 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=rBIKGGmy GfkJCnZokPKOfOuDMAlsvNUXspD6bPqRcCCgE/GzxYjogVxlcA+rw2DgwsdqXQ7w lpL6elva7wwWlPQvRvDZpnOJykeZhylRTWOst+sS9DOrqQbrWhZtI7gRI0L4lksJ dAuBBUwD2aS5L5yF5JwJrIVQ1aCSKcA+ArsFf0jdWRRQ/4I3ucKEXASry6k6IeQg xitlLhFILw3ptJj/Ozvg2RixH+yMKH5kS3M8/50I6ptj1VRd5oa7721rBBt7a9Oy svF8bqmXbdMkKsDzadNKyU6Rsk0t7PBTlXugzKTKo4zp8PfhwSJ+s581pujACgHl WMjOBRdbVNh1PQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddukedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 31B22240069; Wed, 10 Mar 2021 08:28:33 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com Date: Wed, 10 Mar 2021 14:28:15 +0100 Message-Id: <20210310132825.2627851-2-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210310132825.2627851-1-thomas@monjalon.net> References: <20210309233116.1934666-1-thomas@monjalon.net> <20210310132825.2627851-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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(), -- 2.30.1