DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: wangyunjian <wangyunjian@huawei.com>
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: Thu, 9 Apr 2020 07:51:24 -0700	[thread overview]
Message-ID: <20200409075124.018fd49e@hermes.lan> (raw)
In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60CF5FDB2@DGGEMM533-MBX.china.huawei.com>

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;
		rte_pktmbuf_free_bulk(mbuf, num_packets);
		break;
	}


  parent reply	other threads:[~2020-04-09 14:51 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 [this message]
2020-04-10  1:41       ` wangyunjian
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=20200409075124.018fd49e@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=keith.wiles@intel.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --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).