DPDK patches and discussions
 help / color / mirror / Atom feed
From: ZhangTengfei <zhangtengfei@oppo.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, ZhangTengfei <zhangtengfei@oppo.com>
Subject: [dpdk-dev] [PATCH] driver/net/pcap: fix fd leak
Date: Thu, 25 Feb 2021 18:07:50 +0800	[thread overview]
Message-ID: <20210225100749.526-1-zhangtengfei@oppo.com> (raw)

pcap file was opened when pcap vdev probed,
but was not closed where vdev removed.
This bug appears in dpdk-pdump

Signed-off-by: ZhangTengfei <zhangtengfei@oppo.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 90f5d75ea..fb01ea924 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1597,6 +1597,7 @@ pmd_pcap_remove(struct rte_vdev_device *dev)
        if (eth_dev == NULL)
                return 0; /* port already released */

+       eth_dev_stop(eth_dev);
        eth_dev_close(eth_dev);
        rte_eth_dev_release_port(eth_dev);

--
2.25.1

________________________________
OPPO

本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人使用(包含个人及群组)。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,请立即以电子邮件通知发件人并删除本邮件及其附件。

This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

             reply	other threads:[~2021-02-25 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 10:07 ZhangTengfei [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-25  8:59 ZhangTengfei

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=20210225100749.526-1-zhangtengfei@oppo.com \
    --to=zhangtengfei@oppo.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).