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_compat.h>
24 #include <rte_config.h>
27 #include <rte_malloc.h>
29 #include <rte_mbuf_dyn.h>
31 #include "rte_eventdev.h"
32 #include "rte_event_timer_adapter_pmd.h"
35 #define RTE_EDEV_LOG_ERR(...) \
36 RTE_LOG(ERR, EVENTDEV, \
37 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
38 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
40 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
41 #define RTE_EDEV_LOG_DEBUG(...) \
42 RTE_LOG(DEBUG, EVENTDEV, \
43 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
44 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
46 #define RTE_EDEV_LOG_DEBUG(...) (void)0
49 /* Macros to check for valid device */
50 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
51 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
52 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
57 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
58 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
59 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
65 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
66 if (!rte_event_pmd_is_valid_dev((dev_id))) { \
67 RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
72 #define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
73 ((RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) | \
74 (RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ))
76 #define RTE_EVENT_CRYPTO_ADAPTER_SW_CAP \
77 RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA
79 /**< Ethernet Rx adapter cap to return If the packet transfers from
80 * the ethdev to eventdev use a SW service function
83 #define RTE_EVENTDEV_DETACHED (0)
84 #define RTE_EVENTDEV_ATTACHED (1)
88 /** Global structure used for maintaining state of allocated event devices */
89 struct rte_eventdev_global {
90 uint8_t nb_devs; /**< Number of devices found */
93 extern struct rte_eventdev *rte_eventdevs;
94 /** The pool of rte_eventdev structures. */
97 * Get the rte_eventdev structure device pointer for the named device.
100 * device name to select the device structure.
103 * - The rte_eventdev structure pointer for the given device ID.
105 static inline struct rte_eventdev *
106 rte_event_pmd_get_named_dev(const char *name)
108 struct rte_eventdev *dev;
114 for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
115 dev = &rte_eventdevs[i];
116 if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
117 (strcmp(dev->data->name, name) == 0))
125 * Validate if the event device index is valid attached event device.
128 * Event device index.
131 * - If the device index is valid (1) or not (0).
133 static inline unsigned
134 rte_event_pmd_is_valid_dev(uint8_t dev_id)
136 struct rte_eventdev *dev;
138 if (dev_id >= RTE_EVENT_MAX_DEVS)
141 dev = &rte_eventdevs[dev_id];
142 if (dev->attached != RTE_EVENTDEV_ATTACHED)
149 * Definitions of all functions exported by a driver through the
150 * the generic structure of type *event_dev_ops* supplied in the
151 * *rte_eventdev* structure associated with a device.
155 * Get device information of a device.
158 * Event device pointer
160 * Event device information structure
163 * Returns 0 on success
165 typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev,
166 struct rte_event_dev_info *dev_info);
169 * Configure a device.
172 * Event device pointer
175 * Returns 0 on success
177 typedef int (*eventdev_configure_t)(const struct rte_eventdev *dev);
180 * Start a configured device.
183 * Event device pointer
186 * Returns 0 on success
188 typedef int (*eventdev_start_t)(struct rte_eventdev *dev);
191 * Stop a configured device.
194 * Event device pointer
196 typedef void (*eventdev_stop_t)(struct rte_eventdev *dev);
199 * Close a configured device.
202 * Event device pointer
206 * - (-EAGAIN) if can't close as device is busy
208 typedef int (*eventdev_close_t)(struct rte_eventdev *dev);
211 * Retrieve the default event queue configuration.
214 * Event device pointer
217 * @param[out] queue_conf
218 * Event queue configuration structure
221 typedef void (*eventdev_queue_default_conf_get_t)(struct rte_eventdev *dev,
222 uint8_t queue_id, struct rte_event_queue_conf *queue_conf);
225 * Setup an event queue.
228 * Event device pointer
232 * Event queue configuration structure
235 * Returns 0 on success.
237 typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
239 const struct rte_event_queue_conf *queue_conf);
242 * Release resources allocated by given event queue.
245 * Event device pointer
250 typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
254 * Retrieve the default event port configuration.
257 * Event device pointer
260 * @param[out] port_conf
261 * Event port configuration structure
264 typedef void (*eventdev_port_default_conf_get_t)(struct rte_eventdev *dev,
265 uint8_t port_id, struct rte_event_port_conf *port_conf);
268 * Setup an event port.
271 * Event device pointer
275 * Event port configuration structure
278 * Returns 0 on success.
280 typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
282 const struct rte_event_port_conf *port_conf);
285 * Release memory resources allocated by given event port.
291 typedef void (*eventdev_port_release_t)(void *port);
294 * Link multiple source event queues to destination event port.
297 * Event device pointer
301 * Points to an array of *nb_links* event queues to be linked
304 * Points to an array of *nb_links* service priorities associated with each
305 * event queue link to event port.
307 * The number of links to establish
310 * Returns 0 on success.
313 typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port,
314 const uint8_t queues[], const uint8_t priorities[],
318 * Unlink multiple source event queues from destination event port.
321 * Event device pointer
325 * An array of *nb_unlinks* event queues to be unlinked from the event port.
327 * The number of unlinks to establish
330 * Returns 0 on success.
333 typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port,
334 uint8_t queues[], uint16_t nb_unlinks);
337 * Unlinks in progress. Returns number of unlinks that the PMD is currently
338 * performing, but have not yet been completed.
341 * Event device pointer
347 * Returns the number of in-progress unlinks. Zero is returned if none are
350 typedef int (*eventdev_port_unlinks_in_progress_t)(struct rte_eventdev *dev,
354 * Converts nanoseconds to *timeout_ticks* value for rte_event_dequeue()
357 * Event device pointer
359 * Wait time in nanosecond
360 * @param[out] timeout_ticks
361 * Value for the *timeout_ticks* parameter in rte_event_dequeue() function
364 * Returns 0 on success.
367 typedef int (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev,
368 uint64_t ns, uint64_t *timeout_ticks);
371 * Dump internal information
374 * Event device pointer
376 * A pointer to a file for output
379 typedef void (*eventdev_dump_t)(struct rte_eventdev *dev, FILE *f);
382 * Retrieve a set of statistics from device
385 * Event device pointer
387 * The stat ids to retrieve
389 * The returned stat values
391 * The number of id values and entries in the values array
393 * The number of stat values successfully filled into the values array
395 typedef int (*eventdev_xstats_get_t)(const struct rte_eventdev *dev,
396 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
397 const unsigned int ids[], uint64_t values[], unsigned int n);
400 * Resets the statistic values in xstats for the device, based on mode.
402 typedef int (*eventdev_xstats_reset_t)(struct rte_eventdev *dev,
403 enum rte_event_dev_xstats_mode mode,
404 int16_t queue_port_id,
405 const uint32_t ids[],
409 * Get names of extended stats of an event device
412 * Event device pointer
413 * @param xstats_names
414 * Array of name values to be filled in
416 * Number of values in the xstats_names array
418 * When size >= the number of stats, return the number of stat values filled
420 * When size < the number of available stats, return the number of stats
421 * values, and do not fill in any data into xstats_names.
423 typedef int (*eventdev_xstats_get_names_t)(const struct rte_eventdev *dev,
424 enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id,
425 struct rte_event_dev_xstats_name *xstats_names,
426 unsigned int *ids, unsigned int size);
429 * Get value of one stats and optionally return its id
432 * Event device pointer
434 * The name of the stat to retrieve
436 * Pointer to an unsigned int where we store the stat-id for future reference.
437 * This pointer may be null if the id is not required.
439 * The value of the stat, or (uint64_t)-1 if the stat is not found.
440 * If the stat is not found, the id value will be returned as (unsigned)-1,
441 * if id pointer is non-NULL
443 typedef uint64_t (*eventdev_xstats_get_by_name)(const struct rte_eventdev *dev,
444 const char *name, unsigned int *id);
448 * Retrieve the event device's ethdev Rx adapter capabilities for the
449 * specified ethernet port
452 * Event device pointer
455 * Ethernet device pointer
458 * A pointer to memory filled with Rx event adapter capabilities.
461 * - 0: Success, driver provides Rx event adapter capabilities for the
463 * - <0: Error code returned by the driver function.
466 typedef int (*eventdev_eth_rx_adapter_caps_get_t)
467 (const struct rte_eventdev *dev,
468 const struct rte_eth_dev *eth_dev,
471 struct rte_event_eth_rx_adapter_queue_conf;
474 * Retrieve the event device's timer adapter capabilities, as well as the ops
475 * structure that an event timer adapter should call through to enter the
479 * Event device pointer
482 * Flags that can be used to determine how to select an event timer
483 * adapter ops structure
486 * A pointer to memory filled with Rx event adapter capabilities.
489 * A pointer to the ops pointer to set with the address of the desired ops
493 * - 0: Success, driver provides Rx event adapter capabilities for the
495 * - <0: Error code returned by the driver function.
498 typedef int (*eventdev_timer_adapter_caps_get_t)(
499 const struct rte_eventdev *dev,
502 const struct rte_event_timer_adapter_ops **ops);
505 * Add ethernet Rx queues to event device. This callback is invoked if
506 * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id)
507 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
510 * Event device pointer
513 * Ethernet device pointer
516 * Ethernet device receive queue index
519 * Additional configuration structure
522 * - 0: Success, ethernet receive queue added successfully.
523 * - <0: Error code returned by the driver function.
526 typedef int (*eventdev_eth_rx_adapter_queue_add_t)(
527 const struct rte_eventdev *dev,
528 const struct rte_eth_dev *eth_dev,
530 const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
533 * Delete ethernet Rx queues from event device. This callback is invoked if
534 * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
535 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
538 * Event device pointer
541 * Ethernet device pointer
544 * Ethernet device receive queue index
547 * - 0: Success, ethernet receive queue deleted successfully.
548 * - <0: Error code returned by the driver function.
551 typedef int (*eventdev_eth_rx_adapter_queue_del_t)
552 (const struct rte_eventdev *dev,
553 const struct rte_eth_dev *eth_dev,
554 int32_t rx_queue_id);
557 * Start ethernet Rx adapter. This callback is invoked if
558 * the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_id)
559 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
560 * from eth_port_id have been added to the event device.
563 * Event device pointer
566 * Ethernet device pointer
569 * - 0: Success, ethernet Rx adapter started successfully.
570 * - <0: Error code returned by the driver function.
572 typedef int (*eventdev_eth_rx_adapter_start_t)
573 (const struct rte_eventdev *dev,
574 const struct rte_eth_dev *eth_dev);
577 * Stop ethernet Rx adapter. This callback is invoked if
578 * the caps returned from eventdev_eth_rx_adapter_caps_get(..,eth_port_id)
579 * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues
580 * from eth_port_id have been added to the event device.
583 * Event device pointer
586 * Ethernet device pointer
589 * - 0: Success, ethernet Rx adapter stopped successfully.
590 * - <0: Error code returned by the driver function.
592 typedef int (*eventdev_eth_rx_adapter_stop_t)
593 (const struct rte_eventdev *dev,
594 const struct rte_eth_dev *eth_dev);
596 struct rte_event_eth_rx_adapter_stats;
599 * Retrieve ethernet Rx adapter statistics.
602 * Event device pointer
605 * Ethernet device pointer
608 * Pointer to stats structure
611 * Return 0 on success.
614 typedef int (*eventdev_eth_rx_adapter_stats_get)
615 (const struct rte_eventdev *dev,
616 const struct rte_eth_dev *eth_dev,
617 struct rte_event_eth_rx_adapter_stats *stats);
619 * Reset ethernet Rx adapter statistics.
622 * Event device pointer
625 * Ethernet device pointer
628 * Return 0 on success.
630 typedef int (*eventdev_eth_rx_adapter_stats_reset)
631 (const struct rte_eventdev *dev,
632 const struct rte_eth_dev *eth_dev);
634 * Start eventdev selftest.
637 * Return 0 on success.
639 typedef int (*eventdev_selftest)(void);
641 typedef uint32_t rte_event_pmd_selftest_seqn_t;
642 extern int rte_event_pmd_selftest_seqn_dynfield_offset;
645 * Read test sequence number from mbuf.
647 * @param mbuf Structure to read from.
648 * @return pointer to test sequence number.
651 static inline rte_event_pmd_selftest_seqn_t *
652 rte_event_pmd_selftest_seqn(struct rte_mbuf *mbuf)
654 return RTE_MBUF_DYNFIELD(mbuf,
655 rte_event_pmd_selftest_seqn_dynfield_offset,
656 rte_event_pmd_selftest_seqn_t *);
659 struct rte_cryptodev;
662 * This API may change without prior notice
664 * Retrieve the event device's crypto adapter capabilities for the
665 * specified cryptodev
668 * Event device pointer
674 * A pointer to memory filled with event adapter capabilities.
675 * It is expected to be pre-allocated & initialized by caller.
678 * - 0: Success, driver provides event adapter capabilities for the
680 * - <0: Error code returned by the driver function.
683 typedef int (*eventdev_crypto_adapter_caps_get_t)
684 (const struct rte_eventdev *dev,
685 const struct rte_cryptodev *cdev,
689 * This API may change without prior notice
691 * Add crypto queue pair to event device. This callback is invoked if
692 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
693 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
696 * Event device pointer
701 * @param queue_pair_id
702 * cryptodev queue pair identifier.
705 * Event information required for binding cryptodev queue pair to event queue.
706 * This structure will have a valid value for only those HW PMDs supporting
707 * @see RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND capability.
710 * - 0: Success, cryptodev queue pair added successfully.
711 * - <0: Error code returned by the driver function.
714 typedef int (*eventdev_crypto_adapter_queue_pair_add_t)
715 (const struct rte_eventdev *dev,
716 const struct rte_cryptodev *cdev,
717 int32_t queue_pair_id,
718 const struct rte_event *event);
722 * This API may change without prior notice
724 * Delete crypto queue pair to event device. This callback is invoked if
725 * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id)
726 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.
729 * Event device pointer
734 * @param queue_pair_id
735 * cryptodev queue pair identifier.
738 * - 0: Success, cryptodev queue pair deleted successfully.
739 * - <0: Error code returned by the driver function.
742 typedef int (*eventdev_crypto_adapter_queue_pair_del_t)
743 (const struct rte_eventdev *dev,
744 const struct rte_cryptodev *cdev,
745 int32_t queue_pair_id);
748 * Start 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 started successfully.
761 * - <0: Error code returned by the driver function.
763 typedef int (*eventdev_crypto_adapter_start_t)
764 (const struct rte_eventdev *dev,
765 const struct rte_cryptodev *cdev);
768 * Stop crypto adapter. This callback is invoked if
769 * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id)
770 * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs
771 * from cdev_id have been added to the event device.
774 * Event device pointer
777 * Crypto device pointer
780 * - 0: Success, crypto adapter stopped successfully.
781 * - <0: Error code returned by the driver function.
783 typedef int (*eventdev_crypto_adapter_stop_t)
784 (const struct rte_eventdev *dev,
785 const struct rte_cryptodev *cdev);
787 struct rte_event_crypto_adapter_stats;
790 * Retrieve crypto adapter statistics.
793 * Event device pointer
796 * Crypto device pointer
799 * Pointer to stats structure
802 * Return 0 on success.
805 typedef int (*eventdev_crypto_adapter_stats_get)
806 (const struct rte_eventdev *dev,
807 const struct rte_cryptodev *cdev,
808 struct rte_event_crypto_adapter_stats *stats);
811 * Reset crypto adapter statistics.
814 * Event device pointer
817 * Crypto device pointer
820 * Return 0 on success.
823 typedef int (*eventdev_crypto_adapter_stats_reset)
824 (const struct rte_eventdev *dev,
825 const struct rte_cryptodev *cdev);
828 * Retrieve the event device's eth Tx adapter capabilities.
831 * Event device pointer
834 * Ethernet device pointer
837 * A pointer to memory filled with eth Tx adapter capabilities.
840 * - 0: Success, driver provides eth Tx adapter capabilities
841 * - <0: Error code returned by the driver function.
844 typedef int (*eventdev_eth_tx_adapter_caps_get_t)
845 (const struct rte_eventdev *dev,
846 const struct rte_eth_dev *eth_dev,
850 * Create adapter callback.
856 * Event device pointer
860 * - <0: Error code on failure.
862 typedef int (*eventdev_eth_tx_adapter_create_t)(uint8_t id,
863 const struct rte_eventdev *dev);
866 * Free adapter callback.
872 * Event device pointer
876 * - <0: Error code on failure.
878 typedef int (*eventdev_eth_tx_adapter_free_t)(uint8_t id,
879 const struct rte_eventdev *dev);
882 * Add a Tx queue to the adapter.
883 * A queue value of -1 is used to indicate all
884 * queues within the device.
890 * Event device pointer
893 * Ethernet device pointer
896 * Transmit queue index
900 * - <0: Error code on failure.
902 typedef int (*eventdev_eth_tx_adapter_queue_add_t)(
904 const struct rte_eventdev *dev,
905 const struct rte_eth_dev *eth_dev,
906 int32_t tx_queue_id);
909 * Delete a Tx queue from the adapter.
910 * A queue value of -1 is used to indicate all
911 * queues within the device, that have been added to this
918 * Event device pointer
921 * Ethernet device pointer
924 * Transmit queue index
927 * - 0: Success, Queues deleted successfully.
928 * - <0: Error code on failure.
930 typedef int (*eventdev_eth_tx_adapter_queue_del_t)(
932 const struct rte_eventdev *dev,
933 const struct rte_eth_dev *eth_dev,
934 int32_t tx_queue_id);
943 * Event device pointer
946 * - 0: Success, Adapter started correctly.
947 * - <0: Error code on failure.
949 typedef int (*eventdev_eth_tx_adapter_start_t)(uint8_t id,
950 const struct rte_eventdev *dev);
959 * Event device pointer
963 * - <0: Error code on failure.
965 typedef int (*eventdev_eth_tx_adapter_stop_t)(uint8_t id,
966 const struct rte_eventdev *dev);
968 struct rte_event_eth_tx_adapter_stats;
971 * Retrieve statistics for an adapter
977 * Event device pointer
980 * A pointer to structure used to retrieve statistics for an adapter
983 * - 0: Success, statistics retrieved successfully.
984 * - <0: Error code on failure.
986 typedef int (*eventdev_eth_tx_adapter_stats_get_t)(
988 const struct rte_eventdev *dev,
989 struct rte_event_eth_tx_adapter_stats *stats);
992 * Reset statistics for an adapter
998 * Event device pointer
1001 * - 0: Success, statistics retrieved successfully.
1002 * - <0: Error code on failure.
1004 typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id,
1005 const struct rte_eventdev *dev);
1007 /** Event device operations function pointer table */
1008 struct rte_eventdev_ops {
1009 eventdev_info_get_t dev_infos_get; /**< Get device info. */
1010 eventdev_configure_t dev_configure; /**< Configure device. */
1011 eventdev_start_t dev_start; /**< Start device. */
1012 eventdev_stop_t dev_stop; /**< Stop device. */
1013 eventdev_close_t dev_close; /**< Close device. */
1015 eventdev_queue_default_conf_get_t queue_def_conf;
1016 /**< Get default queue configuration. */
1017 eventdev_queue_setup_t queue_setup;
1018 /**< Set up an event queue. */
1019 eventdev_queue_release_t queue_release;
1020 /**< Release an event queue. */
1022 eventdev_port_default_conf_get_t port_def_conf;
1023 /**< Get default port configuration. */
1024 eventdev_port_setup_t port_setup;
1025 /**< Set up an event port. */
1026 eventdev_port_release_t port_release;
1027 /**< Release an event port. */
1029 eventdev_port_link_t port_link;
1030 /**< Link event queues to an event port. */
1031 eventdev_port_unlink_t port_unlink;
1032 /**< Unlink event queues from an event port. */
1033 eventdev_port_unlinks_in_progress_t port_unlinks_in_progress;
1034 /**< Unlinks in progress on an event port. */
1035 eventdev_dequeue_timeout_ticks_t timeout_ticks;
1036 /**< Converts ns to *timeout_ticks* value for rte_event_dequeue() */
1037 eventdev_dump_t dump;
1038 /* Dump internal information */
1040 eventdev_xstats_get_t xstats_get;
1041 /**< Get extended device statistics. */
1042 eventdev_xstats_get_names_t xstats_get_names;
1043 /**< Get names of extended stats. */
1044 eventdev_xstats_get_by_name xstats_get_by_name;
1045 /**< Get one value by name. */
1046 eventdev_xstats_reset_t xstats_reset;
1047 /**< Reset the statistics values in xstats. */
1049 eventdev_eth_rx_adapter_caps_get_t eth_rx_adapter_caps_get;
1050 /**< Get ethernet Rx adapter capabilities */
1051 eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
1052 /**< Add Rx queues to ethernet Rx adapter */
1053 eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
1054 /**< Delete Rx queues from ethernet Rx adapter */
1055 eventdev_eth_rx_adapter_start_t eth_rx_adapter_start;
1056 /**< Start ethernet Rx adapter */
1057 eventdev_eth_rx_adapter_stop_t eth_rx_adapter_stop;
1058 /**< Stop ethernet Rx adapter */
1059 eventdev_eth_rx_adapter_stats_get eth_rx_adapter_stats_get;
1060 /**< Get ethernet Rx stats */
1061 eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset;
1062 /**< Reset ethernet Rx stats */
1064 eventdev_timer_adapter_caps_get_t timer_adapter_caps_get;
1065 /**< Get timer adapter capabilities */
1067 eventdev_crypto_adapter_caps_get_t crypto_adapter_caps_get;
1068 /**< Get crypto adapter capabilities */
1069 eventdev_crypto_adapter_queue_pair_add_t crypto_adapter_queue_pair_add;
1070 /**< Add queue pair to crypto adapter */
1071 eventdev_crypto_adapter_queue_pair_del_t crypto_adapter_queue_pair_del;
1072 /**< Delete queue pair from crypto adapter */
1073 eventdev_crypto_adapter_start_t crypto_adapter_start;
1074 /**< Start crypto adapter */
1075 eventdev_crypto_adapter_stop_t crypto_adapter_stop;
1076 /**< Stop crypto adapter */
1077 eventdev_crypto_adapter_stats_get crypto_adapter_stats_get;
1078 /**< Get crypto stats */
1079 eventdev_crypto_adapter_stats_reset crypto_adapter_stats_reset;
1080 /**< Reset crypto stats */
1082 eventdev_eth_tx_adapter_caps_get_t eth_tx_adapter_caps_get;
1083 /**< Get ethernet Tx adapter capabilities */
1085 eventdev_eth_tx_adapter_create_t eth_tx_adapter_create;
1086 /**< Create adapter callback */
1087 eventdev_eth_tx_adapter_free_t eth_tx_adapter_free;
1088 /**< Free adapter callback */
1089 eventdev_eth_tx_adapter_queue_add_t eth_tx_adapter_queue_add;
1090 /**< Add Tx queues to the eth Tx adapter */
1091 eventdev_eth_tx_adapter_queue_del_t eth_tx_adapter_queue_del;
1092 /**< Delete Tx queues from the eth Tx adapter */
1093 eventdev_eth_tx_adapter_start_t eth_tx_adapter_start;
1094 /**< Start eth Tx adapter */
1095 eventdev_eth_tx_adapter_stop_t eth_tx_adapter_stop;
1096 /**< Stop eth Tx adapter */
1097 eventdev_eth_tx_adapter_stats_get_t eth_tx_adapter_stats_get;
1098 /**< Get eth Tx adapter statistics */
1099 eventdev_eth_tx_adapter_stats_reset_t eth_tx_adapter_stats_reset;
1100 /**< Reset eth Tx adapter statistics */
1102 eventdev_selftest dev_selftest;
1103 /**< Start eventdev Selftest */
1105 eventdev_stop_flush_t dev_stop_flush;
1106 /**< User-provided event flush function */
1110 * Allocates a new eventdev slot for an event device and returns the pointer
1111 * to that slot for the driver to use.
1114 * Unique identifier name for each device
1116 * Socket to allocate resources on.
1118 * - Slot in the rte_dev_devices array for a new device;
1120 struct rte_eventdev *
1121 rte_event_pmd_allocate(const char *name, int socket_id);
1124 * Release the specified eventdev device.
1127 * The *eventdev* pointer is the address of the *rte_eventdev* structure.
1129 * - 0 on success, negative on error
1132 rte_event_pmd_release(struct rte_eventdev *eventdev);
1138 #endif /* _RTE_EVENTDEV_PMD_H_ */