1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016 Cavium, Inc
5 #ifndef _RTE_EVENTDEV_PMD_H_
6 #define _RTE_EVENTDEV_PMD_H_
12 * These API are from event PMD only and user applications should not call
22 #include <rte_common.h>
23 #include <rte_config.h>
26 #include <rte_malloc.h>
28 #include "rte_eventdev.h"
29 #include "rte_event_timer_adapter_pmd.h"
32 #define RTE_EDEV_LOG_ERR(...) \
33 RTE_LOG(ERR, EVENTDEV, \
34 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
35 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
37 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
38 #define RTE_EDEV_LOG_DEBUG(...) \
39 RTE_LOG(DEBUG, EVENTDEV, \
40 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
41 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
43 #define RTE_EDEV_LOG_DEBUG(...) (void)0
46 /* Macros to check for valid device */
47 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
48 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
49 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
54 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
55 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
56 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
62 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
63 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
64 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
69 #define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
70 ((RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) | \
71 (RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ))
73 #define RTE_EVENT_CRYPTO_ADAPTER_SW_CAP \
74 RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA
76 /**< Ethernet Rx adapter cap to return If the packet transfers from
77 * the ethdev to eventdev use a SW service function
80 #define RTE_EVENTDEV_DETACHED (0)
81 #define RTE_EVENTDEV_ATTACHED (1)
85 /** Global structure used for maintaining state of allocated event devices */
86 struct rte_eventdev_global {
87 uint8_t nb_devs; /**< Number of devices found */
90 extern struct rte_eventdev_global *rte_eventdev_globals;
91 /** Pointer to global event devices data structure. */
92 extern struct rte_eventdev *rte_eventdevs;
93 /** The pool of rte_eventdev structures. */
96 * Get the rte_eventdev structure device pointer for the named device.
99 * device name to select the device structure.
102 * - The rte_eventdev structure pointer for the given device ID.
104 static inline struct rte_eventdev *
105 rte_event_pmd_get_named_dev(const char *name)
107 struct rte_eventdev *dev;
113 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
114 dev = &rte_eventdevs[i];
115 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
116 (strcmp(dev->data->name, name) == 0))
124 * Validate if the event device index is valid attached event device.
127 * Event device index.
130 * - If the device index is valid (1) or not (0).
132 static inline unsigned
133 rte_event_pmd_is_valid_dev(uint8_t dev_id)
135 struct rte_eventdev *dev;
137 if (dev_id >= RTE_EVENT_MAX_DEVS)
140 dev = &rte_eventdevs[dev_id];
141 if (dev->attached != RTE_EVENTDEV_ATTACHED)
148 * Definitions of all functions exported by a driver through the
149 * the generic structure of type *event_dev_ops* supplied in the
150 * *rte_eventdev* structure associated with a device.
154 * Get device information of a device.
157 * Event device pointer
159 * Event device information structure
162 * Returns 0 on success
164 typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev,
165 struct rte_event_dev_info *dev_info);
168 * Configure a device.
171 * Event device pointer
174 * Returns 0 on success
176 typedef int (*eventdev_configure_t)(const struct rte_eventdev *dev);
179 * Start a configured device.
182 * Event device pointer
185 * Returns 0 on success
187 typedef int (*eventdev_start_t)(struct rte_eventdev *dev);
190 * Stop a configured device.
193 * Event device pointer
195 typedef void (*eventdev_stop_t)(struct rte_eventdev *dev);
198 * Close a configured device.
201 * Event device pointer
205 * - (-EAGAIN) if can't close as device is busy
207 typedef int (*eventdev_close_t)(struct rte_eventdev *dev);
210 * Retrieve the default event queue configuration.
213 * Event device pointer
216 * @param[out] queue_conf
217 * Event queue configuration structure
220 typedef void (*eventdev_queue_default_conf_get_t)(struct rte_eventdev *dev,
221 uint8_t queue_id, struct rte_event_queue_conf *queue_conf);
224 * Setup an event queue.
227 * Event device pointer
231 * Event queue configuration structure
234 * Returns 0 on success.
236 typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
238 const struct rte_event_queue_conf *queue_conf);
241 * Release resources allocated by given event queue.
244 * Event device pointer
249 typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
253 * Retrieve the default event port configuration.
256 * Event device pointer
259 * @param[out] port_conf
260 * Event port configuration structure
263 typedef void (*eventdev_port_default_conf_get_t)(struct rte_eventdev *dev,
264 uint8_t port_id, struct rte_event_port_conf *port_conf);
267 * Setup an event port.
270 * Event device pointer
274 * Event port configuration structure
277 * Returns 0 on success.
279 typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
281 const struct rte_event_port_conf *port_conf);
284 * Release memory resources allocated by given event port.
290 typedef void (*eventdev_port_release_t)(void *port);
293 * Link multiple source event queues to destination event port.
296 * Event device pointer
300 * Points to an array of *nb_links* event queues to be linked
303 * Points to an array of *nb_links* service priorities associated with each
304 * event queue link to event port.
306 * The number of links to establish
309 * Returns 0 on success.
312 typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port,
313 const uint8_t queues[], const uint8_t priorities[],
317 * Unlink multiple source event queues from destination event port.
320 * Event device pointer
324 * An array of *nb_unlinks* event queues to be unlinked from the event port.
326 * The number of unlinks to establish
329 * Returns 0 on success.
332 typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port,
333 uint8_t queues[], uint16_t nb_unlinks);
336 * Unlinks in progress. Returns number of unlinks that the PMD is currently
337 * performing, but have not yet been completed.
340 * Event device pointer
346 * Returns the number of in-progress unlinks. Zero is returned if none are
349 typedef int (*eventdev_port_unlinks_in_progress_t)(struct rte_eventdev *dev,
353 * Converts nanoseconds to *timeout_ticks* value for rte_event_dequeue()
356 * Event device pointer
358 * Wait time in nanosecond
359 * @param[out] timeout_ticks
360 * Value for the *timeout_ticks* parameter in rte_event_dequeue() function
363 * Returns 0 on success.
366 typedef int (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev,
367 uint64_t ns, uint64_t *timeout_ticks);
370 * Dump internal information
373 * Event device pointer
375 * A pointer to a file for output
378 typedef void (*eventdev_dump_t)(struct rte_eventdev *dev, FILE *f);
381 * Retrieve a set of statistics from device
384 * Event device pointer
386 * The stat ids to retrieve
388 * The returned stat values
390 * The number of id values and entries in the values array
392 * The number of stat values successfully filled into the values array
394 typedef int (*eventdev_xstats_get_t)(const struct rte_eventdev *dev,
395 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
396 const unsigned int ids[], uint64_t values[], unsigned int n);
399 * Resets the statistic values in xstats for the device, based on mode.
401 typedef int (*eventdev_xstats_reset_t)(struct rte_eventdev *dev,
402 enum rte_event_dev_xstats_mode mode,
403 int16_t queue_port_id,
404 const uint32_t ids[],
408 * Get names of extended stats of an event device
411 * Event device pointer
412 * @param xstats_names
413 * Array of name values to be filled in
415 * Number of values in the xstats_names array
417 * When size >= the number of stats, return the number of stat values filled
419 * When size < the number of available stats, return the number of stats
420 * values, and do not fill in any data into xstats_names.
422 typedef int (*eventdev_xstats_get_names_t)(const struct rte_eventdev *dev,
423 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
424 struct rte_event_dev_xstats_name *xstats_names,
425 unsigned int *ids, unsigned int size);
428 * Get value of one stats and optionally return its id
431 * Event device pointer
433 * The name of the stat to retrieve
435 * Pointer to an unsigned int where we store the stat-id for future reference.
436 * This pointer may be null if the id is not required.
438 * The value of the stat, or (uint64_t)-1 if the stat is not found.
439 * If the stat is not found, the id value will be returned as (unsigned)-1,
440 * if id pointer is non-NULL
442 typedef uint64_t (*eventdev_xstats_get_by_name)(const struct rte_eventdev *dev,
443 const char *name, unsigned int *id);
447 * Retrieve the event device's ethdev Rx adapter capabilities for the
448 * specified ethernet port
451 * Event device pointer
454 * Ethernet device pointer
457 * A pointer to memory filled with Rx event adapter capabilities.
460 * - 0: Success, driver provides Rx event adapter capabilities for the
462 * - <0: Error code returned by the driver function.
465 typedef int (*eventdev_eth_rx_adapter_caps_get_t)
466 (const struct rte_eventdev *dev,
467 const struct rte_eth_dev *eth_dev,
470 struct rte_event_eth_rx_adapter_queue_conf *queue_conf;
473 * Retrieve the event device's timer adapter capabilities, as well as the ops
474 * structure that an event timer adapter should call through to enter the
478 * Event device pointer
481 * Flags that can be used to determine how to select an event timer
482 * adapter ops structure
485 * A pointer to memory filled with Rx event adapter capabilities.
488 * A pointer to the ops pointer to set with the address of the desired ops
492 * - 0: Success, driver provides Rx event adapter capabilities for the
494 * - <0: Error code returned by the driver function.
497 typedef int (*eventdev_timer_adapter_caps_get_t)(
498 const struct rte_eventdev *dev,
501 const struct rte_event_timer_adapter_ops **ops);
504 * Add ethernet Rx queues to event device. This callback is invoked if
505 * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id)
506 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
509 * Event device pointer
512 * Ethernet device pointer
515 * Ethernet device receive queue index
518 * Additional configuration structure
521 * - 0: Success, ethernet receive queue added successfully.
522 * - <0: Error code returned by the driver function.
525 typedef int (*eventdev_eth_rx_adapter_queue_add_t)(
526 const struct rte_eventdev *dev,
527 const struct rte_eth_dev *eth_dev,
529 const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
532 * Delete ethernet Rx queues from event device. This callback is invoked if
533 * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
534 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
537 * Event device pointer
540 * Ethernet device pointer
543 * Ethernet device receive queue index
546 * - 0: Success, ethernet receive queue deleted successfully.
547 * - <0: Error code returned by the driver function.
550 typedef int (*eventdev_eth_rx_adapter_queue_del_t)
551 (const struct rte_eventdev *dev,
552 const struct rte_eth_dev *eth_dev,
553 int32_t rx_queue_id);
556 * Start ethernet Rx adapter. This callback is invoked if
557 * the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_id)
558 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
559 * from eth_port_id have been added to the event device.
562 * Event device pointer
565 * Ethernet device pointer
568 * - 0: Success, ethernet Rx adapter started successfully.
569 * - <0: Error code returned by the driver function.
571 typedef int (*eventdev_eth_rx_adapter_start_t)
572 (const struct rte_eventdev *dev,
573 const struct rte_eth_dev *eth_dev);
576 * Stop ethernet Rx adapter. This callback is invoked if
577 * the caps returned from eventdev_eth_rx_adapter_caps_get(..,eth_port_id)
578 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
579 * from eth_port_id have been added to the event device.
582 * Event device pointer
585 * Ethernet device pointer
588 * - 0: Success, ethernet Rx adapter stopped successfully.
589 * - <0: Error code returned by the driver function.
591 typedef int (*eventdev_eth_rx_adapter_stop_t)
592 (const struct rte_eventdev *dev,
593 const struct rte_eth_dev *eth_dev);
595 struct rte_event_eth_rx_adapter_stats *stats;
598 * Retrieve ethernet Rx adapter statistics.
601 * Event device pointer
604 * Ethernet device pointer
607 * Pointer to stats structure
610 * Return 0 on success.
613 typedef int (*eventdev_eth_rx_adapter_stats_get)
614 (const struct rte_eventdev *dev,
615 const struct rte_eth_dev *eth_dev,
616 struct rte_event_eth_rx_adapter_stats *stats);
618 * Reset ethernet Rx adapter statistics.
621 * Event device pointer
624 * Ethernet device pointer
627 * Return 0 on success.
629 typedef int (*eventdev_eth_rx_adapter_stats_reset)
630 (const struct rte_eventdev *dev,
631 const struct rte_eth_dev *eth_dev);
633 * Start eventdev selftest.
636 * Return 0 on success.
638 typedef int (*eventdev_selftest)(void);
641 struct rte_cryptodev;
644 * This API may change without prior notice
646 * Retrieve the event device's crypto adapter capabilities for the
647 * specified cryptodev
650 * Event device pointer
656 * A pointer to memory filled with event adapter capabilities.
657 * It is expected to be pre-allocated & initialized by caller.
660 * - 0: Success, driver provides event adapter capabilities for the
662 * - <0: Error code returned by the driver function.
665 typedef int (*eventdev_crypto_adapter_caps_get_t)
666 (const struct rte_eventdev *dev,
667 const struct rte_cryptodev *cdev,
671 * This API may change without prior notice
673 * Add crypto queue pair to event device. This callback is invoked if
674 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
675 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
678 * Event device pointer
683 * @param queue_pair_id
684 * cryptodev queue pair identifier.
687 * Event information required for binding cryptodev queue pair to event queue.
688 * This structure will have a valid value for only those HW PMDs supporting
689 * @see RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND capability.
692 * - 0: Success, cryptodev queue pair added successfully.
693 * - <0: Error code returned by the driver function.
696 typedef int (*eventdev_crypto_adapter_queue_pair_add_t)
697 (const struct rte_eventdev *dev,
698 const struct rte_cryptodev *cdev,
699 int32_t queue_pair_id,
700 const struct rte_event *event);
704 * This API may change without prior notice
706 * Delete crypto queue pair to event device. This callback is invoked if
707 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
708 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
711 * Event device pointer
716 * @param queue_pair_id
717 * cryptodev queue pair identifier.
720 * - 0: Success, cryptodev queue pair deleted successfully.
721 * - <0: Error code returned by the driver function.
724 typedef int (*eventdev_crypto_adapter_queue_pair_del_t)
725 (const struct rte_eventdev *dev,
726 const struct rte_cryptodev *cdev,
727 int32_t queue_pair_id);
730 * Start crypto adapter. This callback is invoked if
731 * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id)
732 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs
733 * from cdev_id have been added to the event device.
736 * Event device pointer
739 * Crypto device pointer
742 * - 0: Success, crypto adapter started successfully.
743 * - <0: Error code returned by the driver function.
745 typedef int (*eventdev_crypto_adapter_start_t)
746 (const struct rte_eventdev *dev,
747 const struct rte_cryptodev *cdev);
750 * Stop crypto adapter. This callback is invoked if
751 * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id)
752 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs
753 * from cdev_id have been added to the event device.
756 * Event device pointer
759 * Crypto device pointer
762 * - 0: Success, crypto adapter stopped successfully.
763 * - <0: Error code returned by the driver function.
765 typedef int (*eventdev_crypto_adapter_stop_t)
766 (const struct rte_eventdev *dev,
767 const struct rte_cryptodev *cdev);
769 struct rte_event_crypto_adapter_stats;
772 * Retrieve crypto adapter statistics.
775 * Event device pointer
778 * Crypto device pointer
781 * Pointer to stats structure
784 * Return 0 on success.
787 typedef int (*eventdev_crypto_adapter_stats_get)
788 (const struct rte_eventdev *dev,
789 const struct rte_cryptodev *cdev,
790 struct rte_event_crypto_adapter_stats *stats);
793 * Reset crypto adapter statistics.
796 * Event device pointer
799 * Crypto device pointer
802 * Return 0 on success.
805 typedef int (*eventdev_crypto_adapter_stats_reset)
806 (const struct rte_eventdev *dev,
807 const struct rte_cryptodev *cdev);
810 * Retrieve the event device's eth Tx adapter capabilities.
813 * Event device pointer
816 * Ethernet device pointer
819 * A pointer to memory filled with eth Tx adapter capabilities.
822 * - 0: Success, driver provides eth Tx adapter capabilities
823 * - <0: Error code returned by the driver function.
826 typedef int (*eventdev_eth_tx_adapter_caps_get_t)
827 (const struct rte_eventdev *dev,
828 const struct rte_eth_dev *eth_dev,
832 * Create adapter callback.
838 * Event device pointer
842 * - <0: Error code on failure.
844 typedef int (*eventdev_eth_tx_adapter_create_t)(uint8_t id,
845 const struct rte_eventdev *dev);
848 * Free adapter callback.
854 * Event device pointer
858 * - <0: Error code on failure.
860 typedef int (*eventdev_eth_tx_adapter_free_t)(uint8_t id,
861 const struct rte_eventdev *dev);
864 * Add a Tx queue to the adapter.
865 * A queue value of -1 is used to indicate all
866 * queues within the device.
872 * Event device pointer
875 * Ethernet device pointer
878 * Transmt queue index
882 * - <0: Error code on failure.
884 typedef int (*eventdev_eth_tx_adapter_queue_add_t)(
886 const struct rte_eventdev *dev,
887 const struct rte_eth_dev *eth_dev,
888 int32_t tx_queue_id);
891 * Delete a Tx queue from the adapter.
892 * A queue value of -1 is used to indicate all
893 * queues within the device, that have been added to this
900 * Event device pointer
903 * Ethernet device pointer
906 * Transmit queue index
909 * - 0: Success, Queues deleted successfully.
910 * - <0: Error code on failure.
912 typedef int (*eventdev_eth_tx_adapter_queue_del_t)(
914 const struct rte_eventdev *dev,
915 const struct rte_eth_dev *eth_dev,
916 int32_t tx_queue_id);
925 * Event device pointer
928 * - 0: Success, Adapter started correctly.
929 * - <0: Error code on failure.
931 typedef int (*eventdev_eth_tx_adapter_start_t)(uint8_t id,
932 const struct rte_eventdev *dev);
941 * Event device pointer
945 * - <0: Error code on failure.
947 typedef int (*eventdev_eth_tx_adapter_stop_t)(uint8_t id,
948 const struct rte_eventdev *dev);
950 struct rte_event_eth_tx_adapter_stats;
953 * Retrieve statistics for an adapter
959 * Event device pointer
962 * A pointer to structure used to retrieve statistics for an adapter
965 * - 0: Success, statistics retrieved successfully.
966 * - <0: Error code on failure.
968 typedef int (*eventdev_eth_tx_adapter_stats_get_t)(
970 const struct rte_eventdev *dev,
971 struct rte_event_eth_tx_adapter_stats *stats);
974 * Reset statistics for an adapter
980 * Event device pointer
983 * - 0: Success, statistics retrieved successfully.
984 * - <0: Error code on failure.
986 typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id,
987 const struct rte_eventdev *dev);
989 /** Event device operations function pointer table */
990 struct rte_eventdev_ops {
991 eventdev_info_get_t dev_infos_get; /**< Get device info. */
992 eventdev_configure_t dev_configure; /**< Configure device. */
993 eventdev_start_t dev_start; /**< Start device. */
994 eventdev_stop_t dev_stop; /**< Stop device. */
995 eventdev_close_t dev_close; /**< Close device. */
997 eventdev_queue_default_conf_get_t queue_def_conf;
998 /**< Get default queue configuration. */
999 eventdev_queue_setup_t queue_setup;
1000 /**< Set up an event queue. */
1001 eventdev_queue_release_t queue_release;
1002 /**< Release an event queue. */
1004 eventdev_port_default_conf_get_t port_def_conf;
1005 /**< Get default port configuration. */
1006 eventdev_port_setup_t port_setup;
1007 /**< Set up an event port. */
1008 eventdev_port_release_t port_release;
1009 /**< Release an event port. */
1011 eventdev_port_link_t port_link;
1012 /**< Link event queues to an event port. */
1013 eventdev_port_unlink_t port_unlink;
1014 /**< Unlink event queues from an event port. */
1015 eventdev_port_unlinks_in_progress_t port_unlinks_in_progress;
1016 /**< Unlinks in progress on an event port. */
1017 eventdev_dequeue_timeout_ticks_t timeout_ticks;
1018 /**< Converts ns to *timeout_ticks* value for rte_event_dequeue() */
1019 eventdev_dump_t dump;
1020 /* Dump internal information */
1022 eventdev_xstats_get_t xstats_get;
1023 /**< Get extended device statistics. */
1024 eventdev_xstats_get_names_t xstats_get_names;
1025 /**< Get names of extended stats. */
1026 eventdev_xstats_get_by_name xstats_get_by_name;
1027 /**< Get one value by name. */
1028 eventdev_xstats_reset_t xstats_reset;
1029 /**< Reset the statistics values in xstats. */
1031 eventdev_eth_rx_adapter_caps_get_t eth_rx_adapter_caps_get;
1032 /**< Get ethernet Rx adapter capabilities */
1033 eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
1034 /**< Add Rx queues to ethernet Rx adapter */
1035 eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
1036 /**< Delete Rx queues from ethernet Rx adapter */
1037 eventdev_eth_rx_adapter_start_t eth_rx_adapter_start;
1038 /**< Start ethernet Rx adapter */
1039 eventdev_eth_rx_adapter_stop_t eth_rx_adapter_stop;
1040 /**< Stop ethernet Rx adapter */
1041 eventdev_eth_rx_adapter_stats_get eth_rx_adapter_stats_get;
1042 /**< Get ethernet Rx stats */
1043 eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset;
1044 /**< Reset ethernet Rx stats */
1046 eventdev_timer_adapter_caps_get_t timer_adapter_caps_get;
1047 /**< Get timer adapter capabilities */
1049 eventdev_crypto_adapter_caps_get_t crypto_adapter_caps_get;
1050 /**< Get crypto adapter capabilities */
1051 eventdev_crypto_adapter_queue_pair_add_t crypto_adapter_queue_pair_add;
1052 /**< Add queue pair to crypto adapter */
1053 eventdev_crypto_adapter_queue_pair_del_t crypto_adapter_queue_pair_del;
1054 /**< Delete queue pair from crypto adapter */
1055 eventdev_crypto_adapter_start_t crypto_adapter_start;
1056 /**< Start crypto adapter */
1057 eventdev_crypto_adapter_stop_t crypto_adapter_stop;
1058 /**< Stop crypto adapter */
1059 eventdev_crypto_adapter_stats_get crypto_adapter_stats_get;
1060 /**< Get crypto stats */
1061 eventdev_crypto_adapter_stats_reset crypto_adapter_stats_reset;
1062 /**< Reset crypto stats */
1064 eventdev_eth_tx_adapter_caps_get_t eth_tx_adapter_caps_get;
1065 /**< Get ethernet Tx adapter capabilities */
1067 eventdev_eth_tx_adapter_create_t eth_tx_adapter_create;
1068 /**< Create adapter callback */
1069 eventdev_eth_tx_adapter_free_t eth_tx_adapter_free;
1070 /**< Free adapter callback */
1071 eventdev_eth_tx_adapter_queue_add_t eth_tx_adapter_queue_add;
1072 /**< Add Tx queues to the eth Tx adapter */
1073 eventdev_eth_tx_adapter_queue_del_t eth_tx_adapter_queue_del;
1074 /**< Delete Tx queues from the eth Tx adapter */
1075 eventdev_eth_tx_adapter_start_t eth_tx_adapter_start;
1076 /**< Start eth Tx adapter */
1077 eventdev_eth_tx_adapter_stop_t eth_tx_adapter_stop;
1078 /**< Stop eth Tx adapter */
1079 eventdev_eth_tx_adapter_stats_get_t eth_tx_adapter_stats_get;
1080 /**< Get eth Tx adapter statistics */
1081 eventdev_eth_tx_adapter_stats_reset_t eth_tx_adapter_stats_reset;
1082 /**< Reset eth Tx adapter statistics */
1084 eventdev_selftest dev_selftest;
1085 /**< Start eventdev Selftest */
1087 eventdev_stop_flush_t dev_stop_flush;
1088 /**< User-provided event flush function */
1092 * Allocates a new eventdev slot for an event device and returns the pointer
1093 * to that slot for the driver to use.
1096 * Unique identifier name for each device
1098 * Socket to allocate resources on.
1100 * - Slot in the rte_dev_devices array for a new device;
1102 struct rte_eventdev *
1103 rte_event_pmd_allocate(const char *name, int socket_id);
1106 * Release the specified eventdev device.
1109 * The *eventdev* pointer is the address of the *rte_eventdev* structure.
1111 * - 0 on success, negative on error
1114 rte_event_pmd_release(struct rte_eventdev *eventdev);
1120 #endif /* _RTE_EVENTDEV_PMD_H_ */