On Sat, 3 Sep 2016 00:31:50 +0800 Linzhe Lee <slayercat.subscription at 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?