From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 030E7A046B for ; Fri, 28 Jun 2019 05:32:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9D9E449E0; Fri, 28 Jun 2019 05:32:39 +0200 (CEST) Received: from sonic301-1.consmr.mail.bf2.yahoo.com (sonic301-1.consmr.mail.bf2.yahoo.com [74.6.129.40]) by dpdk.org (Postfix) with ESMTP id 5B7C7378E for ; Fri, 28 Jun 2019 05:32:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1561692757; bh=xtfnvxwPIcSCdipehZxYNPiPbIRYYHZZ/EfFPuj4cPo=; h=Date:From:To:Subject:References:From:Subject; b=anygUEKMylncjOJqvXT4acbXlPEaZlkM7ApOI0yInotBWL/9s2PR5vnFlzz080Z0JQf8y6qf2ml1tPLOxj2ujOLrbC12jy9o5QQ50VjX98tRb9R958lxeyJZJjIZkWGYR5KUq3ctFdxLkMgqZ6GmNVfCeWcy+40POSXclArS+0SL3j6vRqm8Jphqxhv/fi7PcC5QUhSh+N2J0i47nrYHh2WDWIjd+64E3qF/oscuvrnl30oDmfKQUIIpRN/Ami/McJfeThpHSIz5pTUs7/ORDbkaUFssdPr0n3jKSRLHVwfjC+xWBhdGp+TdYD9uor1G75O4aD3Um9gxqpFJu6YhSw== X-YMail-OSG: jI7bz8sVM1mJM61.tlM9NbW3g1OuoJ7mER3BraaFXTBuu7XCrfNf9LGkci1h9qx F2LjthuMHBMrU1p0qoWLTWT3ZeA04X5BBfHYcMAFh82tnSmgY.m8yyuvu1cnnR2dEEog.dTOR8sW agEYQtuIfKXWKrz5.U29YcnkyiNJ9rMIEdnbSup_oDJeP7QtEK96UyNRJREaxdfFOXYDRuLJ.dcC ByCZr7bnEDPMXfcqiWszeu97jezcpuoAvqsh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; Fri, 28 Jun 2019 03:32:37 +0000 Date: Fri, 28 Jun 2019 03:32:11 +0000 (UTC) From: P Smith To: Dev Message-ID: <1405941610.58386.1561692731231@mail.yahoo.com> MIME-Version: 1.0 References: <1405941610.58386.1561692731231.ref@mail.yahoo.com> X-Mailer: WebService/1.1.13913 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Strange cache sync problem(?) with reading mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello all,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I am aware that this is some caching/sync= hronization problem but for some reason despite using the barrier macros it= does not seem to go away.What makes it go away though is to give a rte_del= ay of 100us and re-reading the value again like so: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cons_rx_buf =3D &rxr->rx_bu= f_ring[cons]; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mbuf =3D cons_rx_buf->mbuf; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rte_smp_mb(); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (mbuf =3D=3D NULL) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 int cnt =3D 0; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 RTE_LOG(ERR, PMD, "mbuf =3D NULL cons =3D %d\n", cons); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 do { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rte_delay_u= s(100); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cons_rx_buf= =3D &rxr->rx_buf_ring[cons]; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mbuf =3D co= ns_rx_buf->mbuf; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 } while(mbuf =3D=3D NULL && ++cnt <=3D 10); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 RTE_LOG(ERR, PMD, "mbuf =3D %p cnt =3D %d\n", mbuf, cnt); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } Invariably i see the 'mbuf =3D NULL' print and then post 1 iteration of the= while loop the 'mbuf' is not NULL (correct value as expected) and it moves= on smoothly....Clearly this seems like some cache synchronization issue an= d i thought the smp_wb() primitives should have solved it?=20 Any other better ways to fix this other than this rte_delay_us() ? ThanksSmith