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 *rte_eventdevs;
91 /** The pool of rte_eventdev structures. */
94 * Get the rte_eventdev structure device pointer for the named device.
97 * device name to select the device structure.
100 * - The rte_eventdev structure pointer for the given device ID.
102 static inline struct rte_eventdev *
103 rte_event_pmd_get_named_dev(const char *name)
105 struct rte_eventdev *dev;
111 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
112 dev = &rte_eventdevs[i];
113 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
114 (strcmp(dev->data->name, name) == 0))
122 * Validate if the event device index is valid attached event device.
125 * Event device index.
128 * - If the device index is valid (1) or not (0).
130 static inline unsigned
131 rte_event_pmd_is_valid_dev(uint8_t dev_id)
133 struct rte_eventdev *dev;
135 if (dev_id >= RTE_EVENT_MAX_DEVS)
138 dev = &rte_eventdevs[dev_id];
139 if (dev->attached != RTE_EVENTDEV_ATTACHED)
146 * Definitions of all functions exported by a driver through the
147 * the generic structure of type *event_dev_ops* supplied in the
148 * *rte_eventdev* structure associated with a device.
152 * Get device information of a device.
155 * Event device pointer
157 * Event device information structure
160 * Returns 0 on success
162 typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev,
163 struct rte_event_dev_info *dev_info);
166 * Configure a device.
169 * Event device pointer
172 * Returns 0 on success
174 typedef int (*eventdev_configure_t)(const struct rte_eventdev *dev);
177 * Start a configured device.
180 * Event device pointer
183 * Returns 0 on success
185 typedef int (*eventdev_start_t)(struct rte_eventdev *dev);
188 * Stop a configured device.
191 * Event device pointer
193 typedef void (*eventdev_stop_t)(struct rte_eventdev *dev);
196 * Close a configured device.
199 * Event device pointer
203 * - (-EAGAIN) if can't close as device is busy
205 typedef int (*eventdev_close_t)(struct rte_eventdev *dev);
208 * Retrieve the default event queue configuration.
211 * Event device pointer
214 * @param[out] queue_conf
215 * Event queue configuration structure
218 typedef void (*eventdev_queue_default_conf_get_t)(struct rte_eventdev *dev,
219 uint8_t queue_id, struct rte_event_queue_conf *queue_conf);
222 * Setup an event queue.
225 * Event device pointer
229 * Event queue configuration structure
232 * Returns 0 on success.
234 typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
236 const struct rte_event_queue_conf *queue_conf);
239 * Release resources allocated by given event queue.
242 * Event device pointer
247 typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
251 * Retrieve the default event port configuration.
254 * Event device pointer
257 * @param[out] port_conf
258 * Event port configuration structure
261 typedef void (*eventdev_port_default_conf_get_t)(struct rte_eventdev *dev,
262 uint8_t port_id, struct rte_event_port_conf *port_conf);
265 * Setup an event port.
268 * Event device pointer
272 * Event port configuration structure
275 * Returns 0 on success.
277 typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
279 const struct rte_event_port_conf *port_conf);
282 * Release memory resources allocated by given event port.
288 typedef void (*eventdev_port_release_t)(void *port);
291 * Link multiple source event queues to destination event port.
294 * Event device pointer
298 * Points to an array of *nb_links* event queues to be linked
301 * Points to an array of *nb_links* service priorities associated with each
302 * event queue link to event port.
304 * The number of links to establish
307 * Returns 0 on success.
310 typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port,
311 const uint8_t queues[], const uint8_t priorities[],
315 * Unlink multiple source event queues from destination event port.
318 * Event device pointer
322 * An array of *nb_unlinks* event queues to be unlinked from the event port.
324 * The number of unlinks to establish
327 * Returns 0 on success.
330 typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port,
331 uint8_t queues[], uint16_t nb_unlinks);
334 * Unlinks in progress. Returns number of unlinks that the PMD is currently
335 * performing, but have not yet been completed.
338 * Event device pointer
344 * Returns the number of in-progress unlinks. Zero is returned if none are
347 typedef int (*eventdev_port_unlinks_in_progress_t)(struct rte_eventdev *dev,
351 * Converts nanoseconds to *timeout_ticks* value for rte_event_dequeue()
354 * Event device pointer
356 * Wait time in nanosecond
357 * @param[out] timeout_ticks
358 * Value for the *timeout_ticks* parameter in rte_event_dequeue() function
361 * Returns 0 on success.
364 typedef int (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev,
365 uint64_t ns, uint64_t *timeout_ticks);
368 * Dump internal information
371 * Event device pointer
373 * A pointer to a file for output
376 typedef void (*eventdev_dump_t)(struct rte_eventdev *dev, FILE *f);
379 * Retrieve a set of statistics from device
382 * Event device pointer
384 * The stat ids to retrieve
386 * The returned stat values
388 * The number of id values and entries in the values array
390 * The number of stat values successfully filled into the values array
392 typedef int (*eventdev_xstats_get_t)(const struct rte_eventdev *dev,
393 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
394 const unsigned int ids[], uint64_t values[], unsigned int n);
397 * Resets the statistic values in xstats for the device, based on mode.
399 typedef int (*eventdev_xstats_reset_t)(struct rte_eventdev *dev,
400 enum rte_event_dev_xstats_mode mode,
401 int16_t queue_port_id,
402 const uint32_t ids[],
406 * Get names of extended stats of an event device
409 * Event device pointer
410 * @param xstats_names
411 * Array of name values to be filled in
413 * Number of values in the xstats_names array
415 * When size >= the number of stats, return the number of stat values filled
417 * When size < the number of available stats, return the number of stats
418 * values, and do not fill in any data into xstats_names.
420 typedef int (*eventdev_xstats_get_names_t)(const struct rte_eventdev *dev,
421 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
422 struct rte_event_dev_xstats_name *xstats_names,
423 unsigned int *ids, unsigned int size);
426 * Get value of one stats and optionally return its id
429 * Event device pointer
431 * The name of the stat to retrieve
433 * Pointer to an unsigned int where we store the stat-id for future reference.
434 * This pointer may be null if the id is not required.
436 * The value of the stat, or (uint64_t)-1 if the stat is not found.
437 * If the stat is not found, the id value will be returned as (unsigned)-1,
438 * if id pointer is non-NULL
440 typedef uint64_t (*eventdev_xstats_get_by_name)(const struct rte_eventdev *dev,
441 const char *name, unsigned int *id);
445 * Retrieve the event device's ethdev Rx adapter capabilities for the
446 * specified ethernet port
449 * Event device pointer
452 * Ethernet device pointer
455 * A pointer to memory filled with Rx event adapter capabilities.
458 * - 0: Success, driver provides Rx event adapter capabilities for the
460 * - <0: Error code returned by the driver function.
463 typedef int (*eventdev_eth_rx_adapter_caps_get_t)
464 (const struct rte_eventdev *dev,
465 const struct rte_eth_dev *eth_dev,
468 struct rte_event_eth_rx_adapter_queue_conf;
471 * Retrieve the event device's timer adapter capabilities, as well as the ops
472 * structure that an event timer adapter should call through to enter the
476 * Event device pointer
479 * Flags that can be used to determine how to select an event timer
480 * adapter ops structure
483 * A pointer to memory filled with Rx event adapter capabilities.
486 * A pointer to the ops pointer to set with the address of the desired ops
490 * - 0: Success, driver provides Rx event adapter capabilities for the
492 * - <0: Error code returned by the driver function.
495 typedef int (*eventdev_timer_adapter_caps_get_t)(
496 const struct rte_eventdev *dev,
499 const struct rte_event_timer_adapter_ops **ops);
502 * Add ethernet Rx queues to event device. This callback is invoked if
503 * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id)
504 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
507 * Event device pointer
510 * Ethernet device pointer
513 * Ethernet device receive queue index
516 * Additional configuration structure
519 * - 0: Success, ethernet receive queue added successfully.
520 * - <0: Error code returned by the driver function.
523 typedef int (*eventdev_eth_rx_adapter_queue_add_t)(
524 const struct rte_eventdev *dev,
525 const struct rte_eth_dev *eth_dev,
527 const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
530 * Delete ethernet Rx queues from event device. This callback is invoked if
531 * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
532 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
535 * Event device pointer
538 * Ethernet device pointer
541 * Ethernet device receive queue index
544 * - 0: Success, ethernet receive queue deleted successfully.
545 * - <0: Error code returned by the driver function.
548 typedef int (*eventdev_eth_rx_adapter_queue_del_t)
549 (const struct rte_eventdev *dev,
550 const struct rte_eth_dev *eth_dev,
551 int32_t rx_queue_id);
554 * Start ethernet Rx adapter. This callback is invoked if
555 * the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_id)
556 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
557 * from eth_port_id have been added to the event device.
560 * Event device pointer
563 * Ethernet device pointer
566 * - 0: Success, ethernet Rx adapter started successfully.
567 * - <0: Error code returned by the driver function.
569 typedef int (*eventdev_eth_rx_adapter_start_t)
570 (const struct rte_eventdev *dev,
571 const struct rte_eth_dev *eth_dev);
574 * Stop ethernet Rx adapter. This callback is invoked if
575 * the caps returned from eventdev_eth_rx_adapter_caps_get(..,eth_port_id)
576 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
577 * from eth_port_id have been added to the event device.
580 * Event device pointer
583 * Ethernet device pointer
586 * - 0: Success, ethernet Rx adapter stopped successfully.
587 * - <0: Error code returned by the driver function.
589 typedef int (*eventdev_eth_rx_adapter_stop_t)
590 (const struct rte_eventdev *dev,
591 const struct rte_eth_dev *eth_dev);
593 struct rte_event_eth_rx_adapter_stats;
596 * Retrieve ethernet Rx adapter statistics.
599 * Event device pointer
602 * Ethernet device pointer
605 * Pointer to stats structure
608 * Return 0 on success.
611 typedef int (*eventdev_eth_rx_adapter_stats_get)
612 (const struct rte_eventdev *dev,
613 const struct rte_eth_dev *eth_dev,
614 struct rte_event_eth_rx_adapter_stats *stats);
616 * Reset ethernet Rx adapter statistics.
619 * Event device pointer
622 * Ethernet device pointer
625 * Return 0 on success.
627 typedef int (*eventdev_eth_rx_adapter_stats_reset)
628 (const struct rte_eventdev *dev,
629 const struct rte_eth_dev *eth_dev);
631 * Start eventdev selftest.
634 * Return 0 on success.
636 typedef int (*eventdev_selftest)(void);
639 struct rte_cryptodev;
642 * This API may change without prior notice
644 * Retrieve the event device's crypto adapter capabilities for the
645 * specified cryptodev
648 * Event device pointer
654 * A pointer to memory filled with event adapter capabilities.
655 * It is expected to be pre-allocated & initialized by caller.
658 * - 0: Success, driver provides event adapter capabilities for the
660 * - <0: Error code returned by the driver function.
663 typedef int (*eventdev_crypto_adapter_caps_get_t)
664 (const struct rte_eventdev *dev,
665 const struct rte_cryptodev *cdev,
669 * This API may change without prior notice
671 * Add crypto queue pair to event device. This callback is invoked if
672 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
673 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
676 * Event device pointer
681 * @param queue_pair_id
682 * cryptodev queue pair identifier.
685 * Event information required for binding cryptodev queue pair to event queue.
686 * This structure will have a valid value for only those HW PMDs supporting
687 * @see RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND capability.
690 * - 0: Success, cryptodev queue pair added successfully.
691 * - <0: Error code returned by the driver function.
694 typedef int (*eventdev_crypto_adapter_queue_pair_add_t)
695 (const struct rte_eventdev *dev,
696 const struct rte_cryptodev *cdev,
697 int32_t queue_pair_id,
698 const struct rte_event *event);
702 * This API may change without prior notice
704 * Delete crypto queue pair to event device. This callback is invoked if
705 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
706 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
709 * Event device pointer
714 * @param queue_pair_id
715 * cryptodev queue pair identifier.
718 * - 0: Success, cryptodev queue pair deleted successfully.
719 * - <0: Error code returned by the driver function.
722 typedef int (*eventdev_crypto_adapter_queue_pair_del_t)
723 (const struct rte_eventdev *dev,
724 const struct rte_cryptodev *cdev,
725 int32_t queue_pair_id);
728 * Start crypto adapter. This callback is invoked if
729 * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id)
730 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs
731 * from cdev_id have been added to the event device.
734 * Event device pointer
737 * Crypto device pointer
740 * - 0: Success, crypto adapter started successfully.
741 * - <0: Error code returned by the driver function.
743 typedef int (*eventdev_crypto_adapter_start_t)
744 (const struct rte_eventdev *dev,
745 const struct rte_cryptodev *cdev);
748 * Stop crypto adapter. This callback is invoked if
749 * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id)
750 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs
751 * from cdev_id have been added to the event device.
754 * Event device pointer
757 * Crypto device pointer
760 * - 0: Success, crypto adapter stopped successfully.
761 * - <0: Error code returned by the driver function.
763 typedef int (*eventdev_crypto_adapter_stop_t)
764 (const struct rte_eventdev *dev,
765 const struct rte_cryptodev *cdev);
767 struct rte_event_crypto_adapter_stats;
770 * Retrieve crypto adapter statistics.
773 * Event device pointer
776 * Crypto device pointer
779 * Pointer to stats structure
782 * Return 0 on success.
785 typedef int (*eventdev_crypto_adapter_stats_get)
786 (const struct rte_eventdev *dev,
787 const struct rte_cryptodev *cdev,
788 struct rte_event_crypto_adapter_stats *stats);
791 * Reset crypto adapter statistics.
794 * Event device pointer
797 * Crypto device pointer
800 * Return 0 on success.
803 typedef int (*eventdev_crypto_adapter_stats_reset)
804 (const struct rte_eventdev *dev,
805 const struct rte_cryptodev *cdev);
808 * Retrieve the event device's eth Tx adapter capabilities.
811 * Event device pointer
814 * Ethernet device pointer
817 * A pointer to memory filled with eth Tx adapter capabilities.
820 * - 0: Success, driver provides eth Tx adapter capabilities
821 * - <0: Error code returned by the driver function.
824 typedef int (*eventdev_eth_tx_adapter_caps_get_t)
825 (const struct rte_eventdev *dev,
826 const struct rte_eth_dev *eth_dev,
830 * Create adapter callback.
836 * Event device pointer
840 * - <0: Error code on failure.
842 typedef int (*eventdev_eth_tx_adapter_create_t)(uint8_t id,
843 const struct rte_eventdev *dev);
846 * Free adapter callback.
852 * Event device pointer
856 * - <0: Error code on failure.
858 typedef int (*eventdev_eth_tx_adapter_free_t)(uint8_t id,
859 const struct rte_eventdev *dev);
862 * Add a Tx queue to the adapter.
863 * A queue value of -1 is used to indicate all
864 * queues within the device.
870 * Event device pointer
873 * Ethernet device pointer
876 * Transmt queue index
880 * - <0: Error code on failure.
882 typedef int (*eventdev_eth_tx_adapter_queue_add_t)(
884 const struct rte_eventdev *dev,
885 const struct rte_eth_dev *eth_dev,
886 int32_t tx_queue_id);
889 * Delete a Tx queue from the adapter.
890 * A queue value of -1 is used to indicate all
891 * queues within the device, that have been added to this
898 * Event device pointer
901 * Ethernet device pointer
904 * Transmit queue index
907 * - 0: Success, Queues deleted successfully.
908 * - <0: Error code on failure.
910 typedef int (*eventdev_eth_tx_adapter_queue_del_t)(
912 const struct rte_eventdev *dev,
913 const struct rte_eth_dev *eth_dev,
914 int32_t tx_queue_id);
923 * Event device pointer
926 * - 0: Success, Adapter started correctly.
927 * - <0: Error code on failure.
929 typedef int (*eventdev_eth_tx_adapter_start_t)(uint8_t id,
930 const struct rte_eventdev *dev);
939 * Event device pointer
943 * - <0: Error code on failure.
945 typedef int (*eventdev_eth_tx_adapter_stop_t)(uint8_t id,
946 const struct rte_eventdev *dev);
948 struct rte_event_eth_tx_adapter_stats;
951 * Retrieve statistics for an adapter
957 * Event device pointer
960 * A pointer to structure used to retrieve statistics for an adapter
963 * - 0: Success, statistics retrieved successfully.
964 * - <0: Error code on failure.
966 typedef int (*eventdev_eth_tx_adapter_stats_get_t)(
968 const struct rte_eventdev *dev,
969 struct rte_event_eth_tx_adapter_stats *stats);
972 * Reset statistics for an adapter
978 * Event device pointer
981 * - 0: Success, statistics retrieved successfully.
982 * - <0: Error code on failure.
984 typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id,
985 const struct rte_eventdev *dev);
987 /** Event device operations function pointer table */
988 struct rte_eventdev_ops {
989 eventdev_info_get_t dev_infos_get; /**< Get device info. */
990 eventdev_configure_t dev_configure; /**< Configure device. */
991 eventdev_start_t dev_start; /**< Start device. */
992 eventdev_stop_t dev_stop; /**< Stop device. */
993 eventdev_close_t dev_close; /**< Close device. */
995 eventdev_queue_default_conf_get_t queue_def_conf;
996 /**< Get default queue configuration. */
997 eventdev_queue_setup_t queue_setup;
998 /**< Set up an event queue. */
999 eventdev_queue_release_t queue_release;
1000 /**< Release an event queue. */
1002 eventdev_port_default_conf_get_t port_def_conf;
1003 /**< Get default port configuration. */
1004 eventdev_port_setup_t port_setup;
1005 /**< Set up an event port. */
1006 eventdev_port_release_t port_release;
1007 /**< Release an event port. */
1009 eventdev_port_link_t port_link;
1010 /**< Link event queues to an event port. */
1011 eventdev_port_unlink_t port_unlink;
1012 /**< Unlink event queues from an event port. */
1013 eventdev_port_unlinks_in_progress_t port_unlinks_in_progress;
1014 /**< Unlinks in progress on an event port. */
1015 eventdev_dequeue_timeout_ticks_t timeout_ticks;
1016 /**< Converts ns to *timeout_ticks* value for rte_event_dequeue() */
1017 eventdev_dump_t dump;
1018 /* Dump internal information */
1020 eventdev_xstats_get_t xstats_get;
1021 /**< Get extended device statistics. */
1022 eventdev_xstats_get_names_t xstats_get_names;
1023 /**< Get names of extended stats. */
1024 eventdev_xstats_get_by_name xstats_get_by_name;
1025 /**< Get one value by name. */
1026 eventdev_xstats_reset_t xstats_reset;
1027 /**< Reset the statistics values in xstats. */
1029 eventdev_eth_rx_adapter_caps_get_t eth_rx_adapter_caps_get;
1030 /**< Get ethernet Rx adapter capabilities */
1031 eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
1032 /**< Add Rx queues to ethernet Rx adapter */
1033 eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
1034 /**< Delete Rx queues from ethernet Rx adapter */
1035 eventdev_eth_rx_adapter_start_t eth_rx_adapter_start;
1036 /**< Start ethernet Rx adapter */
1037 eventdev_eth_rx_adapter_stop_t eth_rx_adapter_stop;
1038 /**< Stop ethernet Rx adapter */
1039 eventdev_eth_rx_adapter_stats_get eth_rx_adapter_stats_get;
1040 /**< Get ethernet Rx stats */
1041 eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset;
1042 /**< Reset ethernet Rx stats */
1044 eventdev_timer_adapter_caps_get_t timer_adapter_caps_get;
1045 /**< Get timer adapter capabilities */
1047 eventdev_crypto_adapter_caps_get_t crypto_adapter_caps_get;
1048 /**< Get crypto adapter capabilities */
1049 eventdev_crypto_adapter_queue_pair_add_t crypto_adapter_queue_pair_add;
1050 /**< Add queue pair to crypto adapter */
1051 eventdev_crypto_adapter_queue_pair_del_t crypto_adapter_queue_pair_del;
1052 /**< Delete queue pair from crypto adapter */
1053 eventdev_crypto_adapter_start_t crypto_adapter_start;
1054 /**< Start crypto adapter */
1055 eventdev_crypto_adapter_stop_t crypto_adapter_stop;
1056 /**< Stop crypto adapter */
1057 eventdev_crypto_adapter_stats_get crypto_adapter_stats_get;
1058 /**< Get crypto stats */
1059 eventdev_crypto_adapter_stats_reset crypto_adapter_stats_reset;
1060 /**< Reset crypto stats */
1062 eventdev_eth_tx_adapter_caps_get_t eth_tx_adapter_caps_get;
1063 /**< Get ethernet Tx adapter capabilities */
1065 eventdev_eth_tx_adapter_create_t eth_tx_adapter_create;
1066 /**< Create adapter callback */
1067 eventdev_eth_tx_adapter_free_t eth_tx_adapter_free;
1068 /**< Free adapter callback */
1069 eventdev_eth_tx_adapter_queue_add_t eth_tx_adapter_queue_add;
1070 /**< Add Tx queues to the eth Tx adapter */
1071 eventdev_eth_tx_adapter_queue_del_t eth_tx_adapter_queue_del;
1072 /**< Delete Tx queues from the eth Tx adapter */
1073 eventdev_eth_tx_adapter_start_t eth_tx_adapter_start;
1074 /**< Start eth Tx adapter */
1075 eventdev_eth_tx_adapter_stop_t eth_tx_adapter_stop;
1076 /**< Stop eth Tx adapter */
1077 eventdev_eth_tx_adapter_stats_get_t eth_tx_adapter_stats_get;
1078 /**< Get eth Tx adapter statistics */
1079 eventdev_eth_tx_adapter_stats_reset_t eth_tx_adapter_stats_reset;
1080 /**< Reset eth Tx adapter statistics */
1082 eventdev_selftest dev_selftest;
1083 /**< Start eventdev Selftest */
1085 eventdev_stop_flush_t dev_stop_flush;
1086 /**< User-provided event flush function */
1090 * Allocates a new eventdev slot for an event device and returns the pointer
1091 * to that slot for the driver to use.
1094 * Unique identifier name for each device
1096 * Socket to allocate resources on.
1098 * - Slot in the rte_dev_devices array for a new device;
1100 struct rte_eventdev *
1101 rte_event_pmd_allocate(const char *name, int socket_id);
1104 * Release the specified eventdev device.
1107 * The *eventdev* pointer is the address of the *rte_eventdev* structure.
1109 * - 0 on success, negative on error
1112 rte_event_pmd_release(struct rte_eventdev *eventdev);
1118 #endif /* _RTE_EVENTDEV_PMD_H_ */