From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] kni: fix kni rx fifo producer synchronization Date: Thu, 16 Aug 2018 14:31:17 +0530 Message-ID: <20180816090115.GA20462@jerin> References: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ferruh.yigit@intel.com, dev@dpdk.org To: Kiran Kumar Return-path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730050.outbound.protection.outlook.com [40.107.73.50]) by dpdk.org (Postfix) with ESMTP id 80D492674 for ; Thu, 16 Aug 2018 11:04:09 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Thu, 9 Aug 2018 15:53:53 +0530 > From: Kiran Kumar > To: ferruh.yigit@intel.com > CC: dev@dpdk.org, Kiran Kumar > Subject: [dpdk-dev] [PATCH] kni: fix kni rx fifo producer synchronization > X-Mailer: git-send-email 2.7.4 > > External Email > > 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") > Please fix following check patch issue. Wrong headline lowercase: kni: fix kni rx fifo producer synchronization and Cc stable@dpdk.org With above change: Acked-by: Jerin Jacob > Signed-off-by: Kiran Kumar > --- > lib/librte_kni/rte_kni_fifo.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_kni/rte_kni_fifo.h b/lib/librte_kni/rte_kni_fifo.h > index ac26a8c..4d6b33e 100644 > --- a/lib/librte_kni/rte_kni_fifo.h > +++ b/lib/librte_kni/rte_kni_fifo.h > @@ -39,6 +39,7 @@ kni_fifo_put(struct rte_kni_fifo *fifo, void **data, unsigned num) > fifo->buffer[fifo_write] = data[i]; > fifo_write = new_write; > } > + rte_smp_wmb(); > fifo->write = fifo_write; > return i; > } > -- > 2.7.4 >