Re: [dpdk-dev] [5/5] vhost: remove useless casts to volatile

2018-12-07 Thread Ilya Maximets
On 06.12.2018 19:59, Maxime Coquelin wrote: > Hi Ilya, > > On 12/5/18 2:52 PM, Ilya Maximets wrote: >> On 05.12.2018 12:49, Maxime Coquelin wrote: >>> Cast to volatile is done when reading avail index and writing >>> the used index. This would not be necessary if proper barriers >>> are used. >> >

Re: [dpdk-dev] [5/5] vhost: remove useless casts to volatile

2018-12-06 Thread Maxime Coquelin
Hi Ilya, On 12/5/18 2:52 PM, Ilya Maximets wrote: On 05.12.2018 12:49, Maxime Coquelin wrote: Cast to volatile is done when reading avail index and writing the used index. This would not be necessary if proper barriers are used. 'volatile' and barriers are not really connected. 'volatile' is

Re: [dpdk-dev] [5/5] vhost: remove useless casts to volatile

2018-12-05 Thread Ilya Maximets
On 05.12.2018 12:49, Maxime Coquelin wrote: > Cast to volatile is done when reading avail index and writing > the used index. This would not be necessary if proper barriers > are used. 'volatile' and barriers are not really connected. 'volatile' is the disabling of the compiler optimizations, whil