On Fri, 8 Sep 2017 19:15:51 +0000
Yuyong Zhang <[email protected]> wrote:

> Thanks Stephen for the quick response.
> 
> 
> 
> For performance considerations, which one is better:
> 
> 
> 
> 1.     Use –Wno-error=inline to turn off the warning which compiler will not 
> do inline for the warned inline function
> 
> or
> 
> 2.     Modify dpdk header file to add __attribute__((always_inline)) to force 
> complier to always do inline for these functions.
> 
> 
> 
> I assume option-2 is better for performance, any suggestions?
> 

The unlikely() branches are all error cases, there is no reason they should 
impact performance.
In fact excessive inline can cause code to grow and larger code causes more 
instruction cache misses.

Just use option 1.  You obviously already changed the compile flags because the 
default
DPDK make files have macro WERROR which does not enable this.

Reply via email to