DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Linzhe Lee <slayercat.subscription@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization
Date: Fri, 2 Sep 2016 09:51:43 -0700	[thread overview]
Message-ID: <20160902095143.117482f0@xeon-e3> (raw)
In-Reply-To: <CAK_yBkNMQHNG-bLci08HHiOSfcy5zAau6m19KJaVtBYNU_xhMg@mail.gmail.com>

On Sat, 3 Sep 2016 00:31:50 +0800
Linzhe Lee <slayercat.subscription@gmail.com> wrote:

> Thanks for reply, Stephen.
> 
> 
> 
> I'm in x86-64, my cpu is `Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz`.
> 
> 
> 
> When allocation mbuf in program1, and transfer it to program2 for free
> via ring, the program1 might meet assert in allocate mbuf sometimes.
> (`RTE_ASSERT(rte_mbuf_refcnt_read(m) == 0);`)
> 
> 
> 
> but when I using gdb to check it, the refcnt field of mbuf is already
> zero. so I believe the problem came from the cache line problem or
> incorrect optimization.
> 
> 
> 
> When apply this patch, the problem seems solved. I'm submitting it for
> your comments.

Are you sure you have REFCNT_ATOMIC set?

  reply	other threads:[~2016-09-02 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  5:25 lilinzhe
2016-09-02 16:12 ` Stephen Hemminger
2016-09-02 16:31   ` Linzhe Lee
2016-09-02 16:51     ` Stephen Hemminger [this message]
2016-09-03  2:05       ` Linzhe Lee
2016-09-03 22:52         ` Ananyev, Konstantin

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=20160902095143.117482f0@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=slayercat.subscription@gmail.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).