From: wangyunjian <wangyunjian@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"keith.wiles@intel.com" <keith.wiles@intel.com>,
"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
xudingke <xudingke@huawei.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/5] net/tap: fix mbuf double free when writev fails
Date: Fri, 10 Apr 2020 01:41:19 +0000 [thread overview]
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60CF60E87@DGGEMM533-MBX.china.huawei.com> (raw)
In-Reply-To: <20200409075124.018fd49e@hermes.lan>
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, April 9, 2020 10:51 PM
> To: wangyunjian <wangyunjian@huawei.com>
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>; dev@dpdk.org;
> keith.wiles@intel.com; Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/5] net/tap: fix mbuf double
> free when writev fails
>
> On Thu, 9 Apr 2020 08:03:23 +0000
> wangyunjian <wangyunjian@huawei.com> wrote:
>
> > error = tap_write_mbufs(txq, num_mbufs, mbuf,
> > &num_packets, &num_tx_bytes); if (error == -1) {
> > txq->stats.errs++;
> > /* free tso mbufs */
> > for (j = 0; j < ret; j++)
> > rte_pktmbuf_free(mbuf[j]);
> > break;
> > }
>
> There is a free bulk, and normally each buf counts against errors.
>
> if (error == -1) {
> txq->stats.errs += num_packets;
I think to consider only the original packet number, not sent packets.
> rte_pktmbuf_free_bulk(mbuf, num_packets);
Thanks for your suggestion, will include it in next version.
Yunjian
> break;
> }
next prev parent reply other threads:[~2020-04-10 1:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 4:22 [dpdk-dev] " wangyunjian
2020-04-07 12:34 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-04-09 8:03 ` wangyunjian
2020-04-09 9:52 ` Ferruh Yigit
2020-04-09 12:53 ` wangyunjian
2020-04-09 13:03 ` Ferruh Yigit
2020-04-09 14:51 ` Stephen Hemminger
2020-04-10 1:41 ` wangyunjian [this message]
2020-04-10 7:45 ` Ferruh Yigit
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=34EFBCA9F01B0748BEB6B629CE643AE60CF60E87@DGGEMM533-MBX.china.huawei.com \
--to=wangyunjian@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerry.lilijun@huawei.com \
--cc=keith.wiles@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=xudingke@huawei.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).