[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-03 Thread Ananyev, Konstantin
Hi, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Linzhe Lee > Sent: Saturday, September 3, 2016 3:05 AM > To: Stephen Hemminger > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronizatio

[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-03 Thread Linzhe Lee
yes,stephen. my config file here: http://pastebin.com/N0RKGArh 2016-09-03 0:51 GMT+08:00 Stephen Hemminger : > On Sat, 3 Sep 2016 00:31:50 +0800 > Linzhe Lee wrote: > >> Thanks for reply, Stephen. >> >> >> >> I'm in x86-64, my cpu is `Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz`. >> >> >> >> When

[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-03 Thread Linzhe Lee
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 whe

[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-02 Thread lilinzhe
From: ??? chagne atomic ref update to always call atomic_add when mbuf is allocated by cpu1 and freed by cpu2. cpu1 cache may not be updated by such a set operation. causes refcnt reads incorrect values. --- lib/librte_mbuf/rte_mbuf.h | 16 ++-- 1 file changed, 6 insertions(+), 10

[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-02 Thread Stephen Hemminger
On Sat, 3 Sep 2016 00:31:50 +0800 Linzhe Lee 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 allocat

[dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization

2016-09-02 Thread Stephen Hemminger
On Fri, 2 Sep 2016 13:25:06 +0800 lilinzhe wrote: > From: ??? > > chagne atomic ref update to always call atomic_add > > when mbuf is allocated by cpu1 and freed by cpu2. cpu1 cache may not be > updated by such a set operation. > causes refcnt reads incorrect values. What architecture are y