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 68125A0A02; Mon, 5 Apr 2021 21:40:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30CB0140E8F; Mon, 5 Apr 2021 21:40:04 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 715D5140E7F for ; Mon, 5 Apr 2021 21:40:02 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 1EA6B1AB4; Mon, 5 Apr 2021 15:40:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 05 Apr 2021 15:40:01 -0400 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=8M86ZRqJouHsP qA+DZhONvETjCjzzEHdwzFkSHfiFpY=; b=FrM1+JgZhAv0jFlZQMh8/+o+IIB0t O8nB0slwG4K2JZNjwq7+jQT5Zuda1wycLImLfugnKKQNXuRLpymIhjScl3L9GVS9 MYknNXE54LTFz2uM2Xyj1P5O+b7i5tV5XSmQ2tS06J3IejnLK6FXfmP7/P+1s4Q3 GKgdxSqe7fDbHZ1eFlNROL/54E7fAy2whCrKGt81Xpdp1uNOJjAzJJmw1NPbteP5 aCGtVtAZBVJdIh4VTxNfiBmcV5cBEUHAMtaKro/hBVEJRcJMex/3Gxe/XFFQq1b0 lCYZAyFqcX+0jPnvCQWPZFHrAXx25g3muo61bbycIIOFeY8um2GL7ZNqQ== 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=8M86ZRqJouHsPqA+DZhONvETjCjzzEHdwzFkSHfiFpY=; b=kgpJ12lj vFOZZ1O7l6yhY7xCSWHWVAa51LuCBdk8bVTtFbG43KeR4z7penPwLTlRNN7U0m17 0RJpP+wENGZ2dGR2k0SnlhBNhp9YX+4v8vYSKC6xgNjbuTvOq45qdT4CHrlhzUrm Q0wwetUYEgmIT8AnvRSTBxG7/7UrNxsp2Xq27MYrdKJ/gAyqAfaeKWnnf5wY0T2/ XvBNE2Gqrga6RPyNJWos2Iv/4DbUTf/76hIF+41gvrPjcItsTvpSeJZ+nPhxDeHY DsoFzPEc1jaUFYggPdt1E3EzxdY4Q7Onx8MssqO4uHUHlBdtkbOQPiun6CQYXNpK fyv9yL0geRafdw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejvddgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedt gfeutdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth 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 1AB7124005C; Mon, 5 Apr 2021 15:39:59 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson , Andrew Rybchenko Date: Mon, 5 Apr 2021 21:39:51 +0200 Message-Id: <20210405193954.1115838-2-thomas@monjalon.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210405193954.1115838-1-thomas@monjalon.net> References: <20210309233116.1934666-1-thomas@monjalon.net> <20210405193954.1115838-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 1/4] 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 Acked-by: Bruce Richardson Acked-by: Andrew Rybchenko --- 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.31.1