patches for DPDK stable branches
 help / color / mirror / Atom feed
From: chenqiming_huawei@163.com
To: dev@dpdk.org
Cc: beilei.xing@intel.com, Qiming Chen <chenqiming_huawei@163.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/i40e: fix mbuf resource leakage problem
Date: Sat, 21 Aug 2021 15:22:20 +0800	[thread overview]
Message-ID: <20210821072220.5107-1-chenqiming_huawei@163.com> (raw)

From: Qiming Chen <chenqiming_huawei@163.com>

In the i40evf_dev_rx_queue_start function, when the function
i40evf_switch_queue returns failed, the previously requested mbuf resource
is not released.

Fixes: 74b7496b0cb3 ("net/i40e: remove redundant queue id checks")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 0cfe13b7b2..003d41373b 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1822,6 +1822,7 @@ i40evf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	/* Ready to switch the queue on */
 	err = i40evf_switch_queue(dev, TRUE, rx_queue_id, TRUE);
 	if (err) {
+		i40e_rx_queue_release_mbufs(rxq);
 		PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
 			    rx_queue_id);
 		return err;
-- 
2.30.1.windows.1


                 reply	other threads:[~2021-08-21  7:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210821072220.5107-1-chenqiming_huawei@163.com \
    --to=chenqiming_huawei@163.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).