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 D0E0F43CA1; Wed, 13 Mar 2024 18:20:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B3DE40A84; Wed, 13 Mar 2024 18:20:43 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4867A406BC for ; Wed, 13 Mar 2024 18:20:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710350440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=afD4FETKR7YKuXcFrr47+f6S/g3sw6t4mxLZygd8vKM=; b=aK69ej9aM1ovG2vK+UF4na4JC0LXsq+Q2Gnj2rvI78YUcIgswOLZJnnaxIu3c0QKWzXdzK TZJ4R86W3buqx5ejOROy9pWW6nAdehLKkiLi8vybZb3RVDFMhz/mt2LhnRP/rIvfnO6kIK ZlpWzXP+/i9wflkG9KzUivHfduEj+sI= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-JSiqy90qMU-72Lq2E4mHFg-1; Wed, 13 Mar 2024 13:20:31 -0400 X-MC-Unique: JSiqy90qMU-72Lq2E4mHFg-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-513149e133cso68034e87.1 for ; Wed, 13 Mar 2024 10:20:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710350429; x=1710955229; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=afD4FETKR7YKuXcFrr47+f6S/g3sw6t4mxLZygd8vKM=; b=JdkpSM/32WH1i7VokPloCvjqi37uXPANEtEFz7tQjhOJO/WS3kvXpX3RappVQO1Xub ADjxDq30R2urTNkScGAq4iw0p5p/1UkzCgJS/GA2difKNVTv/C9AijA4DfLN8mk/6wjQ MxUZOIOeq+cwXnmVAkVMNs3WHkiL67Fdi1nlin22cgh90D5jWx9qnRq2Ay3zFSP2GQX8 A+Qw0CrIn+2WHsXHfUgcU0oPAt2OQmEKTvCc9xqjEqLbHbunip+Eu6mlY+dgptcSMQSz +c/xAEAnnC6MsUSzs8RW9zLnobjByfh2rGAGuDw6iKX5PHpKpWRRfOxk7spKnhYBr94h CMYA== X-Gm-Message-State: AOJu0YwqjTRLI5Tg2kwoU3l96cYVJ0af3qRCitHgA3yO7zmxcLK1x9fx f/WcJG8B0apY7dZvhXbUmny4pOoDvmKGM6zWNLzTTFyVg8ow5uG1f2ubVcVr4EStdsY0ADXZWUq qM1ehETtRK3kjnPskxTrjbpyuuWPBXON2RdO+hxL/4QhAjnOPIETh5NO4vU30h77mkKRzEq4v8C wuHaYH7lGtEvlupb4= X-Received: by 2002:a05:6512:234b:b0:513:a0a3:c543 with SMTP id p11-20020a056512234b00b00513a0a3c543mr12274983lfu.54.1710350429444; Wed, 13 Mar 2024 10:20:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7tUc/r3LAWYHagMn4nT8YDqXRSwZTONxGEbRfmUxDGYgzV9ZTvx+Aruakle+Ys2GrgbiUgiWM5fjnqWg6E9U= X-Received: by 2002:a05:6512:234b:b0:513:a0a3:c543 with SMTP id p11-20020a056512234b00b00513a0a3c543mr12274969lfu.54.1710350429126; Wed, 13 Mar 2024 10:20:29 -0700 (PDT) MIME-Version: 1.0 References: <20240308144841.3615262-1-david.marchand@redhat.com> <20240308144841.3615262-5-david.marchand@redhat.com> <25bb9521-97fb-4466-8aca-237060d738ca@amd.com> In-Reply-To: From: David Marchand Date: Wed, 13 Mar 2024 18:20:17 +0100 Message-ID: Subject: Re: [PATCH 4/4] app/testpmd: enhance getopt_long usage To: Ferruh Yigit Cc: dev@dpdk.org, Aman Singh , Yuying Zhang X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Mar 13, 2024 at 5:51=E2=80=AFPM David Marchand wrote: > > > > > + { TESTPMD_OPT_ETH_PEERS_CONFIGFILE, 1, NULL, TESTPMD_OPT_ETH_PE= ERS_CONFIGFILE_NUM }, > > > + { TESTPMD_OPT_ETH_PEER, 1, NULL, TESTPMD_OPT_ETH_PEER_NUM }, > > > > > > > These long options are within "#ifdef RTE_LIB_CMDLINE" block, I don't > > know why, I guess above two can work without cmdline library. > > Looking again at the options list, we have a nice mess in there... I > had not realised. > > I think the only options that are conditional to RTE_LIB_CMDLINE should b= e: > -i, -a, --cmdline-file. > > As I wrote above, leaving the -a/--auto-start option parsing out of > RTE_LIB_CMDLINE is not an issue. > So it would only leave -i/--interactive and --cmdline-file under > RTE_LIB_CMDLINE. > The rest can be moved out of RTE_LIB_CMDLINE. > > And reading your next comment about RTE_LIB_CMDLINE, I think we are in sy= nc. Actually, the solution is even simpler... it is not possible to disable the cmdline library. testpmd won't compile without it (missing #ifdef RTE_LIB_CMDLINE in different places). I'll drop all the #ifdef RTE_LIB_CMDLINE checks in a dedicated patch. --=20 David Marchand