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 53B4343CB2; Thu, 14 Mar 2024 10:17:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0F7542E89; Thu, 14 Mar 2024 10:17:40 +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 4F6EE42E7B for ; Thu, 14 Mar 2024 10:17:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710407855; 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=nz5/ICh3Od5It+bfsDClPohIfdKdMDyMCYj1DfOpJvk=; b=I9NoCfGZaBwji8rciiizhd4NEtT6rYeIprQL0VdMgqvjlXBp20owC+bIqYlADgU5KL+Hms dfScBEsPMHKJaTWJmguoqHG3MsjHmqkCSPrX3WyQdRQoOFSLNT1OktKGUY+TCO56pNzSAc Fn/jJbukfuLl6bGEJkI13MvJls+fgbA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-599-TQ_7SpimNlelcC0V7X4giw-1; Thu, 14 Mar 2024 05:17:30 -0400 X-MC-Unique: TQ_7SpimNlelcC0V7X4giw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E8EE1C07583; Thu, 14 Mar 2024 09:17:30 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 681C33C21; Thu, 14 Mar 2024 09:17:29 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Aman Singh , Yuying Zhang Subject: [PATCH v2 5/6] app/testpmd: remove dead code for disabling cmdline library Date: Thu, 14 Mar 2024 10:17:06 +0100 Message-ID: <20240314091708.1542769-6-david.marchand@redhat.com> In-Reply-To: <20240314091708.1542769-1-david.marchand@redhat.com> References: <20240308144841.3615262-1-david.marchand@redhat.com> <20240314091708.1542769-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 The cmdline library is always enabled with meson. Remove traces of a time when it may have been possible to disable it. Signed-off-by: David Marchand --- app/test-pmd/parameters.c | 19 +------------------ app/test-pmd/testpmd.c | 5 +---- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index fc5cf3a195..a69639b6fb 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -45,10 +45,8 @@ usage(char* progname) { printf("\nUsage: %s [EAL options] -- [testpmd options]\n\n", progname); -#ifdef RTE_LIB_CMDLINE printf(" --interactive: run in interactive mode.\n"); printf(" --cmdline-file: execute cli commands before startup.\n"); -#endif printf(" --auto-start: start forwarding on init " "[always when non-interactive].\n"); printf(" --help: display this message and quit.\n"); @@ -95,12 +93,10 @@ usage(char* progname) printf(" --max-pkt-len=N: set the maximum size of packet to N bytes.\n"); printf(" --max-lro-pkt-size=N: set the maximum LRO aggregated packet " "size to N bytes.\n"); -#ifdef RTE_LIB_CMDLINE printf(" --eth-peers-configfile=name: config file with ethernet addresses " "of peer ports.\n"); printf(" --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer " "port (0 <= X < %d).\n", RTE_MAX_ETHPORTS); -#endif printf(" --disable-crc-strip: disable CRC stripping by hardware.\n"); printf(" --enable-scatter: enable scattered Rx.\n"); printf(" --enable-lro: enable large receive offload.\n"); @@ -210,7 +206,6 @@ usage(char* progname) " 0x01 - hairpin ports loop, 0x00 - hairpin port self\n"); } -#ifdef RTE_LIB_CMDLINE static int init_peer_eth_addrs(const char *config_filename) { @@ -240,7 +235,6 @@ init_peer_eth_addrs(const char *config_filename) nb_peer_eth_addrs = (portid_t) i; return 0; } -#endif /* * Parse the coremask given as argument (hexadecimal string) and set @@ -610,13 +604,11 @@ launch_args_parse(int argc, char** argv) static struct option lgopts[] = { { "help", 0, 0, 0 }, -#ifdef RTE_LIB_CMDLINE { "interactive", 0, 0, 0 }, { "cmdline-file", 1, 0, 0 }, { "auto-start", 0, 0, 0 }, { "eth-peers-configfile", 1, 0, 0 }, { "eth-peer", 1, 0, 0 }, -#endif { "tx-first", 0, 0, 0 }, { "stats-period", 1, 0, 0 }, { "display-xstats", 1, 0, 0 }, @@ -725,20 +717,13 @@ launch_args_parse(int argc, char** argv) argvopt = argv; -#ifdef RTE_LIB_CMDLINE -#define SHORTOPTS "i" -#else -#define SHORTOPTS "" -#endif - while ((opt = getopt_long(argc, argvopt, SHORTOPTS "ah", + while ((opt = getopt_long(argc, argvopt, "iah", lgopts, &opt_idx)) != EOF) { switch (opt) { -#ifdef RTE_LIB_CMDLINE case 'i': printf("Interactive-mode selected\n"); interactive = 1; break; -#endif case 'a': printf("Auto-start selected\n"); auto_start = 1; @@ -749,7 +734,6 @@ launch_args_parse(int argc, char** argv) usage(argv[0]); exit(EXIT_SUCCESS); } -#ifdef RTE_LIB_CMDLINE if (!strcmp(lgopts[opt_idx].name, "interactive")) { printf("Interactive-mode selected\n"); interactive = 1; @@ -817,7 +801,6 @@ launch_args_parse(int argc, char** argv) port_end); nb_peer_eth_addrs++; } -#endif if (!strcmp(lgopts[opt_idx].name, "tx-ip")) { struct in_addr in; char *end; diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 81d905d759..70ea257fda 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -4700,7 +4700,6 @@ main(int argc, char** argv) if (record_core_cycles) rte_lcore_register_usage_cb(lcore_usage_callback); -#ifdef RTE_LIB_CMDLINE if (init_cmdline() != 0) rte_exit(EXIT_FAILURE, "Could not initialise cmdline context.\n"); @@ -4714,9 +4713,7 @@ main(int argc, char** argv) start_packet_forwarding(0); } prompt(); - } else -#endif - { + } else { printf("No commandline core given, start packet forwarding\n"); start_packet_forwarding(tx_first); if (stats_period != 0) { -- 2.44.0