[dpdk-users] compile warning in dpdk lib header files "error: inlining failed in call .... call is unlikely and code size would grow"

Yuyong Zhang yuyong.zhang at casa-systems.com
Fri Sep 8 21:15:51 CEST 2017


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:stephen at networkplumber.org]
Sent: Friday, September 8, 2017 3:08 PM
To: Yuyong Zhang <yuyong.zhang at casa-systems.com>
Cc: users at dpdk.org
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 <yuyong.zhang at casa-systems.com<mailto:yuyong.zhang at casa-systems.com>> 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.


More information about the users mailing list