Re: [dpdk-dev] [PATCH] nfp: avoid modulo operations for handling ring wrapping

2016-12-23 Thread Ferruh Yigit
On 12/19/2016 4:13 PM, Alejandro Lucero wrote: > Having those modulo operations implies costly instructions execution, > what can be avoided with conditionals and unlikely clauses. > > This change makes the software ring read and write indexes to be now > always within the ring size which has to b

[dpdk-dev] [PATCH] nfp: avoid modulo operations for handling ring wrapping

2016-12-19 Thread Alejandro Lucero
Having those modulo operations implies costly instructions execution, what can be avoided with conditionals and unlikely clauses. This change makes the software ring read and write indexes to be now always within the ring size which has to be handled properly. The main problem is when write pointe