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 0F11B45843; Thu, 22 Aug 2024 23:09:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D40C342F6B; Thu, 22 Aug 2024 23:09:21 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by mails.dpdk.org (Postfix) with ESMTP id 086C542F57 for ; Thu, 22 Aug 2024 23:09:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X6wrYnFtSdLOac8fItdgfGmxd7GEkr8nE2/BheTU4BGjAsIAxUmIHbcVu3m5rf0DFNAyRdylsuGOipWYbyc4vb9BrLyPtZCjAqSZIwhsffngmHGB5UhWuzhKVIQUcx2uNeP96rU4NIJ8ivqR8mKU0DohY1xUch4bdY505T5bscQprX5ZHVdnSx4h3sm+20tEUmTk3jGl+wTJCoZV40UgoX7+LbRq1UfktIKllqXv0lhLpaXNNpLzhlciMcWs/ozE/X3VF2kr5IJ/1qAL6ZELx2HV77vjpAbnGLGWQ/7H6WfdqCsWC82UiQtfC9SVP6re4U+QG2xvg54LxpT2v/fPzg== 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=aBjhF9jyUbL8dUdupghwktn5xN9VsOeac0Wvpm8CwfA=; b=rrcEFPRr1Jv3fnzXbr7VOTUyZd4uyYv/3S5lZEQ1xj2rO2bX+slZ1YcarqiXIbiNljcM5844KaFlwJ/m3iYm0WD7o4McH7DtosqCmzTUVBCfoAg76nFOvpu7ZFc7nu9+h13TinqMbpHqYIVrXTtu0FRJIKC7FJYkgO2uN6tq/NJPgpUw+zhis+/blDRdZ7BlRffLChVJkiJW2J7mFcsjBPT61pLj0HxYdrmZOmNiso/SKh9hpLOu1VlbgvHWAjUDuPdiyxh7iaoIpxbPNW5xrJfYfMI8EPbXBLlmel8AUAlY/fIhS9oUkAvcJ/H32MZ2pnrfZfGoQOusDN+TRHlB4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aBjhF9jyUbL8dUdupghwktn5xN9VsOeac0Wvpm8CwfA=; b=bwUQ9MrS6vFjwU4pSSd+Pf3pMAaglagp5DkKLMH/Mf2p9HYBOeeou9SzaZr6i2GQd39NZZgPLU8xh0BMDYYI60XgEBqe19TsMdyNeTdgUfblV9wR+dntYmjNfy729CG6vNPkoq4al+L62Abz5yqfm8Am0x8tkrTbAH/x3/aHYQg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by LV3PR12MB9356.namprd12.prod.outlook.com (2603:10b6:408:20c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Thu, 22 Aug 2024 21:09:16 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd%4]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 21:09:14 +0000 Message-ID: <1bdb73bf-e66b-4bfb-b5ee-2ebb0f5bca2a@amd.com> Date: Thu, 22 Aug 2024 22:09:09 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] app/testpmd: show output of commands read from file To: Bruce Richardson Cc: dev@dpdk.org References: <20240822103604.113246-1-bruce.richardson@intel.com> <20240822104109.116208-2-bruce.richardson@intel.com> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAA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s7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1P223CA0014.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::19) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|LV3PR12MB9356:EE_ X-MS-Office365-Filtering-Correlation-Id: 72d72b23-ee69-43b8-223f-08dcc2eeacef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZUJ3bU1jMmE1VFE5S3pCZzF5dXloTDlGQ01NcFF6eHFSeEtpMkl4bTVNdTB3?= =?utf-8?B?Qk5UT3BGT3dBWXVqQytKV1lISnB4S1A5RFpPYmJ6SXc3d0F4a3MyL0MzdmJL?= =?utf-8?B?OHdPbnB5YXlGTzl2Y3F0dkgxUTlIVldhNkJPVGViNVQ1ektXdVd5QnY1OHg3?= =?utf-8?B?MUQ0THd6bjZVaWpReHFLVmdLVktMTTJSTWlWSFJQOVhsOTk1TXp0anJJRlR4?= =?utf-8?B?KzFYWUxkVU9yeVpTV0JOUjhESm96WXdvQjYrZHM3RW1sRTU4S3RwTjJxU055?= =?utf-8?B?d3NFbnF0ODdaRWhlREJ3NzJId2V5NTBkTUxEZk55NTlzUTAwSVc0M0FOOVpQ?= =?utf-8?B?ejBSRExNU2w5SDc0cStYcFUxWmdjWURPR1laRjhrejFCaHA1Z2pQakQ0Nzdk?= =?utf-8?B?SVJSdUNJRXJQM2RhL1ZsM0owb3dsdzF1MXBFVk5xMllpeEVWWStUSjBEVVU2?= =?utf-8?B?UmdGZ1Zoc3NHY2tVbWdCVFRiQjV6dVVOMWx4UGhMSndWQzJjMFp0ZVZJ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nJkOEIwV010?= =?utf-8?B?ZDdWempQRklueXhZb0x1MjI3dlBjSGw2N1F5cW5rd05abXRyckdaR2xZbDlE?= =?utf-8?B?KzRMQlpQV1J1cjk4ZUwyQnA4Mk4xWkFGUXkvelNWRWtnQnpURm8yczB5OWlV?= =?utf-8?B?QVhMSzgrWVBTc3JaUDdpLzhNSHBKblVHdXdVVWpnSHBRQjcwSmhqM0ZqOVBu?= =?utf-8?B?bjJ5emtSRDU5ZkNNc2xVUmFIOVZLRnl3WC85VVYrWW1tdnB1bFRNTlkzUkdy?= =?utf-8?B?MHgzTXdOSGNQL1QwbTUvN2xNL3orVDhhb05pVlA3WDhIaUFBTDFnRXJIQ2No?= =?utf-8?B?NlJxUSs2SXRveFFsbVlITGtoWUVIbGNMQUM3SUhZZkFid2xKUjEzVzFLdWxP?= =?utf-8?B?d3kvMDJxZFNIZnpWSWJnZz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dVZUYWNGR0FITkVqNTNFTDkxMWRucXhucmlUbnVPeHNkcFJIMk5JVEdzbHZ3?= =?utf-8?B?WVdodmZpOTAwRWVLeTNHNmZvekt5WHdEaFBpQTNUVnZkcEJaekZ3OUZ1SjIx?= =?utf-8?B?SkEwODJuUzM4cG5ZYkRDUmlha05iWWFqWjFCNWJXcWhNMGpSNEhpVlNjOFVC?= =?utf-8?B?TWtNUzMxcTB5YURDU3Zid2l2TWVSWW1Jb1VBQ2lvVThPNkF2VTJhbTJlV3Fn?= =?utf-8?B?NW8yb1RlT1F0cjROdmp3VjgxeWJSZUUxd1FjeTZYZTg1Z1c2czFsMnZ5bjdy?= =?utf-8?B?ZTV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QSXJzRDQz?= =?utf-8?Q?2s4hVluLHw+gLNCsi2nDxj1K8?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72d72b23-ee69-43b8-223f-08dcc2eeacef X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 21:09:14.0916 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4mpQzbrxwOTVFoxJJ0uyfWieTQdQJ6K7bqhohG8vrmVJ5bwkXc86fvVuMSWYwrCP X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9356 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 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(). >>>> 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. > And also to add: > If there is clear consensus on what the correct option for this case is, > I'm happy enough to go back and extend the cmdline library as agreed. > :-)