DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] kni: fix kni rx fifo producer synchronization
@ 2018-08-09 10:23 Kiran Kumar
  2018-08-09 11:30 ` Ferruh Yigit
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Kiran Kumar @ 2018-08-09 10:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Kiran Kumar

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 <kkokkilagadda@caviumnetworks.com>
---
 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-09-19  5:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 10:23 [dpdk-dev] [PATCH] kni: fix kni rx fifo producer synchronization Kiran Kumar
2018-08-09 11:30 ` Ferruh Yigit
2018-08-16  6:52   ` Jerin Jacob
2018-08-16 12:28     ` Ferruh Yigit
2018-08-16  9:01 ` Jerin Jacob
2018-08-16  9:55 ` [dpdk-dev] [PATCH v2] kni: fix kni Rx " Kiran Kumar
2018-08-27 14:07   ` Ferruh Yigit
2018-08-27 15:40     ` Gavin Hu
2018-08-28 10:43       ` Kokkilagadda, Kiran
2018-08-28 10:51         ` Kokkilagadda, Kiran
2018-08-28 19:30         ` Gavin Hu
2018-08-29  4:59           ` Honnappa Nagarahalli
2018-08-29  5:49             ` Kokkilagadda, Kiran
2018-08-29  7:34               ` Ola Liljedahl
2018-08-29  8:28                 ` Jerin Jacob
2018-08-29  8:47                   ` Ola Liljedahl
2018-08-29  8:57                     ` Jerin Jacob
2018-09-13 17:40                       ` Honnappa Nagarahalli
2018-09-13 17:51                         ` Jerin Jacob
2018-09-13 23:45                           ` Honnappa Nagarahalli
2018-09-14  2:45                             ` Jerin Jacob
2018-09-18 15:53                               ` Ferruh Yigit
2018-09-19  5:37                                 ` Honnappa Nagarahalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).