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 9CC4545549; Tue, 2 Jul 2024 12:53:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87410402D2; Tue, 2 Jul 2024 12:53:46 +0200 (CEST) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2044.outbound.protection.outlook.com [40.107.103.44]) by mails.dpdk.org (Postfix) with ESMTP id 7EFF3402C6 for ; Tue, 2 Jul 2024 12:53:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KrOoIcwT43S6gmxab+RVp8d6m3pDQtLJMt9W/Za6FQ6vQ8F2XtZBB2E+mckj+FqNymPM7HKOsnnDntts8CwKRFjl/99PIfx6UziViMlYHlBORqQT6rI6+f7whi9Yxx6UIPqLlN5NgMOXgI0y+SBrsFjns3CdjCiUTwFp1GjsnaynSQTZpTVUIzZXpX4+NL16sjf4bNDhQRCFqM9GMBjqcxI/V5mr/cBNy1Y0ssyOVuapjfAYmCCkgigqsbadcSPnFFZeqqCdJ9aH7PP6U5TMhBxZXxHKNw/M3G98ORokpQ+opQdZCM8aYZVR29wBDK9h9p33+C9YVafWRrtYYouuTA== 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=eu7Flx0hV/aEru+XPzw/MPuSxFSUWMDjEh6hNZVrO5U=; b=aXyDwHD6mgBqUoOwgF9J5PuR+NW5OnVoM7Epxs2ibwGsT1Ms5CqtgqWsl7I70bvdXO6ckdEfpN+MDrn4ayx1moXi4QpKC80TaqC6juOcvEewtqhClabUchB5SfsgH6xV1P9Rmm/5lsoOmmdpc9lSSxd6N+xLZAg55sd/twDDBDNIZjmzTXJUhoXzOwVfWnAbimsMmuvpkg8s6gqWYH/tzV9OMTIIIaDQUis5y15vzvxRpf8t1024X6NMzUEl2rx5FUjAtX5LrVBhaFwSLKcXVa5MEfdJDWsLTMtuKdzDN5I90t/c+teVnMI6jhS7/SIFeBvhSBptFQXyw6Tq/sTySg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eu7Flx0hV/aEru+XPzw/MPuSxFSUWMDjEh6hNZVrO5U=; b=d5+3Hv/CcDfkC5UZCWJj9n4RvpWyTQvtVdJo+x6gKy6ewZKSf+6Thpg1zwBGEm/AyIYo5Yl0Z2S346t5xboIrYF7dpwi3dIQ/MD+AdL9hhRsoYYAnIGqp1xG88O9Th9d0aruE6PC6QfMXplDw4rjSAQG4Qhy+va9JUlY6OPwkh0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AS8PR04MB8006.eurprd04.prod.outlook.com (2603:10a6:20b:288::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.33; Tue, 2 Jul 2024 10:53:43 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%4]) with mapi id 15.20.7719.028; Tue, 2 Jul 2024 10:53:43 +0000 Message-ID: <0b28aebd-0247-0e0f-22f3-f04ee0b2a236@oss.nxp.com> Date: Tue, 2 Jul 2024 16:23:38 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v1 1/2] bbdev: add new function to dump debug information Content-Language: en-US To: Nicolas Chautru , dev@dpdk.org, maxime.coquelin@redhat.com Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com References: <20240701223424.427588-1-nicolas.chautru@intel.com> <20240701223424.427588-2-nicolas.chautru@intel.com> From: Hemant Agrawal In-Reply-To: <20240701223424.427588-2-nicolas.chautru@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI1PR02CA0031.apcprd02.prod.outlook.com (2603:1096:4:1f6::11) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS8PR04MB8006:EE_ X-MS-Office365-Filtering-Correlation-Id: ad71c3f7-a90a-47ed-689b-08dc9a853d92 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True 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?M1Urblo2VWFKejRGMkFSYlAyNTBNbDlnUnJHY3J2QXNGK2dpL3I4OHBQaUJM?= =?utf-8?B?WnhYMkZtOFFHUHkxR2FIK0Qyc3VkY2E2WUlxZkVjcDBqdmJXaUdOZ1I2TFFG?= =?utf-8?B?TlhQZEpWNFJSVnVKeUFGSWRjOHgyKzh5UjljVFl2SWdaTjJTTzQvaTMyUEVO?= =?utf-8?B?N3lPU0NkNmVGcmx1ZmFlNFZLalYr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St6M1puVVArOUdjMUJvaUsyckFMOHJibUdsaXdYa25zcDd0?= =?utf-8?B?YXFvQWtNVWpka3F4OGtORWlnS2R1dk9nYWJPa2oyV01Ldjk1em1rclc4YnM0?= =?utf-8?B?d1RVOE10M3lxb00wekEvM3BwNHJadS9hQklSTngySndSZGVRNmpUK0xoVzJU?= =?utf-8?B?S1V1Y1Y0NTVTZnZ1K3NEQTBINmMzdXBJT0dHcEhMS2Z2bUtJd1lVL2dCTGN6?= =?utf-8?B?T2ttbVlBcS9VN0l0UjJldnFtR3IwOFBIN2JFdUZxaHhNU2pZRHRWOHlrR3Vj?= =?utf-8?B?bVdKNTZvLzdkbUgwNkhEcDdDMFZFQWJYbWZvcTJiN1F5bWtrNjYxb0daVEhM?= =?utf-8?B?ZFhOL3lEMlcxY3ZlbHZ0U2tHWWVNVENDanBkSE8yNi85ZWhOR1hMRmZYUjZI?= =?utf-8?B?YVpqT1Nwa1FnSlhpaTl3a0NzUHk0a1hxajJSS0FQM2kyUGdrY25NMmdrakZ5?= =?utf-8?B?RDZCMzg4aExZNjRIWS9GQUNBT1J2V3F3djBqRHcxVHVhb3lqNklpdS9CL1lq?= =?utf-8?B?cG1CVy9hNy9hbzBFV25rQ1d6bUV2RWk1ekNURkNpY080b285VXhCeXhsQmZC?= =?utf-8?B?R3lmK2FZNVRlY1ptWWN4SUhLRXBIdUlMTGtiVmNrek1JK1BnNVNCbWVnSEdL?= =?utf-8?B?OGczT25oMDJvUk1IbURjTnZpR3IxdnR3eHRtTHVYai8zQ0NFU09PU2tuN2Jy?= =?utf-8?B?UkREU0RWVVM5eWlXRUhiQT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.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-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xcXV0WTA0UEFJZCtvd0o3dm55b1dRYkdldzlmdnl6WE53UVNSYnJj?= =?utf-8?B?ZEFSVVZQcGw4cG9oNFAvbFpObWN4dDV4Mzh5Y2JKVUtYd2p5VW5JN1JZN2hF?= =?utf-8?B?NUxOQmx6YmRFY1BpNCt3aDZScUVacHo4TDRESisxbmNQbFc2cFhBc0FKR1F6?= =?utf-8?B?K3pUWXJBSm1kS0hKd3ZkS0NmUU1IZ1NqWlhUMEZ0Z1lNQlEyZzFTWlpEWmhs?= =?utf-8?B?ei9NR1FqbVR0eTlYa1YyL005K0U2ZDZ0OUJnTWtNYjl1TUtaUktnUDlqQWc3?= =?utf-8?B?dlJPZ3Y2WWNZb0thOGMvYmxrMWx0T1FDRy9mTzUrTFlPWnhSTVF1M3pTV2V2?= =?utf-8?B?N3h4QlVTZitIRnpKTC90OTY3bGFCcVBzUGtZenQ4NWY0NjFxbXJsRWdsUWx0?= =?utf-8?B?dEE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad71c3f7-a90a-47ed-689b-08dc9a853d92 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2024 10:53:43.6778 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bnO3dH0AyKinJecwym/jiooEqaW4BTUWdfMxZk7xlxPJj30o3G2gAWWDyM/LFp4tjimrVVOmE9yylwoWlbcNLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8006 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 Hi Nicolas,     Few comments inline. On 02-07-2024 04:04, Nicolas Chautru wrote: > This provides a new API to dump more debug information > related to the status on a given bbdev queue. > Some of this information is visible at bbdev level. > This also provides a new option dev op, to print more > information at the lower PMD level. > This helps user to troubleshoot issues related to > previous operations provided into a queue causing > possible hard-to-debug negative scenarios. > > Signed-off-by: Nicolas Chautru > --- > lib/bbdev/rte_bbdev.c | 214 ++++++++++++++++++++++++++++++++++++++ > lib/bbdev/rte_bbdev.h | 41 ++++++++ > lib/bbdev/rte_bbdev_pmd.h | 9 ++ > lib/bbdev/version.map | 4 + > 4 files changed, 268 insertions(+) > > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c > index 13bde3c25b..81c031fc09 100644 > --- a/lib/bbdev/rte_bbdev.c > +++ b/lib/bbdev/rte_bbdev.c > @@ -1190,3 +1190,217 @@ rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status) > rte_bbdev_log(ERR, "Invalid enqueue status"); > return NULL; > } > + > + > +int > +rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_id, FILE *f) > +{ > + struct rte_bbdev_queue_data *q_data; > + struct rte_bbdev_stats *stats; > + uint16_t i; > + struct rte_bbdev *dev = get_dev(dev_id); > + > + VALID_DEV_OR_RET_ERR(dev, dev_id); > + VALID_QUEUE_OR_RET_ERR(queue_id, dev); > + VALID_DEV_OPS_OR_RET_ERR(dev, dev_id); > + VALID_FUNC_OR_RET_ERR(dev->dev_ops->queue_ops_dump, dev_id); > + > + q_data = &dev->data->queues[queue_id]; > + > + if (f == NULL) > + return -EINVAL; > + > + fprintf(f, "Dump of operations on %s queue %d\n", > + dev->data->name, queue_id); > + fprintf(f, " Last Enqueue Status %s\n", > + rte_bbdev_enqueue_status_str(q_data->enqueue_status)); > + for (i = 0; i < 4; i++) It shall be RTE_BBDEV_ENQ_STATUS_SIZE_MAX instead of 4 ? > + if (q_data->queue_stats.enqueue_status_count[i] > 0) > + fprintf(f, " Enqueue Status Counters %s %" PRIu64 "\n", > + rte_bbdev_enqueue_status_str(i), > + q_data->queue_stats.enqueue_status_count[i]); > + stats = &dev->data->queues[queue_id].queue_stats; > + > + fprintf(f, " Enqueue Count %" PRIu64 " Warning %" PRIu64 " Error %" PRIu64 "\n", > + stats->enqueued_count, stats->enqueue_warn_count, > + stats->enqueue_err_count); > + fprintf(f, " Dequeue Count %" PRIu64 " Warning %" PRIu64 " Error %" PRIu64 "\n", > + stats->dequeued_count, stats->dequeue_warn_count, > + stats->dequeue_err_count); > + why not print acc_offload_cycles aas well? > + return dev->dev_ops->queue_ops_dump(dev, queue_id, f); > +} > + > +char * > +rte_bbdev_ops_param_string(void *op, enum rte_bbdev_op_type op_type) > +{ > + static char str[1024]; > + static char partial[1024]; > + struct rte_bbdev_dec_op *op_dec; > + struct rte_bbdev_enc_op *op_enc; > + struct rte_bbdev_fft_op *op_fft; > + struct rte_bbdev_mldts_op *op_mldts; > + > + rte_iova_t add0 = 0, add1 = 0, add2 = 0, add3 = 0, add4 = 0; > + > + if (op == NULL) { > + snprintf(str, sizeof(str), "Invalid Operation pointer\n"); > + return str; > + } > + how about also covering mempool and opaque_data pointer - they may also be helpful in debugging?