DPDK 22.11.7
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
167#ifdef __cplusplus
168extern "C" {
169#endif
170
171#include <stdint.h>
172
173#include "rte_eventdev.h"
174
195};
196
202 uint8_t resv[8];
207 uint16_t cdev_id;
211 uint32_t resv1;
213};
214
236};
237
249 uint32_t max_nb;
254};
255
256#define RTE_EVENT_CRYPTO_ADAPTER_EVENT_VECTOR 0x1
266 uint32_t flags;
270 struct rte_event ev;
275 uint16_t vector_sz;
300};
301
306 uint16_t min_sz;
310 uint16_t max_sz;
314 uint8_t log2_sz;
326};
327
349typedef int (*rte_event_crypto_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
351 void *arg);
352
375};
376
402int
403rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
406 void *conf_arg);
407
435int
436rte_event_crypto_adapter_create(uint8_t id, uint8_t dev_id,
437 struct rte_event_port_conf *port_config,
439
451int
453
475int
477 uint8_t cdev_id,
478 int32_t queue_pair_id,
479 const struct rte_event_crypto_adapter_queue_conf *conf);
480
497int
498rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
499 int32_t queue_pair_id);
500
516int
518
529int
531
545int
547 struct rte_event_crypto_adapter_stats *stats);
548
559int
561
577int
578rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id);
579
594int
595rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
596
616__rte_experimental
618 uint8_t dev_id, uint16_t cdev_id,
620
661static inline uint16_t
663 uint8_t port_id,
664 struct rte_event ev[],
665 uint16_t nb_events)
666{
667 const struct rte_event_fp_ops *fp_ops;
668 void *port;
669
670 fp_ops = &rte_event_fp_ops[dev_id];
671 port = fp_ops->data[port_id];
672#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
673 if (dev_id >= RTE_EVENT_MAX_DEVS ||
674 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
675 rte_errno = EINVAL;
676 return 0;
677 }
678
679 if (port == NULL) {
680 rte_errno = EINVAL;
681 return 0;
682 }
683#endif
684 rte_eventdev_trace_crypto_adapter_enqueue(dev_id, port_id, ev,
685 nb_events);
686
687 return fp_ops->ca_enqueue(port, ev, nb_events);
688}
689
690#ifdef __cplusplus
691}
692#endif
693#endif /* _RTE_EVENT_CRYPTO_ADAPTER_ */
#define rte_errno
Definition: rte_errno.h:29
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_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_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