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 6914742D13; Wed, 21 Jun 2023 13:16:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3FF884068E; Wed, 21 Jun 2023 13:16:53 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2059.outbound.protection.outlook.com [40.107.220.59]) by mails.dpdk.org (Postfix) with ESMTP id AFB764003C for ; Wed, 21 Jun 2023 13:16:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AVJWnYYWd8b7LK09kkw5v+MdO0VAXJRToc8TnWX8kfQH2qQ04rCFZRLXmCWilSH7XU49a3NVyYV0WPlYmnGDFxrC8LRcK+hyKzHSUAAFdoU7daCZcqS1bh30W7ONidG2vcLm0vXetAYgjsuNCGlX2HR3H8qAnT/Zx5YOm2hqzMluXtGaHTfEbT/l3z92R7x2zRvDAEMzNMnqL23gVh7jw01fLPAa/0zF7pdgnlf03EkFKmlDHgB5kfgiR5QjGpOkxzp8yAj7iJALFwY8AxdQjkLXKH1LyFhNPu9XBIPjK3Su672W7vQOOaRVwbGHfxxM/g9/DpNIQE94DxV0PG/GZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=gtBRtWq7VV5hTh5/iBJeanGA39W+bYlvjqECcXVprYs=; b=l6fAa1Ve+tDPiGUgtxlXrTyfrz/QAI6kTH6ks+ZJVvdrZffU/1CQdaL/4DhmEjqpuwuUvaJhnC4mufguIikNrjHY7p07MABm31JBEbT2BrW9/sZtdg47+R2B2Nv5EYKxud8r9w+io/x0opKqsmAwwgotjjS3aa7zSmccsf5mXOx+a6RgVTWIwlK3v5svUJqpfgxIt/HaZ3JrZ3MrToLSDmw7u2mAFXty+CGcdZ06aSfF8yk12f4aWxwtigzSWclc92Yy5eyGeiU75tcccJH9dNZot8+hjFrlI8j9OxFX77j/Gsi4x1hRl12e7hV5rVQJD6vrOIcQ2n0vVZPpnoIqhw== 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=gtBRtWq7VV5hTh5/iBJeanGA39W+bYlvjqECcXVprYs=; b=WEhiGNDfMV+WgXOyFShd10h9ZB4yRl7bk4uo2EDxSDNga2q4yXql5Ntu11pA6PJ+W1uSf9tK0OVjxJqgzF6evCtRojwSw0UnvY7DBS+oQlfB+ElJFu88/ng5fI2Plv0IDcROYxbMn18YfcriCqeThH9fVp0hf18SZPuFiOwovxg= 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 PH7PR12MB9221.namprd12.prod.outlook.com (2603:10b6:510:2e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 21 Jun 2023 11:16:47 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::16e3:326c:5c2a:be42]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::16e3:326c:5c2a:be42%3]) with mapi id 15.20.6521.023; Wed, 21 Jun 2023 11:16:47 +0000 Message-ID: Date: Wed, 21 Jun 2023 12:15:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Viacheslav Ovsiienko , dev@dpdk.org, Aman Singh References: <20230420100803.494-1-viacheslavo@nvidia.com> <20230613165845.19109-1-viacheslavo@nvidia.com> <20230613165845.19109-2-viacheslavo@nvidia.com> Cc: Jerin Jacob Kollanukkaran From: Ferruh Yigit Subject: Re: [PATCH v2 1/5] app/testpmd: add trace save command In-Reply-To: <20230613165845.19109-2-viacheslavo@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0223.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:315::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB9221:EE_ X-MS-Office365-Filtering-Correlation-Id: 59615e62-8144-48aa-19a8-08db724900ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WIsdVC8+OJYjTqC2JflkQI176kU0WapbuI+Tsj81fkPFmW+XmXSn0XCIvmKVws6tNqTYTkYL+KyFu47lqmJtwAPqpMzaWOtPqaxupVePZOYqjqX23t6Ms2teTEJF7xbv8AnRruHXwLTBsdmHz2/mEgqCeSPgmNqGdhh/Mc88nNK+SvYLbrEKSe67TpuSN1iXu6AWIXY758+X3RmPt5+WPsbaT8ya/HffxbUd5G6nnR++ogm8uw3Y4o6gxcnxl64ImAPWtR0gHTqLADc0caUXmcCL3x3/H+WbkfqIxfEIiKqcETGTKKxQ/ATy3mAsQfqF2FOOBwR5GXHmBqxi5979+UGwsx5tW9sERQLhSoVos6rXlSpqgBmyI6o7cA2hpAgZp4zuAxVIVJEUfMWJfDC9f+7rpi7NprfeRq/xlqHwA0a9rgL4Qyiq7wMqFuUBWs7RSo2vNblnxvXhTXZGNyGBlujbOu6KO2t9L7W/99qH2n3la5dhHX/ceyXVPn2EBDiBqnE8QwXa+taaFcgxcYQ/PsyVHFMhehhtkoo+5k+6uGLgPSJwBl2xo9OYhelPaUFo9tPxRSBln34gHKA6CoRinXapC0kOw9NAAvHiuV9vq+IKy6DgSr6x+bJEJkYtiAQYBvDkpbTzblzFR2VAqY/shQ== 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:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(6486002)(6666004)(478600001)(36756003)(2616005)(83380400001)(38100700002)(31696002)(86362001)(186003)(6506007)(53546011)(26005)(6512007)(8676002)(8936002)(41300700001)(5660300002)(44832011)(31686004)(2906002)(110136005)(316002)(66476007)(66556008)(66946007)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S3FHNjB0WkU2d05mY0J5Y2d2LzY3RjJrR0Qxc3hYSnFlZVh5bWRtbW9VTTFX?= =?utf-8?B?QnNZZitRa2VMb3pFK082UkMrOGFwTDN6eGJyNWJEY0g0ejltL0xLekcweWZB?= =?utf-8?B?RTQ3ZUU0aG14cW9nVmZrcC9RdUp0T1BaL28xV0JBcVViK0w4Y1k0b3pCVk5F?= =?utf-8?B?dmRjMGdmdGRvZnd5cGdsWHluMHFtL2YzLzd1cDN4NlpXb01VRVYrK1A1djBo?= =?utf-8?B?R0Q5ZHQ1RGZ3SEt2YkJIWEcxeGU2ZTZuaUFLcFVXaHJ4M1diQ2pEc1VwVHV5?= =?utf-8?B?akR4WkVrcWc3QU9DcTdSSzNIV1NXMnVGL1JaQ2pVd2hsbzVxcnFpWTYvcU40?= =?utf-8?B?ditXTUNIVXZ6NXdiRVdaY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: 59615e62-8144-48aa-19a8-08db724900ba X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 11:16:47.5429 (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: XmHyDBNmxTDdH4EvkW5XlXl4EWA6vYBHi2PdzH0DwLbTCS3tDRhiDHVNK5By4oMR X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9221 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 6/13/2023 5:58 PM, Viacheslav Ovsiienko wrote: > The "save_trace" CLI command is added to trigger > saving the trace dumps to the trace directory. > Hi Viacheslav, Trace is already saved when dpdk application terminated, I guess this is to save the trace before exiting the application, what is the use case for this, can you please detail in the commit log. And what happens if this is called multiple times, or what happens on the application exit, will it overwrite the file or fail? Again please explain in the commit log. > Signed-off-by: Viacheslav Ovsiienko > --- > app/test-pmd/cmdline.c | 38 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > Can you please update documentation too? > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index a15a442a06..db71ce2028 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -39,6 +39,7 @@ > #include > #endif > #include > +#include > > #include > #include > @@ -12745,6 +12746,40 @@ static cmdline_parse_inst_t cmd_config_tx_affinity_map = { > }, > }; > > +#ifndef RTE_EXEC_ENV_WINDOWS > +/* *** SAVE_TRACE *** */ > + > +struct cmd_save_trace_result { > + cmdline_fixed_string_t save; > +}; > + > +static void cmd_save_trace_parsed(__rte_unused void *parsed_result, > + __rte_unused struct cmdline *cl, > + __rte_unused void *data) > +{ > + int rc; > + > + rc = rte_trace_save(); > + if (rc) > + printf("Save trace failed with error: %d\n", rc); > + else > + printf("Trace saved successfully\n"); > +} > + > +static cmdline_parse_token_string_t cmd_save_trace_save = > + TOKEN_STRING_INITIALIZER(struct cmd_save_trace_result, save, "save_trace"); > + We have dump_* commands, what do you think to have 'dump_trace' command for this? >