Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3

2017-03-22 Thread Ed Czeck
Hi Stephen, The issue is not ordering or synchronizing IO read and write operations, so memory barriers are not the solution and will not address the compile optimizations which the volatile qualifier avoids. The linux kernel guide states: "The volatile storage class was originally meant for memo

Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3

2017-03-21 Thread Stephen Hemminger
On Tue, 21 Mar 2017 20:13:48 -0400 Ed Czeck wrote: > Hi Stephen, > > Yes I understand the paranoid issue of volatile modifier, which is the > reason it was coded in this manner. > > The struct with volatile are memory mapped IO structures. These structure > are not instantiated in memory and h

Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3

2017-03-21 Thread Ed Czeck
Hi Stephen, Yes I understand the paranoid issue of volatile modifier, which is the reason it was coded in this manner. The struct with volatile are memory mapped IO structures. These structure are not instantiated in memory and hence do not incur concurrent (host) software access. The a vast ma

Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3

2017-03-21 Thread Stephen Hemminger
On Tue, 21 Mar 2017 17:43:36 -0400 Ed Czeck wrote: > + volatile uint32_t ctrl; > + volatile uint32_t stats_clear; > + volatile uint32_t cplh_max; You are using a lot of 'volatile' in this driver. In general volatile should be reserved for known software shared data structures rather

[dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3

2017-03-21 Thread Ed Czeck
Provide C-level interface for Arkville's internal HW resources mpu, pktdir, and rqp modules Signed-off-by: Ed Czeck --- drivers/net/ark/Makefile | 3 + drivers/net/ark/ark_mpu.c| 181 +++ drivers/net/ark/ark_mpu.h| 143 +++