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 3A39CA0547; Fri, 12 Mar 2021 19:17:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 092EE1608D8; Fri, 12 Mar 2021 19:17:31 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 136CF1608D7 for ; Fri, 12 Mar 2021 19:17:30 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B69C05C019D; Fri, 12 Mar 2021 13:17:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 12 Mar 2021 13:17:29 -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=lN+ulp9KFrkt8wdwriEP8OTUJBceH lhrAxlP2b0GC8p6bzKo105N3n+ZhwgIgl2lYNVdbUxqIlyGCJKtBl27x46dV+EQv R9nR240qPWvIh8IsrxmthbvqLkRmxJkFUDGgAaix0Q5Gq4mYi0cHLdy+I1zT3NY4 zjkczuTl6qj7FQWqKfp3g+nOhS8P/9oanKBBLqSJPHpmpndycdrJPmlXV0yxVJn9 GacnQR/ULEfXONDr5CFK99315ZUFpsy/tLvzqWCgKtPSsOpiBiSU2+MY1q7/P9W4 vE++6J++Ezu306q+WMSeQa7M8Eg7xt2fIDzSLQT+nplsQvcgR10dBguFw== 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=UAvk216i nJj9soiFpMjAbkc1lRkoO9+b+1lBk0cdWtWmZiEBy8lKdRXnYBCkT1/1CESOisvD LhdF4yH+a0I3vJLsLOSRVbUN5xPVEBSCWHeKpT1H8TwKTGt+qeaqQ+sFE7MBYSVI e7yLtAalPhpxCUftzOSybNExM4QN3sLR07hmCddbSwYx6VNpB+UUfsvrDb3Fh6cR FD5nR1qybIzlxh3IyReOv28pnax/23nCA5aCZ4URBET3EHYjb2qUPmbsJ79klcQl J+9rOoRMuEuAD7S9SSDEH0TWtRPXdjNq3ggBMABhy1ZDSB1T+VjX0+tRcdzJqdVK Yw6unZjz/FSaxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvvddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepvdehgfeivdejgedtve ehfefhteelfefgieevgfffveefjeegtdfguedthedtgeevnecukfhppeejjedrudefgedr vddtfedrudekgeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfh 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 11C2824005D; Fri, 12 Mar 2021 13:17:28 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, mb@smartsharesystems.com Date: Fri, 12 Mar 2021 19:17:10 +0100 Message-Id: <20210312181720.242252-2-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210312181720.242252-1-thomas@monjalon.net> References: <20210309233116.1934666-1-thomas@monjalon.net> <20210312181720.242252-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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