DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: wangyunjian <wangyunjian@huawei.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "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 08:45:26 +0100	[thread overview]
Message-ID: <6b2b2643-756b-c977-ab90-63dc971341ab@intel.com> (raw)
In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60CF60E87@DGGEMM533-MBX.china.huawei.com>

On 4/10/2020 2:41 AM, wangyunjian wrote:
>> -----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.

+1. 'mubf' here is the output of the 'rte_gso_segment()', the number of mbuf
application sent is 1.

> 
>> 		rte_pktmbuf_free_bulk(mbuf, num_packets);
> 
> Thanks for your suggestion, will include it in next version.
> 
> Yunjian
>> 		break;
>> 	}
> 


      reply	other threads:[~2020-04-10  7:45 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
2020-04-10  7:45         ` Ferruh Yigit [this message]

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=6b2b2643-756b-c977-ab90-63dc971341ab@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=keith.wiles@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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).