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 271CCA0093; Tue, 14 Jun 2022 15:37:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBAFF40DDD; Tue, 14 Jun 2022 15:37:11 +0200 (CEST) Received: from out162-62-57-49.mail.qq.com (out162-62-57-49.mail.qq.com [162.62.57.49]) by mails.dpdk.org (Postfix) with ESMTP id 67CCD40A81 for ; Tue, 14 Jun 2022 15:37:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1655213828; bh=61Y854edpmLqxkk9A9DKSLtiISqpt620LiSSxiLMDfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ab0cyA4jKDq84PXN5rGdGUebzInTZNR4xMTzVBaQhg3r1PQxvET+LFtoM3+UG2HmG iMtY1znQiqD0/sSou7cmw1OzDOp4CJyyHGn4+4mhmTzMfuRmqOGtxDbaKXWIpiCQDv m/eFO8nlrqFhzMllXQusXKHXFyj371N/1O+EXh9k= Received: from localhost.localdomain ([183.236.0.87]) by newxmesmtplogicsvrsza30.qq.com (NewEsmtp) with SMTP id 944BB862; Tue, 14 Jun 2022 21:37:04 +0800 X-QQ-mid: xmsmtpt1655213824t8ifjcjgn Message-ID: X-QQ-XMAILINFO: Mu4fz8q1FCY3XTaKmAqVxbN4ghi5aFr0WAtMCspFvvoNkP+P4qR2FEm75oIbGg egnTFxFeojs5FrmNFNVhoHKroUBseXndvl5VGLqjxHUZpjE30X/CmqD4wQhC5uo6zu4s3TVlUuT1 vPRTmPlG41HWGjgMndgvo6qa/miBVL8pupn/4+FEjvYDoF0OrR6oDx3Xysvb2mbcMnPQPeFB5Dua bLs4ansgP2Dcskt6Os+7mOvSfpSfEC/te2sk8yNgF661nocOPqSpUqeTPUcPQS2nVLv9KNptUNKA +OjepDnw6NQHPpwaMs9SxF9EKxQMhCAL7wAtSCAmBSnGWZT9wtJ6Fuu+u7saL/4MgcQTkYGojAvs pRY12pdxe1HY/kLhLQXw6ok/kbHEVJ0BoaA0wqjMLbX4RFiHO/j7d5IY1orx+o8Arfeewfj/4XAO 3EkUophUmSqaBhE3u8lNQPm+1m4VFUFlEdlRxE/4aVUr/tTCYS2QahLf3P3ReJXo51hId3hNfxqn 8co8mgN80nPRqMXaznYU3tPyVP4nAJdohQUj7+RNN4EK4Ph9RL+A+ebeVa0tXY8gunwZjcjPaO++ nGKugBNGHT77qDOnf70NlEG5lC74laN8zgqhLiuDDcpb+jHm4O1/OYjFFCFMz0dfCZzmx0cbFDtB KHKaAUp8htplYfhwBx6x92ZhJ6c3sqSFI31ehS3l6xN1S86uIfN8O0nJcO2tjG8pih12c5yxxgls Ajd1pu+6JzcBPoUgKPADE+QiUXTNVbjqsYMdDfSHNY/iEbA+dZu2P2FwA1ZipWBCppbRRjtmD4uc W/uiNOlzohNpjm/R/hRZxWoPgRHlw9BOeozHAUXA+RCHYYpQajAXHpJ57hLaHhdUkZ8ShCg9lMU8 aS5jf9aRCHgdRWs+XMGG1z33/uaSpgkB7N1y/zGz1D From: 835703180@qq.com To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, Shiqi Liu <835703180@qq.com> Subject: [PATCH V2] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed Date: Tue, 14 Jun 2022 21:36:33 +0800 X-OQ-MSGID: <20220614133633.1634-1-835703180@qq.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <640b6f87-fa5f-4a94-3228-a2c880861a53@redhat.com> References: <640b6f87-fa5f-4a94-3228-a2c880861a53@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Shiqi Liu <835703180@qq.com> After function rte_intr_instance_alloc failed, we should return ENOMEM for error code. Fixes: 5fe068bf7a2 ("vdpa/mlx5: reuse resources in reconfiguration") Signed-off-by: Shiqi Liu <835703180@qq.com> --- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c index 7167a98db0..6223afaae8 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c @@ -395,6 +395,7 @@ mlx5_vdpa_err_event_setup(struct mlx5_vdpa_priv *priv) rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED); if (priv->err_intr_handle == NULL) { DRV_LOG(ERR, "Fail to allocate intr_handle"); + rte_errno = ENOMEM; goto error; } if (rte_intr_fd_set(priv->err_intr_handle, priv->err_chnl->fd)) -- To Maxime, I am so sorry too late to reply your comment.My name is Shiqi Liu. I got stuck in how to reply the comment before.Now, it seenms to be ok!Maybe there will be some mistakes I have taken , when I reply,please tell me how to do it correctly! Thanks, Shiqi Liu