DPDK  24.11.0-rc0
rte_event_dma_adapter.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2023 Marvell.
3  */
4 
5 #ifndef RTE_EVENT_DMA_ADAPTER
6 #define RTE_EVENT_DMA_ADAPTER
7 
144 #include <stdint.h>
145 
146 #include <rte_common.h>
147 #include <rte_dmadev_pmd.h>
148 #include <rte_eventdev.h>
149 
150 #ifdef __cplusplus
151 extern "C" {
152 #endif
153 
160  uint64_t flags;
168  uint32_t rsvd;
170  uint64_t impl_opaque[2];
177  uint64_t user_meta;
181  uint64_t event_meta;
195  int16_t dma_dev_id;
199  uint16_t vchan;
203  uint16_t nb_src;
205  uint16_t nb_dst;
209 };
210 
231 };
232 
240  uint8_t event_port_id;
245  uint32_t max_nb;
250 };
251 
256  uint32_t max_nb;
270  uint32_t rsvd[15];
272 };
273 
291 typedef int (*rte_event_dma_adapter_conf_cb)(uint8_t id, uint8_t evdev_id,
292  struct rte_event_dma_adapter_conf *conf, void *arg);
293 
301  uint64_t event_deq_count;
304  uint64_t dma_enq_count;
310  uint64_t dma_deq_count;
313  uint64_t event_enq_count;
321 };
322 
343 __rte_experimental
344 int rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id,
346  enum rte_event_dma_adapter_mode mode, void *conf_arg);
347 
369 __rte_experimental
370 int rte_event_dma_adapter_create(uint8_t id, uint8_t evdev_id,
371  struct rte_event_port_conf *port_config,
372  enum rte_event_dma_adapter_mode mode);
373 
384 __rte_experimental
385 int rte_event_dma_adapter_free(uint8_t id);
386 
401 __rte_experimental
402 int rte_event_dma_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
403 
423 __rte_experimental
424 int rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dmadev_id, uint16_t vchan,
425  const struct rte_event *event);
426 
441 __rte_experimental
442 int rte_event_dma_adapter_vchan_del(uint8_t id, int16_t dmadev_id, uint16_t vchan);
443 
458 __rte_experimental
459 int rte_event_dma_adapter_service_id_get(uint8_t id, uint32_t *service_id);
460 
474 __rte_experimental
475 int rte_event_dma_adapter_start(uint8_t id);
476 
487 __rte_experimental
488 int rte_event_dma_adapter_stop(uint8_t id);
489 
500 __rte_experimental
502 
520 __rte_experimental
522  struct rte_event_dma_adapter_runtime_params *params);
523 
538 __rte_experimental
540  struct rte_event_dma_adapter_runtime_params *params);
541 
554 __rte_experimental
555 int rte_event_dma_adapter_stats_get(uint8_t id, struct rte_event_dma_adapter_stats *stats);
556 
567 __rte_experimental
568 int rte_event_dma_adapter_stats_reset(uint8_t id);
569 
604 __rte_experimental
605 uint16_t rte_event_dma_adapter_enqueue(uint8_t evdev_id, uint8_t port_id, struct rte_event ev[],
606  uint16_t nb_events);
607 
608 #ifdef __cplusplus
609 }
610 #endif
611 
612 #endif /* RTE_EVENT_DMA_ADAPTER */
__rte_experimental int rte_event_dma_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
__rte_experimental int rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dmadev_id, uint16_t vchan, const struct rte_event *event)
__rte_experimental int rte_event_dma_adapter_create(uint8_t id, uint8_t evdev_id, struct rte_event_port_conf *port_config, enum rte_event_dma_adapter_mode mode)
enum rte_dma_status_code status
__rte_experimental int rte_event_dma_adapter_stats_get(uint8_t id, struct rte_event_dma_adapter_stats *stats)
__rte_experimental int rte_event_dma_adapter_stop(uint8_t id)
__rte_experimental int rte_event_dma_adapter_stats_reset(uint8_t id)
__rte_experimental int rte_event_dma_adapter_service_id_get(uint8_t id, uint32_t *service_id)
__rte_experimental int rte_event_dma_adapter_runtime_params_get(uint8_t id, struct rte_event_dma_adapter_runtime_params *params)
__rte_experimental int rte_event_dma_adapter_start(uint8_t id)
__rte_experimental uint16_t rte_event_dma_adapter_enqueue(uint8_t evdev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events)
__rte_experimental int rte_event_dma_adapter_vchan_del(uint8_t id, int16_t dmadev_id, uint16_t vchan)
__rte_experimental int rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id, rte_event_dma_adapter_conf_cb conf_cb, enum rte_event_dma_adapter_mode mode, void *conf_arg)
__rte_experimental int rte_event_dma_adapter_free(uint8_t id)
__rte_experimental int rte_event_dma_adapter_runtime_params_init(struct rte_event_dma_adapter_runtime_params *params)
rte_dma_status_code
Definition: rte_dmadev.h:706
int(* rte_event_dma_adapter_conf_cb)(uint8_t id, uint8_t evdev_id, struct rte_event_dma_adapter_conf *conf, void *arg)
rte_event_dma_adapter_mode
struct rte_dma_sge src_dst_seg[0]
__rte_experimental int rte_event_dma_adapter_runtime_params_set(uint8_t id, struct rte_event_dma_adapter_runtime_params *params)