DPDK patches and discussions
 help / color / mirror / Atom feed
From: Igor Russkikh <irusskikh@marvell.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, Rasesh Mody <rmody@marvell.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Subject: Re: [dpdk-dev] [EXT] Re: [RFC PATCH] app/testpmd: tx pkt clones parameter in flowgen
Date: Fri, 25 Sep 2020 11:44:51 +0300	[thread overview]
Message-ID: <693fb7a7-4109-66c2-e566-a7f25e2b5813@marvell.com> (raw)
In-Reply-To: <20200924075647.3e160c0b@hermes.lan>


>> +		} else {
>> +			nb_clones--;
>> +		}
>> +		pkts_burst[nb_pkt] = pkt;
>>  
>>  		next_flow = (next_flow + 1) % cfg_n_flows;
>>  	}
> 
> 
> This doesn't look safe. You can't just send same mbuf N times without
> incrementing
> the reference count.

Hi Stephen,

You are right, of course we need refcnt increment here.

It looks like it worked for me, because occasionally its possible to execute
rte_pktmbuf_free multiple times over mbuf with refcnt==1 without any immediate
side effects.

Will repost.

Thanks,
  Igor

      reply	other threads:[~2020-09-25  8:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 11:34 [dpdk-dev] " Igor Russkikh
2020-09-24 14:56 ` Stephen Hemminger
2020-09-25  8:44   ` Igor Russkikh [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=693fb7a7-4109-66c2-e566-a7f25e2b5813@marvell.com \
    --to=irusskikh@marvell.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=rmody@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=wenzhuo.lu@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).