Re: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-28 Thread Gavin Hu
-Original Message- From: Andy Green Sent: Monday, May 28, 2018 4:47 PM To: Gavin Hu ; dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code On 05/28/2018 04:15 PM, Gavin Hu wrote: > do { > +const uint32_t cons_tail = r->cons.tail; > + >

Re: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-28 Thread Andy Green
On 05/28/2018 04:15 PM, Gavin Hu wrote: do { +const uint32_t cons_tail = r->cons.tail; + /* Reset n to the initial burst count */ n = max; *old_head = __atomic_load_n(&r->prod.head, __ATOMIC_ACQUIRE); -const uint32_t cons_tail = r->cons.tail; + [Gavin Hu] The ACQUIRE and RELEASE pai

Re: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-28 Thread Gavin Hu
Hi Andy, See my inline comments. -Gavin -Original Message- From: dev On Behalf Of Andy Green Sent: Monday, May 28, 2018 10:29 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code On gcc 5.4.0 / native aarch64 from Ubuntu 16.04: /home/agreen/lagopus/src

[dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-27 Thread Andy Green
On gcc 5.4.0 / native aarch64 from Ubuntu 16.04: /home/agreen/lagopus/src/dpdk/build/include/ rte_ring_c11_mem.h: In function '__rte_ring_move_prod_head': /home/agreen/lagopus/src/dpdk/build/include/ rte_ring_c11_mem.h:69:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after