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?



Thanks a lot.



Regards,



Yuyong







-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, September 8, 2017 3:08 PM
To: Yuyong Zhang <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-users] compile warning in dpdk lib header files "error: 
inlining failed in call .... call is unlikely and code size would grow"



On Fri, 8 Sep 2017 18:45:52 +0000

Yuyong Zhang 
<[email protected]<mailto:[email protected]>> wrote:



> Hi,

>

>

>

> I got lots of compile warning when integrating dpdk library such as:

>

>

>

> : error: inlining failed in call to ‘rte_mempool_ops_dequeue_bulk.part.1’: 
> call is unlikely and code size would grow [-Werror=inline]

>

>

>

> : error: inlining failed in call to ‘rte_pktmbuf_free": call is unlikely and 
> code size would grow [-Werror=inline]

>

>

>

> Because company policy strictly enforces "waring as error", I have to fix 
> those issues.



Turn off the warning, or fix the policy.



DPDK does lots of inlining and in some cases the code will be used in unlikely 
branchs.

Reply via email to