[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-18 Thread Jerin Jacob
On Fri, Jul 15, 2016 at 10:34:40AM +, Ananyev, Konstantin wrote: > Hi Jerin, > > > > > > > > > > > The CPU also > > > > knows already the value that will be written to cons.tail and that > > > > value does not depend on the previous read either. The CPU does not > > > > know we are planning t

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-15 Thread Jerin Jacob
On Thu, Jul 14, 2016 at 12:56:11PM +, Ananyev, Konstantin wrote: > > > > The CPU also > > knows already the value that will be written to cons.tail and that value > > does not depend on the previous read either. The CPU does not > > know we are planning to do a spinlock there, so it might do

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-15 Thread Ananyev, Konstantin
Hi Jerin, > > > > > > > The CPU also > > > knows already the value that will be written to cons.tail and that > > > value does not depend on the previous read either. The CPU does not know > > > we are planning to do a spinlock there, so it might do things > out-of-order without proper dependenci

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-15 Thread Kuusisaari, Juhamatti
Hi Konstantin, > Hi Juhamatti, > > > > > Hi Konstantin, > > > > > > > > > It is quite safe to move the barrier before DEQUEUE because > > > > > > > after the DEQUEUE there is nothing really that we would want > > > > > > > to protect > > > with a > > > > > read barrier. > > > > > > > > > > > > I

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-14 Thread Ananyev, Konstantin
Hi Juhamatti, > > Hi Konstantin, > > > > > > > It is quite safe to move the barrier before DEQUEUE because > > > > > > after the DEQUEUE there is nothing really that we would want > > > > > > to protect > > with a > > > > read barrier. > > > > > > > > > > I don't think so. > > > > > If you remo

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-14 Thread Kuusisaari, Juhamatti
Hi Konstantin, > > > > > It is quite safe to move the barrier before DEQUEUE because after > > > > > the DEQUEUE there is nothing really that we would want to protect > with a > > > read barrier. > > > > > > > > I don't think so. > > > > If you remove barrier after DEQUEUE(), that means on system

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-13 Thread Ananyev, Konstantin
pdk.org] On Behalf Of > > > > > > > > Juhamatti Kuusisaari > > > > > > > > Sent: Monday, July 11, 2016 11:21 AM > > > > > > > > To: dev at dpdk.org > > > > > > > > Subject: [dpdk-dev] [PATCH] lib: move rte_ring

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-13 Thread Kuusisaari, Juhamatti
amatti Kuusisaari > > > > > > > Sent: Monday, July 11, 2016 11:21 AM > > > > > > > To: dev at dpdk.org > > > > > > > Subject: [dpdk-dev] [PATCH] lib: move rte_ring read barrier > > > > > > > to correct location > > >

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-12 Thread Ananyev, Konstantin
t; Sent: Monday, July 11, 2016 11:21 AM > > > > > > To: dev at dpdk.org > > > > > > Subject: [dpdk-dev] [PATCH] lib: move rte_ring read barrier to > > > > > > correct location > > > > > > > > > > > > Fix the

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-12 Thread Ananyev, Konstantin
Hi Juhamatti, > > Hello, > > > > > > -Original Message- > > > > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti > > > > > Kuusisaari > > > > > Sent: Monday, July 11, 2016 11:21 AM > > > &g

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-12 Thread Kuusisaari, Juhamatti
Hello, > > > > -Original Message- > > > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti > > > > Kuusisaari > > > > Sent: Monday, July 11, 2016 11:21 AM > > > > To: dev at dpdk.org > > > > Subjec

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-12 Thread Kuusisaari, Juhamatti
Hello, > >>> -Original Message- > >>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti > >>> Kuusisaari > >>> Sent: Monday, July 11, 2016 11:21 AM > >>> To: dev at dpdk.org > >>> Subject: [dpd

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-11 Thread Olivier Matz
at dpdk.org >>> Subject: [dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct >>> location >>> >>> Fix the location of the rte_ring data dependency read barrier. >>> It needs to be called before accessing indexed data to ensure that the >>>

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-11 Thread Juhamatti Kuusisaari
Fix the location of the rte_ring data dependency read barrier. It needs to be called before accessing indexed data to ensure that the data itself is guaranteed to be correctly updated. See more details at kernel/Documentation/memory-barriers.txt section 'Data dependency barriers'. Signed-off-by:

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-11 Thread Ananyev, Konstantin
> Hi, > > > > -Original Message- > > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti > > > Kuusisaari > > > Sent: Monday, July 11, 2016 11:21 AM > > > To: dev at dpdk.org > > > Subject: [dpdk-dev] [PATC

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-11 Thread Kuusisaari, Juhamatti
Hi, > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti > > Kuusisaari > > Sent: Monday, July 11, 2016 11:21 AM > > To: dev at dpdk.org > > Subject: [dpdk-dev] [PATCH] lib: move rte_ring read barrier to

[dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct location

2016-07-11 Thread Ananyev, Konstantin
Hi , > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Juhamatti Kuusisaari > Sent: Monday, July 11, 2016 11:21 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH] lib: move rte_ring read barrier to correct > location > > Fix the