From patchwork Wed Jul 3 10:26:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142067 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1FADD4555B; Wed, 3 Jul 2024 12:27:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3407342DC5; Wed, 3 Jul 2024 12:27:29 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011009.outbound.protection.outlook.com [52.101.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 2097942D55 for ; Wed, 3 Jul 2024 12:27:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RrRtteS7Uv1P4Ygnp7UR4DNdNynsHQ2gD9QOTQV5p/YAeFkOYa3qERu71SKdUbXD2y1P7pJCFFqjmqKP4sTsi17unBgd6veA80aQHftvoLXVrveEDhk6Chile43457qolsGpEX8gIcVCiolBg9UXBv33TO4dGeFxaDcVy9jcxP5SHfHwMnMpRix/LSAOqgSiQjTBUnpNAsRy6kAqtG+oc3I31MWVh3fADVoDz4HM0BbR6y+h2lNYOuPJWPT+rleocKzexcco+W7zHpDU0KAS+TTMVLcuvTuiT73er/jx+UAgeCWLoWXjeBhy7DDwwEUkjAcZLlJaszrRkkaTBD0YJw== 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=/s1pa6AQ98q9v/Tf9HIjqPprCiOAgF64CxH48HwVMqQ=; b=eHMp2/W+06oQy59cgWPiWXpGtrrFN4Dgmq3f9aOzwfPIVSgMJyPFp1KaSxwhHWSe1E5uNuefkHdZOQxuT0kqYo//LOEbXPyL6exKx+xpJu1NIF3fCIzyKgM9Mj734elTjL4KemD95ebB19ih2xkGfo8je+/3SaRDMPervygktT3LJ0toWF0GaQJkwYE3fGzx9A0B5BZi1/kFAPEcRMfSjuGmYbumYd8UzZSEr4cDC/av8DEDpnjBKg88NcZ8en9tmJ+xw+bQPs/JnWSUZrgPpbV4PAQisyRImdomu3wfDfOhQcVF6fL1AHpBOB8GB4I0hh/aJ3YvKe48X29VSDkgUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/s1pa6AQ98q9v/Tf9HIjqPprCiOAgF64CxH48HwVMqQ=; b=TwkLKzyqzDGL5S5ARc3D/uDPsRyLeKpvMqxaVDgOhbDyCGlVUXOUqqPb1l6Cbo7DXQqHyO4c7+uzy4aouaSqnXnVLQqnL1d9QifWSFUI2LMnbUHhmhSr3CUvk0goGbt0u1uHzuQtLgtYRqMWMQk9tdZ6c8A7SP1KEGgdMqRaaMk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) by PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:26 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:26 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Subject: [PATCH 05/11] crypto/dpaa_sec: improve return value for retired queues Date: Wed, 3 Jul 2024 15:56:43 +0530 Message-Id: <20240703102649.3096530-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 95ca5a03-1729-4f99-c765-08dc9b4abbb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: s6wTE1nFhXSSsh+dcsiky4TwDFJQkN+k+umSRy9W2Utwwslv14Lf62VmG/J0v51AHm3qA0SML5ePQWBVofBOXBupRC4jLQDzKzV9MPZYFBEenaGcwsTVE2Nax878rA7GKQjZkiX5+9ItK0TyA/OAMY8Bsr01ekwdaBdKiVrQH7puVYtcxHdvWhga3QkDyTCCssMp/L3ra59k6TfzqLGVK9sf8JehPxZizvTpi0kuynjkz17bbYfAT3XgDN+4rOYQE6F2GUXF2HNuUcWn5y448YMCG4OR9NUAIOFm0Haze8tJo+ZzgFdiVsTfgG3+DjFop9Gi+G9PNCNs4P7KhhIMsqpmyjVELbqV/QTKQMn4Js/LCt+nIgmzAhyITWGwbCUzdOkt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; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /z94KPNSrTLvgjqoXn9/cCB8Xs/lTO+ZCNTQKtP/N/6+hunQ0SwzqqciKWgKQE6V+TOFdNli219CXx+owD/CFlWNTWO0ttiMf9e4ZaDWF+MpdgCdjHqEPs+45bL6Aw3MEpFhMgBL8pXekw570xf1kfd20MXMAJIkmrEfMy2r+mOpsaBf15k2nsWmGnrNHkuIFdkQmqhZJnrTBnh3WKaUTLTeKmaM7BTM5dHAvxl86g7AQtP9I2HPLqHCE6I8spQfEV6m41/HNJyUQ/U0GB+fNSHXMFLaHZ0ch5N4ttZrJ10plYvhR6jJA7187a2vgP1XuGFKzj+xjZGlOPtQVmyTm+11UEx+g+JqbSn8wwptLcPr615dA6RzKATm//5PV4qXWtm0JZizyre+yAVUOnZXWBL3fz6FgNCaaxui3NwS8ZKJflI6808D1m1FuoofvjeYUP4uX78WnBLXmD4X6WnzeVdmyhu0VDr2+vGSbKS4Qx9vunycq9VwH/eQoFK/7cvtb1GIJ3BIuRg1IjFYM1a8viwDSXquD2D0nx27+cj90fPVjvQuIwkD9/VSIsEIQiq9dJQb/gkLlFllnMS1MH+8PHYdSWeBFW8LMZdQUD6DCo+e3jZFi5GRgHeT+3Z+EWmndZzM3UN0ZU9/WSMvjg0hbJjhsdgMQwdDkzUzm+s3zlo9ZfGiy+OoNNLJDTSNKMypmg72NuuUvYiljfg1u4871vU4VFKKN2pN7W3YRuy79213Ych8RTKpt5fn9XlsmdoByb8/p1Ry4NOEx6A5JCwEgk9RopSd5kQ8zyOCROrZxiLO18EDi9M2sqDSscO0Zpq4zTJSjnPEfR5hWZe/swCvoDMOo3e1rN2dcNdMRpbbVYVb55axg15v5352UmU9ALrmRB+swKe+fhibtBWuGb0Ew5LaPsJD56X4gJzwuWvTnpa80YodPGVM+kqp0+cQUCNPTbep3mbVZuOYO+gwmv0u+XJ1BzILIo1d750eBHu/6PF5jDg2Y2Wpjw03TAgYRHqAYU3oD7Kp6EyS/9g4GaFNSWXgcK8IdFd85ST4dCs09zTvZ0b9gtttHeSyOjs25JCnTp0ShFv3QBtWeTMEkMl7FgjAoVWunNX4NevU0zzcMsBfHRblAme9WrjUqVhsb9WFiySoCFdf7V80RyGYOI3QtvX2Gx3CnVCUQvb7AUdoS/Kv3L9qdasxiesAD6Q2Ji3JpS4tHgN8ZSpfgVcZZSzWEk/7YW54wKUidMoZxWspdSuxbx+MdYIgfFsZ1X4lDvD+7EldOMRu08XiIpobfZp+TxiN9349mMi1DWN4F3VZ/HhnXwax1W6zM4L3eESx9N2u/CzWSB3WM1/qpE5vyRgJF3gRklFYxupnKKyKwUCLFvNg6YzQC31yF2j/WL4eN2dzKja1BFj/xBodPI1bSCfNT3fC8bPb+LD/SQl88FM0K8/IEJlDmplAl9/x4G6+XpNOUU+qOOpmc7GOasHojUNSueTUlaC8OjuGiHNIxN3kOGAb+ZHIDmk+Y2ofRg0Zu6rY10RrKOAp1XKm3m/bl1TC6ehf6ryF3x5TJu/21JlQ2qauwpKtfIw1kTzPMCJW2ISs X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95ca5a03-1729-4f99-c765-08dc9b4abbb8 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:26.0591 (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: Kl/ysm5mB9k7UBb07wNNMB5OYO0TO7sNku5THm9u9koqUbnshFEzugeX5vzyQFKt X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 This patch improves the return value for retired queues to enchance debugging prints. Signed-off-by: Gagandeep Singh --- drivers/bus/dpaa/base/qbman/qman.c | 5 +++-- drivers/crypto/dpaa_sec/dpaa_sec.c | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 6d2fbdcf02..9975271ba2 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * * Copyright 2008-2016 Freescale Semiconductor Inc. - * Copyright 2017,2019-2023 NXP + * Copyright 2017,2019-2024 NXP * */ @@ -1746,9 +1746,10 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags) int rval; u8 res; + /* Queue is already in retire or oos state */ if ((fq->state != qman_fq_state_parked) && (fq->state != qman_fq_state_sched)) - return -EINVAL; + return 0; #ifdef RTE_LIBRTE_DPAA_HWDEBUG if (unlikely(fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY))) return -EINVAL; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 679f78c4b9..105274e49e 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2017-2022 NXP + * Copyright 2017-2024 NXP * */ @@ -2504,11 +2504,15 @@ static int dpaa_sec_detach_rxq(struct dpaa_sec_dev_private *qi, struct qman_fq *fq) { unsigned int i; + int ret; for (i = 0; i < RTE_DPAA_MAX_RX_QUEUE; i++) { if (&qi->inq[i] == fq) { - if (qman_retire_fq(fq, NULL) != 0) - DPAA_SEC_DEBUG("Queue is not retired\n"); + ret = qman_retire_fq(fq, NULL); + if (ret != 0) + DPAA_SEC_ERR("Queue %d is not retired" + " err: %d\n", fq->fqid, + ret); qman_oos_fq(fq); qi->inq_attach[i] = 0; return 0;