ethdev: fix for compiler warning when vtune profiling is on
PATCH v5 1/1 ethdev: fix for compiler warning when vtune profiling is on
From: Eugeny Parshutin <[email protected]>
Add the previous prototype for the 'profile_hook_rx_burst_cb' function to fix the compiler warning when the DPDK is built with 'RTE_ETHDEV_PROFILE_WITH_VTUNE' config option enabled:/home/dpdk/lib/librte_ethdev/ethdev_profile.c:17:1: warning:
no previous prototype for profile_hook_rx_burst_cb [-Wmissing-prototypes]
---
v2: Fix the commit message
v3: Fix the check-git-log.sh warnings:
- make headline shorter
- add 'Fixes' tag
v4: Adapt 'Fixes' section to commit message guidelines
v5: Solve review comments:
- add the 'Cc: [email protected]' tag
- move the function parameter list one line up
- remove '__rte_unused' tag from params type
--- lib/librte_ethdev/ethdev_profile.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/librte_ethdev/ethdev_profile.h +9 -0
@@ -24,4 +24,13 @@int __rte_eth_dev_profile_init (uint16_t port_id,struct rte_eth_dev *dev); +#ifdef RTE_ETHDEV_PROFILE_WITH_VTUNE + +uint16_t +profile_hook_rx_burst_cb (uint16_t port_id,uint16_t queue_id, +struct rte_mbuf *pkts[],uint16_t nb_pkts, +uint16_t max_pkts,void *user_param); + +#endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */ +#endif
Signature · 1 line
2.17.1
Quoted 8 lines · On 4/6/2020 7:27 PM, [email protected] wrote:
From: Eugeny Parshutin <[email protected]>
Add the previous prototype for the '
profile_hook_rx_burst_cb' function to fix the compiler warning when the DPDK is built with 'RTE_ETHDEV_PROFILE_WITH_VTUNE' config option enabled:/home/dpdk/lib/librte_ethdev/ethdev_profile.c:17:1: warning:
no previous prototype forprofile_hook_rx_burst_cb[-Wmissing-prototypes]
Quoted 4 lines
Fixes 2c1bbab7f09d ("ethdev: change vtune profiling approach")Signed-off-by Eugeny Parshutin <[email protected]>
Applied to dpdk-next-net/master, thanks.