DPDK 25.03.0-rc0
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#include <stdint.h>
171
172#include "rte_eventdev.h"
173
174#ifdef __cplusplus
175extern "C" {
176#endif
177
198};
199
205 uint8_t resv[8];
210 uint16_t cdev_id;
214 uint32_t resv1;
216};
217
239};
240
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
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;
354};
355
377typedef int (*rte_event_crypto_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
379 void *arg);
380
403};
404
430int
431rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
434 void *conf_arg);
435
477int
478rte_event_crypto_adapter_create(uint8_t id, uint8_t dev_id,
479 struct rte_event_port_conf *port_config,
481
493int
495
517int
519 uint8_t cdev_id,
520 int32_t queue_pair_id,
521 const struct rte_event_crypto_adapter_queue_conf *conf);
522
539int
540rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
541 int32_t queue_pair_id);
542
558int
560
571int
573
587int
589 struct rte_event_crypto_adapter_stats *stats);
590
601int
603
619int
620rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id);
621
636int
637rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
638
649__rte_experimental
650int
653
672__rte_experimental
673int
676
691__rte_experimental
692int
695
713 uint8_t dev_id, uint16_t cdev_id,
715
756static inline uint16_t
758 uint8_t port_id,
759 struct rte_event ev[],
760 uint16_t nb_events)
761{
762 const struct rte_event_fp_ops *fp_ops;
763 void *port;
764
765 fp_ops = &rte_event_fp_ops[dev_id];
766 port = fp_ops->data[port_id];
767#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
768 if (dev_id >= RTE_EVENT_MAX_DEVS ||
769 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
770 rte_errno = EINVAL;
771 return 0;
772 }
773
774 if (port == NULL) {
775 rte_errno = EINVAL;
776 return 0;
777 }
778#endif
779 rte_eventdev_trace_crypto_adapter_enqueue(dev_id, port_id, ev,
780 nb_events);
781
782 return fp_ops->ca_enqueue(port, ev, nb_events);
783}
784
785#ifdef __cplusplus
786}
787#endif
788#endif /* _RTE_EVENT_CRYPTO_ADAPTER_ */
#define rte_errno
Definition: rte_errno.h:29
__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_event_port_get(uint8_t id, uint8_t *event_port_id)
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)
int rte_event_crypto_adapter_stop(uint8_t id)
int(* rte_event_crypto_adapter_conf_cb)(uint8_t id, uint8_t dev_id, struct rte_event_crypto_adapter_conf *conf, void *arg)
int rte_event_crypto_adapter_start(uint8_t id)
int rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id, int32_t queue_pair_id)
static uint16_t rte_event_crypto_adapter_enqueue(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events)
__rte_experimental int rte_event_crypto_adapter_runtime_params_get(uint8_t id, struct rte_event_crypto_adapter_runtime_params *params)
rte_event_crypto_adapter_mode
@ RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD
@ RTE_EVENT_CRYPTO_ADAPTER_OP_NEW
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_service_id_get(uint8_t id, uint32_t *service_id)
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_free(uint8_t id)
int rte_event_crypto_adapter_stats_reset(uint8_t id)
__rte_experimental int rte_event_crypto_adapter_runtime_params_init(struct rte_event_crypto_adapter_runtime_params *params)
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_stats_get(uint8_t id, struct rte_event_crypto_adapter_stats *stats)
struct rte_event_crypto_request request_info