DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "chenqiming_huawei@163.com" <chenqiming_huawei@163.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Xing, Beilei" <beilei.xing@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix vf resource leakage problem
Date: Mon, 6 Sep 2021 01:47:51 +0000	[thread overview]
Message-ID: <a184eb9c1d8b4b90b2f24916941eab79@intel.com> (raw)
In-Reply-To: <20210821081426.5700-1-chenqiming_huawei@163.com>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of
> chenqiming_huawei@163.com
> Sent: Saturday, August 21, 2021 4:14 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Qiming Chen
> <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/i40e: fix vf resource leakage problem
> 
> From: Qiming Chen <chenqiming_huawei@163.com>
> 
> In the i40evf_dev_init function, when the MAC memory alloc fails, the
> previously initialized vf resource is not released, resulting in leakage.
> The patch calls the i40evf_uninit_vf function in the abnormal branch to release
> resources.
> 
> Fixes: 5c9222058df7 ("i40e: move to drivers/net/")
> 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 003d41373b..f64db72e9a 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1622,6 +1622,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
>  		PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to"
>  				" store MAC addresses",
>  				RTE_ETHER_ADDR_LEN * I40E_NUM_MACADDR_MAX);
> +		(void)i40evf_uninit_vf(eth_dev);
>  		return -ENOMEM;
>  	}
>  	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
> --
> 2.30.1.windows.1

The patch is not applied for main repo as i40evf will be removed, you can submit a fix to dpdk-stable directly.


  reply	other threads:[~2021-09-06  1:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  8:14 chenqiming_huawei
2021-09-06  1:47 ` Zhang, Qi Z [this message]
2021-09-15  1:27 ` Zhang, Qi Z
2021-09-15  8:25   ` Zhang, Qi Z

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=a184eb9c1d8b4b90b2f24916941eab79@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=chenqiming_huawei@163.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).