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 8FF6645843; Fri, 23 Aug 2024 11:12:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BA6A402E6; Fri, 23 Aug 2024 11:12:54 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id A39A6402CA for ; Fri, 23 Aug 2024 11:12:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724404373; x=1755940373; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=1vmDKfXaz9C9XrVtG+k0NNvYbcaHZdmzSw/h6P65TVw=; b=bhpueuImK+TueQIS+kyQA6Inz0buCuUqkyNElJKGxWT3AbgwAKQgMT7H j6WiH1dmHMn2wIymJzDZlSHDCoDPxwDacQCbN13fuKMhWvhIBI2PKc0HN ZycmyqdfDPDxlzx+a6egO8VC544MFabWHsvtLUHkF5xKxTdKOVE2BLzIV AFz6GGuJAOm5FJfZVd1RD1abbsmYdCkdurFRn+Ot/G+TtiIpRjESA1mpR cxp5RHqoS2uvD5VYrqPx79nnEabWaPrv9+CcW6Q0tVopTUuwVFHA6hLMU wgU+G6tTV3KhdOU91C0+IQvgaRWfAH5X9Q18xEHRvtJMUyTwtqNnWyL8x w==; X-CSE-ConnectionGUID: rVPgaA4KQMmJWeKZr0NqTg== X-CSE-MsgGUID: QyODcAe3Qvu3oqsa/QsJSw== X-IronPort-AV: E=McAfee;i="6700,10204,11172"; a="40378242" X-IronPort-AV: E=Sophos;i="6.10,169,1719903600"; d="scan'208";a="40378242" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2024 02:12:51 -0700 X-CSE-ConnectionGUID: 983BHZ+1Sx2etrvCueYqhg== X-CSE-MsgGUID: 1P6lhcmKRhKykNeVpRrOaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,169,1719903600"; d="scan'208";a="62043115" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 Aug 2024 02:12:51 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 23 Aug 2024 02:12:50 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 23 Aug 2024 02:12:50 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 23 Aug 2024 02:12:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jzqtCUOwVPZHv0acSOwB4rwm8YLmU4StUnzq+g0K7O7zFJaQN7fKnwa+24PFbP8yeXXymE8jpxEuTyYhdSjVQb+0UyMFCwKWkABQcLPpEt0gTTuFvPVLgrq2kbpc1ykUT1WVQcaHi0n2/iTdL3dzK7/B5S8tE8WXDK0kmUm1QEQeres02iZdqVUZt0RnyLdRfrf+P1qsJzgQJgppFSWKNqycgt0WfswZLG4daAisdSR5NjvAvU9bz8r0tEydddX9XMkdLy5IGAwObE/DSXJVucEXF1zakRv9VPW211sbEpOs5MgbO4KG+I7hXZLH3S97PhSMvpGPGgYC2453CYVzTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PGg0yMNPUqMk58cpYC7GeC8N7qQzOWZSzcO0DqVIb8w=; b=h4oBhA6/tv5OPEPE+sxmWDEWrA5E+4LU+RsG67uZKjVx7klaic6UhbMkyzM8MhQG9ocvbScY3kwrd+DHvde0kOVt6RBHSp6WQDxo6Q4cQLCu5+H/x07q3vNubp9+qnPgwLE3UGoNeHKYxS+3/qVT7Q47Bv/5nNJLYDbPo/ltgKFyXPkVb+nY+RoFzTPfWDqXsXMb7hcHNNmoDOv8ATEYo76I5j29pbHfGAi6mTdfN5W/uaIQxSb8UcZScq6nYZtyzFjEjYVXRO1u5NFHE4N5md3RABVFogwUCKn/ZDexIZPSNNpHaYRXmOTnBshzC0QUJeDnOPt4fn7so8aEYe3CGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SA1PR11MB7014.namprd11.prod.outlook.com (2603:10b6:806:2b9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Fri, 23 Aug 2024 09:12:47 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7897.014; Fri, 23 Aug 2024 09:12:47 +0000 Date: Fri, 23 Aug 2024 10:12:43 +0100 From: Bruce Richardson To: Ferruh Yigit CC: Subject: Re: [PATCH v2] app/testpmd: show output of commands read from file Message-ID: References: <20240822103604.113246-1-bruce.richardson@intel.com> <20240822104109.116208-2-bruce.richardson@intel.com> <1bdb73bf-e66b-4bfb-b5ee-2ebb0f5bca2a@amd.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1bdb73bf-e66b-4bfb-b5ee-2ebb0f5bca2a@amd.com> X-ClientProxiedBy: DB7PR05CA0006.eurprd05.prod.outlook.com (2603:10a6:10:36::19) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA1PR11MB7014:EE_ X-MS-Office365-Filtering-Correlation-Id: c0d55a58-821d-4c48-fd8f-08dcc353c171 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Vhp0UcSGYFpMONP1aed6qUWRTY88nLdWBir1YrQhuwbq9SP1CW9nznmrmgiP?= =?us-ascii?Q?ST7cz174cKRWxQPhfsLbF91Ft4Sq6myG2rBUOz0EWPHgeqE0+FPnHI2JdiAt?= =?us-ascii?Q?7o2vxhR+veiY1Iqs22jAmyPm/F+k355F2s2weIAl1/ZOyTN5AS6gNd1zGsTB?= =?us-ascii?Q?WJTef1B6+4WnDHNSsk+vumT47Jta+0z7N5NaEhzVIWurMvTOlXCnyQWoFYPM?= =?us-ascii?Q?/CthkpTpuZHvLiOJ/4SSeMw1U/gFMwQw3X1qzYVYEtxSlxsHX507vg9xxrWT?= =?us-ascii?Q?Zy/3kziggwRyTlq61paNUBa4IUg0XAcR8iYNv52g/xemq/0vg7HIjAW+3Bqj?= =?us-ascii?Q?golsmss3xgur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P?= =?us-ascii?Q?YMGdXqfJ1oikiS3ho/8iQyYoAZofplRq7Ir8/vBM75tVyuqIi1EXKg4TjLGy?= =?us-ascii?Q?syflJKuAGCPSodMi9X2FR1XAmzUYq135Gy397Vu/3W2TwA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cwoi+fT/XOSytagf36OYe6pVwQpZZJSvlzwcqEAXtK5eeo8k7WHSPH/IBzT2?= =?us-ascii?Q?nxHQMb00k518XVXhURSlj7VQEmO3koIJ7YN3zdeeG7OJFzSdo9iYYT4qLnKP?= =?us-ascii?Q?MxsTtozO6I0jBkgNMgfZd5IVGmAQDsow9APEvm5Jx1U/y++Rkz9kV3QeyYoe?= =?us-ascii?Q?Ikt//NpXQZQGIbWy1pE6vEcJV26bo+VHuv/4BUhL5JCWv2lH79K/ET5ps0JV?= =?us-ascii?Q?bVQ3wMsfr1xYjJMpGEXW/i5lJjXlZBA5rQr16LJFl2rvTk/7Z5Zb7CrAQdfm?= =?us-ascii?Q?1yyGwgNgSlhCHBo8b39oTMcZX9JQqNN4CIs8sQFE8sypO2sSBcsgnj5JxcmF?= =?us-ascii?Q?gaPgtPdIIEnXZz8VGb14L9rj3hAw8cYqrxcnGILtCkmv7PRODL8w0L2AYdNL?= =?us-ascii?Q?+njk4IWePl7MpReNKqE0fxWBWE37XrJYbiA1DV8WpEAMPz2Wg18NyrYnevxS?= =?us-ascii?Q?cjxco1H089eMpgYWIGDWHbReFxrjjsYkANrN4AeS0932h6YrQv7wl4FwcQGD?= =?us-ascii?Q?KfZvv4F6wzeMFj4tNQNASFb8dd7wAAB2AW3jdHtZ7Go+Bw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Ts/G7skPr5wPzxgUBeOdrJQlYEfJEU755UgqQ3ic6yCRbFK?= =?us-ascii?Q?dU6HjhnxyvMVjA4zxk1n4dAHGYG+qReatvexKtTLp2rkL7vcJEUKiMms1JxE?= =?us-ascii?Q?8jD5nkDyaOiPmM9rnosK4WNAfmbkoL9RvPZ7esExVp5OtABm3eMg2osUFarc?= =?us-ascii?Q?jA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c0d55a58-821d-4c48-fd8f-08dcc353c171 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 09:12:47.6920 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RMChWjjlU80dwmBTUIdHT0daUypS6Xh71ennJ4cUr/mD8Mm1yIej0mTjrMjPtTFd+Tz2p3B28PnmJirUjYMCvGzQTDMric8eVKwNq91K+Wc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB7014 X-OriginatorOrg: intel.com 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 Thu, Aug 22, 2024 at 10:09:09PM +0100, Ferruh Yigit wrote: > On 8/22/2024 6:18 PM, Bruce Richardson wrote: > > On Thu, Aug 22, 2024 at 06:14:55PM +0100, Bruce Richardson wrote: > >> On Thu, Aug 22, 2024 at 05:53:27PM +0100, Ferruh Yigit wrote: > >>> On 8/22/2024 11:41 AM, Bruce Richardson wrote: > >>>> Testpmd supports the "--cmdline-file" parameter to read a set of initial > >>>> commands from a file. However, the only indication that this has been > >>>> done successfully on startup is a single-line message, no output from > >>>> the commands is seen. > >>>> > >>> > >>> For user I think it makes sense to see the command [1], only concern is > >>> if someone parsing testpmd output may be impacted on this, although I > >>> expect it should be trivial to update the relevant parsing. > >>> > >>> [1] > >>> Btw, I can still see the command output, I assume because command does > >>> the printf itself, for example for 'show port summary 0' command: > >>> - before patch: > >>> ... > >>> Number of available ports: 2 > >>> Port MAC Address Name Driver Status Link > >>> 0 xx:xx:xx:xx:xx:xx xxxx:xx:xx.x aaaaaaaa up xxx Gbps > >>> ... > >>> > >>> - after patch > >>> ... > >>> testpmd> show port summary 0 > >>> Number of available ports: 2 > >>> Port MAC Address Name Driver Status Link > >>> 0 xx:xx:xx:xx:xx:xx xxxx:xx:xx.x aaaaaaaa up xxx Gbps > >>> ... > >>> > >>> Only difference above is, after patch the command itself also printed. > >>> > >>> > >> > >> That's because the function uses printf itself, which is actually wrong. > >> Any output from a cmdline function should use the "cmdline_printf" call > >> which outputs to the proper cmdline filehandle. > >> > > Got it. > But in existing testpmd code, only a handful cmdline functions use the > 'cmdline_printf' and most of them are in the same help function. > At this stage I think no need to update them. There is already some > confusion on testpmd logging between printf & TESTPMD_LOG(). > Agree. No point in updating the existing functions to use cmdline_printf vs printf. One other point related to echoing commands, there are also testpmd commands that produce no output - the commands for configuring rte_tm, being examples right now - and having those echoed to screen when read from a file is the only way to know what is actually happening. > >>>> To improve usability here, we can use cmdline_new rather than > >>>> cmdline_file_new and have the output from the various commands sent to > >>>> stdout, allowing the user to see better what is happening. > >>>> > >>>> Signed-off-by: Bruce Richardson > >>>> > >>>> --- > >>>> v2: use STDOUT_FILENO in place of hard-coded "1" > >>>> --- > >>>> app/test-pmd/cmdline.c | 14 +++++++++++++- > >>>> 1 file changed, 13 insertions(+), 1 deletion(-) > >>>> > >>>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > >>>> index b7759e38a8..52e64430d9 100644 > >>>> --- a/app/test-pmd/cmdline.c > >>>> +++ b/app/test-pmd/cmdline.c > >>>> @@ -6,6 +6,7 @@ > >>>> #include > >>>> #include > >>>> #include > >>>> +#include > >>>> #include > >>>> #include > >>>> #include > >>>> @@ -13431,7 +13432,18 @@ cmdline_read_from_file(const char *filename) > >>>> { > >>>> struct cmdline *cl; > >>>> > >>>> - cl = cmdline_file_new(main_ctx, "testpmd> ", filename); > >>>> + /* cmdline_file_new does not produce any output which is not ideal here. > >>>> + * Much better to show output of the commands, so we open filename directly > >>>> + * and then pass that to cmdline_new with stdout as the output path. > >>>> + */ > >>>> + int fd = open(filename, O_RDONLY); > >>>> + if (fd < 0) { > >>>> + fprintf(stderr, "Failed to open file %s: %s\n", > >>>> + filename, strerror(errno)); > >>>> + return; > >>>> + } > >>>> + > >>>> + cl = cmdline_new(main_ctx, "testpmd> ", fd, STDOUT_FILENO); > >>>> > >>> > >>> Above is almost save as 'cmdline_file_new()' function with only > >>> difference that it uses '-1' for 's_out'. > >>> > >>> If this usecase may be required by others, do you think does it have a > >>> value to pass 's_out' to 'cmdline_file_new()' or have a new version of > >>> API that accepts 's_out' as parameter? > >>> > >> > >> Yes, I thought about this, and actually started implementing a new API for > >> cmdline library to that. However, I decided that, given the complexity > >> here, that it's not really necessary - especially as there is no clear way > >> to do things. The options are: > >> > >> * extend cmdline_file_new to have a flag to echo to stdout (which would be > >> the very common case here). > >> * extend cmdline_file_new to take a file handle - this is more flexible, > >> but slightly less usable. > >> * add a new cmdline_file__new function to echo to stdout. > >> * add a new cmdline_file__new function to write to a filehandle. > >> > >> I don't like breaking the cmdline API (and ABI), so I didn't want to do > >> either #1 or #2, which would be the cleanest solutions. For #3 and #4, > >> naming is hard, and deciding between them is even harder. Given the choice, > >> I prefer #3, as I can't see #4 being very common and we always have > >> cmdline_new as a fallback anyway. > >> > >> Overall, though, I threw away that work, because it didn't seem worth it, > >> for the sake of having the user to do an extra "open" call. > >> > > > > I vote to option #1, but agree that it may not worth breaking API and ABI. > > Is 'cmdline_file_new_v2()' too bad a name, perhaps better to go with > testpmd implementation, as you did in this patch. > Let's see what others think. I'm fine to implement this as a cmdline lib change or a testpmd-local change only, whatever the community prefers. /Bruce