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 3E4E84601D; Wed, 8 Jan 2025 13:14:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB6D64014F; Wed, 8 Jan 2025 13:14:34 +0100 (CET) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 38483400D6 for ; Wed, 8 Jan 2025 13:14:33 +0100 (CET) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 508CDs0o000840; Wed, 8 Jan 2025 04:14:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=QTQurfggbqV0HQSwSs+lBnx 0lXYys7ca7g6/wJg3msc=; b=ZDMY3oW2mtByWMnCsp54YCTet5hoO2jnIJbzlOI XQZi/+Qf3BQLQoOLcyVPLKHXhFUpN8cUtuC693eyDY1ziI6jHPQttoUq956FEjei GjVTgN+PUi1sur/ZFQSwOsCmQ8GffDEvTEx4bzi5ywnYYNHiUaYg4qbFf39SGDxB jpGeld06HNSdJBUj0uoSX+ahd5MqvQSxxWDxbQrdxTrFoKQQ/joHWovs9kgKDUVE /GnTOJncBTOdf1Vn2nGRYXO2WiJHcVNKOo6+4x+22tRkzPQTP71qPY8/PFvBNGn2 tGNSHuou/DglV4hNleQtki9Co0aRChREb2s4fnT9wmahusg== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 441s69r01g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jan 2025 04:14:32 -0800 (PST) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 Jan 2025 04:14:31 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 8 Jan 2025 04:14:31 -0800 Received: from cavium-Super-Server.. (unknown [10.28.35.35]) by maili.marvell.com (Postfix) with ESMTP id 2F6283F7091; Wed, 8 Jan 2025 04:14:29 -0800 (PST) From: Rajesh Mudimadugula To: CC: , Rajesh Mudimadugula Subject: [PATCH] crypto/virtio: return proper error in session fail Date: Wed, 8 Jan 2025 17:44:27 +0530 Message-ID: <20250108121427.3715-1-rmudimadugul@marvell.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: xmxUH7J1wwpliyB3KDuuDJCxCaKqX0Ag X-Proofpoint-ORIG-GUID: xmxUH7J1wwpliyB3KDuuDJCxCaKqX0Ag X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 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 Return relevant error code when crypto session configure fails. Signed-off-by: Rajesh Mudimadugula --- drivers/crypto/virtio/virtio_cryptodev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index 98415af123..ebb53cd483 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1373,6 +1373,7 @@ virtio_crypto_sym_configure_session( } break; default: + ret = -ENOTSUP; VIRTIO_CRYPTO_SESSION_LOG_ERR( "Unsupported operation chain order parameter"); goto error_out; @@ -1380,7 +1381,7 @@ virtio_crypto_sym_configure_session( return 0; error_out: - return -1; + return ret; } static void -- 2.34.1