From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id A5C2542D98;
	Fri, 30 Jun 2023 18:23:29 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 392B041104;
	Fri, 30 Jun 2023 18:23:29 +0200 (CEST)
Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com
 [209.85.210.175])
 by mails.dpdk.org (Postfix) with ESMTP id 7792040EDB
 for <dev@dpdk.org>; Fri, 30 Jun 2023 18:23:27 +0200 (CEST)
Received: by mail-pf1-f175.google.com with SMTP id
 d2e1a72fcca58-668711086f4so1328979b3a.1
 for <dev@dpdk.org>; Fri, 30 Jun 2023 09:23:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688142206;
 x=1690734206; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=M2NGgCQHmZJYH7IsB8GOhHeCkZLopX4Hik3Ei6B72BM=;
 b=Uy9gJu+p9lfd6pJXPRtpx7tYTVcfJs1vnpGQVl9De3cLqmocPYtk0+h179H0A+z9r6
 Gm/sVJppwdDHiW0r9Mkqk19CSnSv7g3srHlZ0MAK2B9dd0tVs8l5RRV3hZ/NKVDY1e9h
 Pf77Hq5XXdQAM+tgWlhiq1w0RaZscEFcg6A83vV0aCE3IKt7KslCbE20r8mm/kmMt4/E
 iWb1vkauDUBhikPoJ5FbTNB3zTIzLH+mC0vpJ4oao4/QdLvvEmsjzo9zNnR36oPt/W2O
 gNIELck6Xjdlp8cSBuqmyrPh7OLXCm/NzCPrxm9GSb0dCWTwsGBsIK9OuHlqRtn/Y+A/
 MHjg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1688142206; x=1690734206;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=M2NGgCQHmZJYH7IsB8GOhHeCkZLopX4Hik3Ei6B72BM=;
 b=GonV0lWqmBKn/X+oHRI9+AX5fOPWOFKH0Fit2qv0OSN2i+JqytlfSC7NbGyUfEUyIL
 DN++u7W4o4BkmOaAr+FWMHPz1p0MCoOQkgo67Ur4licyl3p/20cT3vfi461oMjrWysIt
 zkrPDhHCyqAdURpQxirN73ffcZNQDofex8cYmsuTDdRZfbK6/S5XMXauQ0ymakG/rHwl
 JX/KsjE08f9UY1uGD+6APKWuYr1bXbeDUbS6B3y4KmfJNv6DgaEI6nj1cG0VOPg4DqvM
 wirrQd+rTVMQABGGQP7SJWr45o2XRvUETUtDNzrkJZO6ikHhR55BI8fIDX+reW3khMUC
 /0NQ==
X-Gm-Message-State: ABy/qLYcYN8dGxQvxkhoVmpbHfpbHBSI+EwOHX+PHa75vtrVJmUJ2Bhp
 q1Plxq2SymHfGlEdRAaKlh+ddA==
X-Google-Smtp-Source: APBJJlGeXdAJDf25xmkXF+jrvG9qJholj1hGnJrDd9hbb+3aRWsLWSSzYZNxsV4mGLxVUEHlSxZTQw==
X-Received: by 2002:a05:6a00:1409:b0:667:d0ff:6a0f with SMTP id
 l9-20020a056a00140900b00667d0ff6a0fmr4762570pfu.5.1688142206476; 
 Fri, 30 Jun 2023 09:23:26 -0700 (PDT)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 v26-20020aa7809a000000b0062cf75a9e6bsm10231006pff.131.2023.06.30.09.23.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 30 Jun 2023 09:23:26 -0700 (PDT)
Date: Fri, 30 Jun 2023 09:23:24 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH v2 01/11] eal: explain argv behaviour during
 init
Message-ID: <20230630092324.50a8a6e0@hermes.local>
In-Reply-To: <20210310132825.2627851-2-thomas@monjalon.net>
References: <20210309233116.1934666-1-thomas@monjalon.net>
 <20210310132825.2627851-1-thomas@monjalon.net>
 <20210310132825.2627851-2-thomas@monjalon.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Wed, 10 Mar 2021 14:28:15 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 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 <thomas@monjalon.net>

I would rather that rte_eal_init() treat the argv arguments
as immutable (ie const). Modifying input arguments is confusing
and can cause some issues.

Other functions (getopt, getopt_long, execv) in glibc use:
	char *const argv[];

It would be good if EAL was the same.