[dpdk-users] compile warning in dpdk lib header files "error: inlining failed in call .... call is unlikely and code size would grow"
yuyong.zhang at casa-systems.com
Fri Sep 8 20:45:52 CEST 2017
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.
I can have an option to use –Wno-error=inline in make file to suppress these warnings. However we are building data plane application, performance is one of the biggest requirements, thus another option is to modify header files such as in rte_mbuf.h to add __attribute__((always_inlie)) i.e adding:
static inline void rte_pktmbuf_free(struct rte_mbuf *m) __attribute__((always_inline));
static inline void rte_pktmbuf_free(struct rte_mbuf *m)
1. The assumptions is that Intel and others do a lot of performance testing on the DPDK, and there are specific functions that are always inlined already, is it on purpose for inline functions such as rte_pktmbuf_free not using always_inline?
2. Which one is better for performance: using –Wno-error=inline vs adding __attribute__((always_inline)) to warned inline function header files?
Any inputs are appreciated.
More information about the users