DPDK 21.11.9
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
277typedef int (*rte_event_crypto_adapter_conf_cb) (uint8_t id, uint8_t dev_id,
279 void *arg);
280
303};
304
330int
331rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
334 void *conf_arg);
335
363int
364rte_event_crypto_adapter_create(uint8_t id, uint8_t dev_id,
365 struct rte_event_port_conf *port_config,
367
379int
381
404int
406 uint8_t cdev_id,
407 int32_t queue_pair_id,
408 const struct rte_event *event);
409
426int
427rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
428 int32_t queue_pair_id);
429
445int
447
458int
460
474int
476 struct rte_event_crypto_adapter_stats *stats);
477
488int
490
506int
507rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id);
508
523int
524rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
525
566static inline uint16_t
568 uint8_t port_id,
569 struct rte_event ev[],
570 uint16_t nb_events)
571{
572 const struct rte_event_fp_ops *fp_ops;
573 void *port;
574
575 fp_ops = &rte_event_fp_ops[dev_id];
576 port = fp_ops->data[port_id];
577#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
578 if (dev_id >= RTE_EVENT_MAX_DEVS ||
579 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) {
580 rte_errno = EINVAL;
581 return 0;
582 }
583
584 if (port == NULL) {
585 rte_errno = EINVAL;
586 return 0;
587 }
588#endif
589 rte_eventdev_trace_crypto_adapter_enqueue(dev_id, port_id, ev,
590 nb_events);
591
592 return fp_ops->ca_enqueue(port, ev, nb_events);
593}
594
595#ifdef __cplusplus
596}
597#endif
598#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_free(uint8_t id)
int rte_event_crypto_adapter_stats_reset(uint8_t 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 *event)
int rte_event_crypto_adapter_stats_get(uint8_t id, struct rte_event_crypto_adapter_stats *stats)
struct rte_event_crypto_request request_info