I need to add the same write barrier change in kernel side kni_fifo_put. I will add it and will send v3.
________________________________ From: Kokkilagadda, Kiran Sent: Tuesday, August 28, 2018 4:13:59 PM To: Gavin Hu; Ferruh Yigit; Jacob, Jerin Cc: dev@dpdk.org; Honnappa Nagarahalli Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization In this instance there won't be any problem, as until the value of fifo->write changes, this loop won't get executed. As of now we didn't see any issue with it and for performance reasons, we don't want to keep read barrier. ________________________________ From: Gavin Hu <gavin...@arm.com> Sent: Monday, August 27, 2018 9:10 PM To: Ferruh Yigit; Kokkilagadda, Kiran; Jacob, Jerin Cc: dev@dpdk.org; Honnappa Nagarahalli Subject: RE: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization External Email This fix is not complete, kni_fifo_get requires a read fence also, otherwise it probably gets stale data on a weak ordering platform. > -----Original Message----- > From: dev <dev-boun...@dpdk.org> On Behalf Of Ferruh Yigit > Sent: Monday, August 27, 2018 10:08 PM > To: Kiran Kumar <kkokkilaga...@caviumnetworks.com>; > jerin.ja...@caviumnetworks.com > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer > synchronization > > On 8/16/2018 10:55 AM, Kiran Kumar wrote: > > With existing code in kni_fifo_put, rx_q values are not being updated > > before updating fifo_write. While reading rx_q in kni_net_rx_normal, > > This is causing the sync issue on other core. So adding a write > > barrier to make sure the values being synced before updating fifo_write. > > > > Fixes: 3fc5ca2f6352 ("kni: initial import") > > > > Signed-off-by: Kiran Kumar <kkokkilaga...@caviumnetworks.com> > > Acked-by: Jerin Jacob <jerin.ja...@caviumnetworks.com> > > Acked-by: Ferruh Yigit <ferruh.yi...@intel.com> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.