[1/3] eventdev: add rte prefix to function declaration

Message ID 20220929095748.12563-1-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/3] eventdev: add rte prefix to function declaration |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula Sept. 29, 2022, 9:57 a.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte` prefix to stop flush callback function pointer
declaration to avoid conflicts with application functions,
``eventdev_stop_flush_t`` is renamed to
``rte_eventdev_stop_flush_t``.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 lib/eventdev/eventdev_pmd.h          | 2 ++
 lib/eventdev/rte_eventdev.c          | 3 ++-
 lib/eventdev/rte_eventdev.h          | 9 ++++-----
 4 files changed, 8 insertions(+), 9 deletions(-)

--
2.25.1
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e3d609fd88..2826a38f03 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -173,9 +173,6 @@  Deprecation Notices
   Event will be one of the configuration fields,
   together with additional vector parameters.

-* eventdev: The function pointer declaration ``eventdev_stop_flush_t``
-  will be renamed to ``rte_eventdev_stop_flush_t`` in DPDK 22.11.
-
 * eventdev: The element ``*u64s`` in the structure ``rte_event_vector``
   is deprecated and will be replaced with ``u64s`` in DPDK 22.11.

diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index ca9e3f1875..066104b572 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -1315,6 +1315,8 @@  typedef int (*eventdev_eth_tx_adapter_queue_start)
 typedef int (*eventdev_eth_tx_adapter_queue_stop)
 	(uint8_t id, uint16_t eth_dev_id, uint16_t tx_queue_id);

+#define eventdev_stop_flush_t rte_eventdev_stop_flush_t
+
 /** Event device operations function pointer table */
 struct eventdev_ops {
 	eventdev_info_get_t dev_infos_get;	/**< Get device info. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index f6b7d0a139..db372a3d8c 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1325,7 +1325,8 @@  rte_event_dev_start(uint8_t dev_id)

 int
 rte_event_dev_stop_flush_callback_register(uint8_t dev_id,
-		eventdev_stop_flush_t callback, void *userdata)
+					   rte_eventdev_stop_flush_t callback,
+					   void *userdata)
 {
 	struct rte_eventdev *dev;

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index cd307643c1..86d656a08b 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -1023,8 +1023,8 @@  rte_event_dev_start(uint8_t dev_id);
 void
 rte_event_dev_stop(uint8_t dev_id);

-typedef void (*eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event,
-		void *arg);
+typedef void (*rte_eventdev_stop_flush_t)(uint8_t dev_id,
+					  struct rte_event event, void *arg);
 /**< Callback function called during rte_event_dev_stop(), invoked once per
  * flushed event.
  */
@@ -1053,9 +1053,8 @@  typedef void (*eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event,
  *
  * @see rte_event_dev_stop()
  */
-int
-rte_event_dev_stop_flush_callback_register(uint8_t dev_id,
-		eventdev_stop_flush_t callback, void *userdata);
+int rte_event_dev_stop_flush_callback_register(
+	uint8_t dev_id, rte_eventdev_stop_flush_t callback, void *userdata);

 /**
  * Close an event device. The device cannot be restarted!