DPDK  23.03.0
rte_event_crypto_adapter.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation.
3  * All rights reserved.
4  */
5 
6 #ifndef _RTE_EVENT_CRYPTO_ADAPTER_
7 #define _RTE_EVENT_CRYPTO_ADAPTER_
8 
170 #ifdef __cplusplus
171 extern "C" {
172 #endif
173 
174 #include <stdint.h>
175 
176 #include "rte_eventdev.h"
177 
198 };
199 
205  uint8_t resv[8];
210  uint16_t cdev_id;
212  uint16_t queue_pair_id;
214  uint32_t resv1;
216 };
217 
229  struct rte_event_crypto_request request_info;
234  struct rte_event response_info;
239 };
240 
247  uint8_t event_port_id;
252  uint32_t max_nb;
257 };
258 
263  uint32_t max_nb;
280  uint32_t rsvd[15];
282 };
283 
284 #define RTE_EVENT_CRYPTO_ADAPTER_EVENT_VECTOR 0x1
285 
294  uint32_t flags;
298  struct rte_event ev;
303  uint16_t vector_sz;
328 };
329 
334  uint16_t min_sz;
338  uint16_t max_sz;
342  uint8_t log2_sz;
346  uint64_t min_timeout_ns;
350  uint64_t max_timeout_ns;
354 };
355 
377 typedef int (*rte_event_crypto_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
378  struct rte_event_crypto_adapter_conf *conf,
379  void *arg);
380 
389  uint64_t event_deq_count;
393  uint64_t crypto_enq_fail;
397  uint64_t event_enq_count;
403 };
404 
430 int
431 rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
434  void *conf_arg);
435 
477 int
478 rte_event_crypto_adapter_create(uint8_t id, uint8_t dev_id,
479  struct rte_event_port_conf *port_config,
481 
493 int
495 
517 int
519  uint8_t cdev_id,
520  int32_t queue_pair_id,
521  const struct rte_event_crypto_adapter_queue_conf *conf);
522 
539 int
541  int32_t queue_pair_id);
542 
558 int
560 
571 int
573 
587 int
589  struct rte_event_crypto_adapter_stats *stats);
590 
601 int
603 
619 int
620 rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id);
621 
636 int
637 rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
638 
649 __rte_experimental
650 int
653 
672 __rte_experimental
673 int
676 
691 __rte_experimental
692 int
695 
715 __rte_experimental
717  uint8_t dev_id, uint16_t cdev_id,
719 
760 static inline uint16_t
762  uint8_t port_id,
763  struct rte_event ev[],
764  uint16_t nb_events)
765 {
766  const struct rte_event_fp_ops *fp_ops;
767  void *port;
768 
769  fp_ops = &rte_event_fp_ops[dev_id];
770  port = fp_ops->data[port_id];
771 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
772  if (dev_id >= RTE_EVENT_MAX_DEVS ||
773  port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
774  rte_errno = EINVAL;
775  return 0;
776  }
777 
778  if (port == NULL) {
779  rte_errno = EINVAL;
780  return 0;
781  }
782 #endif
783  rte_eventdev_trace_crypto_adapter_enqueue(dev_id, port_id, ev,
784  nb_events);
785 
786  return fp_ops->ca_enqueue(port, ev, nb_events);
787 }
788 
789 #ifdef __cplusplus
790 }
791 #endif
792 #endif /* _RTE_EVENT_CRYPTO_ADAPTER_ */
__rte_experimental int rte_event_crypto_adapter_runtime_params_set(uint8_t id, struct rte_event_crypto_adapter_runtime_params *params)
int rte_event_crypto_adapter_stats_get(uint8_t id, struct rte_event_crypto_adapter_stats *stats)
int rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id, rte_event_crypto_adapter_conf_cb conf_cb, enum rte_event_crypto_adapter_mode mode, void *conf_arg)
int rte_event_crypto_adapter_start(uint8_t id)
int rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id)
__rte_experimental int rte_event_crypto_adapter_runtime_params_get(uint8_t id, struct rte_event_crypto_adapter_runtime_params *params)
#define rte_errno
Definition: rte_errno.h:29
rte_event_crypto_adapter_mode
static uint16_t rte_event_crypto_adapter_enqueue(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events)
int rte_event_crypto_adapter_stats_reset(uint8_t id)
int rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
__rte_experimental int rte_event_crypto_adapter_runtime_params_init(struct rte_event_crypto_adapter_runtime_params *params)
int rte_event_crypto_adapter_queue_pair_add(uint8_t id, uint8_t cdev_id, int32_t queue_pair_id, const struct rte_event_crypto_adapter_queue_conf *conf)
int rte_event_crypto_adapter_create(uint8_t id, uint8_t dev_id, struct rte_event_port_conf *port_config, enum rte_event_crypto_adapter_mode mode)
uint16_t rsvd
int rte_event_crypto_adapter_free(uint8_t id)
int rte_event_crypto_adapter_stop(uint8_t id)
int rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id, int32_t queue_pair_id)
__rte_experimental int rte_event_crypto_adapter_vector_limits_get(uint8_t dev_id, uint16_t cdev_id, struct rte_event_crypto_adapter_vector_limits *limits)
int(* rte_event_crypto_adapter_conf_cb)(uint8_t id, uint8_t dev_id, struct rte_event_crypto_adapter_conf *conf, void *arg)