On 4/10/2020 2:41 AM, wangyunjian wrote:
>> -----Original Message-----
>> From: Stephen Hemminger [mailto:[email protected]]
>> Sent: Thursday, April 9, 2020 10:51 PM
>> To: wangyunjian <[email protected]>
>> Cc: Ferruh Yigit <[email protected]>; [email protected];
>> [email protected]; Lilijun (Jerry) <[email protected]>; xudingke
>> <[email protected]>; [email protected]
>> 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 <[email protected]> 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 via email to