Skip to contentSkip to conversation

ethdev: fix for compiler warning when vtune profiling option is enabled

PATCH Superseded [email protected] 2 participants 3 messages Apr 1, 2020

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: fix for compiler warning when vtune profiling option is enabled

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]

---
 lib/librte_ethdev/ethdev_profile.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/librte_ethdev/ethdev_profile.h +10 -0
index 65031e6f3..b8c3c6848 100644
@@ -24,4 +24,14 @@
 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(
+	__rte_unused uint16_t port_id, __rte_unused uint16_t queue_id,
+	__rte_unused struct rte_mbuf *pkts[], uint16_t nb_pkts,
+	__rte_unused uint16_t max_pkts, __rte_unused void *user_param);
+
+#endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
+
 #endif
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 ethdev: fix for compiler warning when vtune profiling option is enabled

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

---
 lib/librte_ethdev/ethdev_profile.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/librte_ethdev/ethdev_profile.h +10 -0
index 65031e6f3..b8c3c6848 100644
@@ -24,4 +24,14 @@
 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(
+	__rte_unused uint16_t port_id, __rte_unused uint16_t queue_id,
+	__rte_unused struct rte_mbuf *pkts[], uint16_t nb_pkts,
+	__rte_unused uint16_t max_pkts, __rte_unused void *user_param);
+
+#endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
+
 #endif
Signature · 1 line
2.17.1
#2 lore raw

Hi Eugeny,

Quoted 47 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of [email protected]
Sent: Wednesday, April 1, 2020 8:26
To: Thomas Monjalon <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH v2] ethdev: fix for compiler warning when vtune profiling option is enabled

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

---
 lib/librte_ethdev/ethdev_profile.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/librte_ethdev/ethdev_profile.h +10 -0
index 65031e6f3..b8c3c6848 100644
@@ -24,4 +24,14 @@
 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(
+	__rte_unused uint16_t port_id, __rte_unused uint16_t queue_id,
+	__rte_unused struct rte_mbuf *pkts[], uint16_t nb_pkts,
+	__rte_unused uint16_t max_pkts, __rte_unused void
 *user_param);
+
+#endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
+
Quoted 3 lines

#endif
--
2.17.1

Could you please fix the check-git-log.sh warnings:

Headline too long:
ethdev: fix for compiler warning when vtune profiling option is enabled
Missing 'Fixes' tag:
ethdev: fix for compiler warning when vtune profiling option is enabled

Regards,
Alex