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 9F328A0C46; Tue, 31 Aug 2021 15:41:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68D084013F; Tue, 31 Aug 2021 15:41:07 +0200 (CEST) Received: from mail-m973.mail.163.com (mail-m973.mail.163.com [123.126.97.3]) by mails.dpdk.org (Postfix) with ESMTP id B13EF40041; Tue, 31 Aug 2021 15:41:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=AwgV5 oTZA2jr/uuZnSRpubGgSgrYW1/AqI+hxCBzbwg=; b=DOazItYst2M9Mbreu75tw tfw1MCuHpuB/4z7BAAH0ZVRBUP8j727GvdUSJO6NHi7hm2O7U2IHzgyt+Wkv5mXB gwRDKNvFWJ62lxcL/NCuclX4x8LgavTmYTg17envnPzzqhG1tmnAuYu+Z3IZwh77 +n3xYkEcYcF8hIKQ3hnIjQ= Received: from localhost.localdomain (unknown [124.160.214.152]) by smtp3 (Coremail) with SMTP id G9xpCgDHWrBqMS5hG7UNFA--.8385S2; Tue, 31 Aug 2021 21:41:00 +0800 (CST) From: Qiming Chen To: dev@dpdk.org Cc: haiyue.wang@intel.com, Qiming Chen , stable@dpdk.org Date: Tue, 31 Aug 2021 21:40:17 +0800 Message-Id: <20210831134017.8060-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: G9xpCgDHWrBqMS5hG7UNFA--.8385S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZF1kWrWrZF4rKr13tryDtrb_yoW8Gr4kpF s7KF1fAry8XFsFgrW3Xa1rWryak3y0qr4DJrWIk34Uu34UZr1vgr1DGa40qw1vkrWkZF17 ZF4jyr4DCanxAaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jmwZcUUUUU= X-Originating-IP: [124.160.214.152] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBZwIAoFet3w+jaQABsk Subject: [dpdk-dev] [PATCH] net/ixgbe: fix queue resource leak 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 Sender: "dev" In the ixgbevf_dev_start function, after initializing the rxtx queue, if an exception occurs in the subsequent function, the rxtx queue needs to be released. The patch solves the problem of queue resource leakage. Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF") Cc: stable@dpdk.org Signed-off-by: Qiming Chen --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3fd3249150..7d3a821300 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5367,8 +5367,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) * now only one vector is used for Rx queue */ intr_vector = 1; - if (rte_intr_efd_enable(intr_handle, intr_vector)) + if (rte_intr_efd_enable(intr_handle, intr_vector)) { + ixgbe_dev_clear_queues(dev); return -1; + } } if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) { @@ -5378,6 +5380,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) if (intr_handle->intr_vec == NULL) { PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues" " intr_vec", dev->data->nb_rx_queues); + ixgbe_dev_clear_queues(dev); return -ENOMEM; } } -- 2.30.1.windows.1