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 0F3C6A055C; Sun, 12 Jun 2022 16:11:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B793C40150; Sun, 12 Jun 2022 16:11:30 +0200 (CEST) Received: from out203-205-251-36.mail.qq.com (out203-205-251-36.mail.qq.com [203.205.251.36]) by mails.dpdk.org (Postfix) with ESMTP id 885A9400EF for ; Sun, 12 Jun 2022 16:11:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1655043084; bh=IuZilVLRSpN49AXYFVVbDtuB8yKyxIMknFGBVyVo5BY=; h=From:To:Cc:Subject:Date; b=UfDcpIWdXUf+URio0eoJpFt6Twf1JIZJFNLES/J6iiZL4DOdEDSqLDrIDaYcfVUC0 tv7e28bEc3FFTpuUHec7Nn6Sp24JZ7zFtcoDdrLgeLepel2neJAwhfmxf5R8+73Pl6 UbnA6jOG/awbLnmC9c6OWzWvBpFlhf3nb5JsW3Og= Received: from localhost.localdomain ([202.192.80.113]) by newxmesmtplogicsvrszc8.qq.com (NewEsmtp) with SMTP id 26C0A2B8; Sun, 12 Jun 2022 22:09:44 +0800 X-QQ-mid: xmsmtpt1655042984t2na5vmjh Message-ID: X-QQ-XMAILINFO: MFWpArBVhhGTpwny4HXeMC7Xz/6u2X0Tb+Vu/ZRujUxbrfSITfizKmYxUfKMJ0 vhAC7/VDT9/S2UoX8bKdP/Q08OcDVrAjXvNeN6STtbp2ptamSWsHkvzykAPMv9OuNPkF2Ezkdd32 5ELQv3WhxtVyjx2DYSVhMeC/NVsee4IrX+9X9czcOD8xCC5j6YO6wPbNdudig4eUhr0pd0w53G3N kLiavIgPPLM1cA/hEtnSN6yr6fpKN/bCgEK3xDhxRowVz3K849Wj4yvbYpqVEIjHaYfDkuQL1Ctm hCeyLCivf4E1OTUVcS2hcGAvX6cHoU0+4VSCbDxIJEKFdUyWXe2W3UNLwFtcrQvWbunY0mOeSC7w IRYXSg3bNbmPZHZxVwW/v/tZqUHiJBCrbZDQhwNHxfp7rh9cgVAWbYWAlT+/lFdWxi+1gnDdavE+ U88s69i11lqWflx6yEGeVyqJ5qNs6Fzpv8nQX4of8LEHWDSGZpQ8TSbcIIL7P7lXt+Pvf2tvG0aK WnHva8HT+cxxdi1FGEu9RkPMexgKmVgeLtZafP0zOkkp33Fi700661QGmnp8Qdl27Y7u76KVSaBG ZJSnC8mwpVHvnXeblxlXXyXSU0Sj6OKIH3DCvSeNYIY81W2VAJiKAi7ObAuQHkkfdcxF8td3cmf3 Oo2x5OIeLdfuUnBXjQeOlPDnjnCDNj1IEWobVCeOOqbSbHk6eByZjlwzmnnGWQ04QrxYoJvAHaRo VzQjMjDoTT4yi0W1U4n5WrFNtK7DdwSGCP32DOvPXtplldcbwPgNLdI01u+ibxxRXVDNDeaU+X9V dKfacz8TCccgkaVqs0uKVdWGjveWqR4GK3pwW5RLQma1SydGOI2Ss1oYReI/pIqE5wUmFfo65VFu WoOSA5f5OPDOmQYyVFXR/3PSqE5ZvK4LWXnPzJEE2fwpzEX14mQnM= From: 835703180@qq.com To: viacheslavo@nvidia.com Cc: dev@dpdk.org, newsky647 <835703180@qq.com> Subject: [PATCH] vdpa/mlx5: return correct error code after rte_intr_instance_alloc failed Date: Sun, 12 Jun 2022 22:09:13 +0800 X-OQ-MSGID: <20220612140913.321-1-835703180@qq.com> X-Mailer: git-send-email 2.35.1.windows.2 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: newsky647 <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: newsky647 <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)) -- 2.35.1.windows.2