DPDK
25.11.0
Toggle main menu visibility
Loading...
Searching...
No Matches
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
169
170
#include <stdint.h>
171
172
#include "
rte_eventdev.h
"
173
174
#ifdef __cplusplus
175
extern
"C"
{
176
#endif
177
181
enum
rte_event_crypto_adapter_mode
{
182
RTE_EVENT_CRYPTO_ADAPTER_OP_NEW
,
189
RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD
,
198
};
199
204
struct
rte_event_crypto_request
{
205
uint8_t
resv
[8];
210
uint16_t
cdev_id
;
212
uint16_t
queue_pair_id
;
214
uint32_t
resv1
;
216
};
217
228
union
rte_event_crypto_metadata
{
229
struct
rte_event_crypto_request
request_info
;
234
struct
rte_event
response_info
;
239
};
240
246
struct
rte_event_crypto_adapter_conf
{
247
uint8_t
event_port_id
;
252
uint32_t
max_nb
;
257
};
258
262
struct
rte_event_crypto_adapter_runtime_params
{
263
uint32_t
max_nb
;
280
uint32_t
rsvd
[15];
282
};
283
284
#define RTE_EVENT_CRYPTO_ADAPTER_EVENT_VECTOR 0x1
289
293
struct
rte_event_crypto_adapter_queue_conf
{
294
uint32_t
flags
;
298
struct
rte_event
ev
;
303
uint16_t
vector_sz
;
311
uint64_t
vector_timeout_ns
;
321
struct
rte_mempool
*
vector_mp
;
328
};
329
333
struct
rte_event_crypto_adapter_vector_limits
{
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
385
386
struct
rte_event_crypto_adapter_stats
{
387
uint64_t
event_poll_count
;
389
uint64_t
event_deq_count
;
391
uint64_t
crypto_enq_count
;
393
uint64_t
crypto_enq_fail
;
395
uint64_t
crypto_deq_count
;
397
uint64_t
event_enq_count
;
399
uint64_t
event_enq_retry_count
;
401
uint64_t
event_enq_fail_count
;
403
};
404
430
int
431
rte_event_crypto_adapter_create_ext
(uint8_t
id
, uint8_t dev_id,
432
rte_event_crypto_adapter_conf_cb
conf_cb,
433
enum
rte_event_crypto_adapter_mode
mode,
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,
480
enum
rte_event_crypto_adapter_mode
mode);
481
493
int
494
rte_event_crypto_adapter_free
(uint8_t
id
);
495
517
int
518
rte_event_crypto_adapter_queue_pair_add
(uint8_t
id
,
519
uint8_t cdev_id,
520
int32_t queue_pair_id,
521
const
struct
rte_event_crypto_adapter_queue_conf
*conf);
522
539
int
540
rte_event_crypto_adapter_queue_pair_del
(uint8_t
id
, uint8_t cdev_id,
541
int32_t queue_pair_id);
542
558
int
559
rte_event_crypto_adapter_start
(uint8_t
id
);
560
571
int
572
rte_event_crypto_adapter_stop
(uint8_t
id
);
573
587
int
588
rte_event_crypto_adapter_stats_get
(uint8_t
id
,
589
struct
rte_event_crypto_adapter_stats
*stats);
590
601
int
602
rte_event_crypto_adapter_stats_reset
(uint8_t
id
);
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
651
rte_event_crypto_adapter_runtime_params_init
(
652
struct
rte_event_crypto_adapter_runtime_params
*params);
653
672
__rte_experimental
673
int
674
rte_event_crypto_adapter_runtime_params_set
(uint8_t
id
,
675
struct
rte_event_crypto_adapter_runtime_params
*params);
676
691
__rte_experimental
692
int
693
rte_event_crypto_adapter_runtime_params_get
(uint8_t
id
,
694
struct
rte_event_crypto_adapter_runtime_params
*params);
695
712
int
rte_event_crypto_adapter_vector_limits_get
(
713
uint8_t dev_id, uint16_t cdev_id,
714
struct
rte_event_crypto_adapter_vector_limits
*limits);
715
756
static
inline
uint16_t
757
rte_event_crypto_adapter_enqueue
(uint8_t dev_id,
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_ */
rte_errno
#define rte_errno
Definition
rte_errno.h:29
rte_event_crypto_adapter_runtime_params_set
__rte_experimental int rte_event_crypto_adapter_runtime_params_set(uint8_t id, struct rte_event_crypto_adapter_runtime_params *params)
rte_event_crypto_adapter_event_port_get
int rte_event_crypto_adapter_event_port_get(uint8_t id, uint8_t *event_port_id)
rte_event_crypto_adapter_create
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)
rte_event_crypto_adapter_stop
int rte_event_crypto_adapter_stop(uint8_t id)
rte_event_crypto_adapter_conf_cb
int(* rte_event_crypto_adapter_conf_cb)(uint8_t id, uint8_t dev_id, struct rte_event_crypto_adapter_conf *conf, void *arg)
Definition
rte_event_crypto_adapter.h:377
rte_event_crypto_adapter_start
int rte_event_crypto_adapter_start(uint8_t id)
rte_event_crypto_adapter_queue_pair_del
int rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id, int32_t queue_pair_id)
rte_event_crypto_adapter_enqueue
static uint16_t rte_event_crypto_adapter_enqueue(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events)
Definition
rte_event_crypto_adapter.h:757
rte_event_crypto_adapter_runtime_params_get
__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_mode
Definition
rte_event_crypto_adapter.h:181
RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD
@ RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD
Definition
rte_event_crypto_adapter.h:189
RTE_EVENT_CRYPTO_ADAPTER_OP_NEW
@ RTE_EVENT_CRYPTO_ADAPTER_OP_NEW
Definition
rte_event_crypto_adapter.h:182
rte_event_crypto_adapter_create_ext
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)
rte_event_crypto_adapter_service_id_get
int rte_event_crypto_adapter_service_id_get(uint8_t id, uint32_t *service_id)
rte_event_crypto_adapter_queue_pair_add
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)
rte_event_crypto_adapter_free
int rte_event_crypto_adapter_free(uint8_t id)
rte_event_crypto_adapter_stats_reset
int rte_event_crypto_adapter_stats_reset(uint8_t id)
rte_event_crypto_adapter_runtime_params_init
__rte_experimental int rte_event_crypto_adapter_runtime_params_init(struct rte_event_crypto_adapter_runtime_params *params)
rte_event_crypto_adapter_vector_limits_get
int rte_event_crypto_adapter_vector_limits_get(uint8_t dev_id, uint16_t cdev_id, struct rte_event_crypto_adapter_vector_limits *limits)
rte_event_crypto_adapter_stats_get
int rte_event_crypto_adapter_stats_get(uint8_t id, struct rte_event_crypto_adapter_stats *stats)
rte_eventdev.h
rte_event_crypto_adapter_conf
Definition
rte_event_crypto_adapter.h:246
rte_event_crypto_adapter_conf::event_port_id
uint8_t event_port_id
Definition
rte_event_crypto_adapter.h:247
rte_event_crypto_adapter_conf::max_nb
uint32_t max_nb
Definition
rte_event_crypto_adapter.h:252
rte_event_crypto_adapter_queue_conf
Definition
rte_event_crypto_adapter.h:293
rte_event_crypto_adapter_queue_conf::flags
uint32_t flags
Definition
rte_event_crypto_adapter.h:294
rte_event_crypto_adapter_queue_conf::vector_sz
uint16_t vector_sz
Definition
rte_event_crypto_adapter.h:303
rte_event_crypto_adapter_queue_conf::vector_timeout_ns
uint64_t vector_timeout_ns
Definition
rte_event_crypto_adapter.h:311
rte_event_crypto_adapter_queue_conf::vector_mp
struct rte_mempool * vector_mp
Definition
rte_event_crypto_adapter.h:321
rte_event_crypto_adapter_queue_conf::ev
struct rte_event ev
Definition
rte_event_crypto_adapter.h:298
rte_event_crypto_adapter_runtime_params
Definition
rte_event_crypto_adapter.h:262
rte_event_crypto_adapter_runtime_params::max_nb
uint32_t max_nb
Definition
rte_event_crypto_adapter.h:263
rte_event_crypto_adapter_runtime_params::rsvd
uint32_t rsvd[15]
Definition
rte_event_crypto_adapter.h:280
rte_event_crypto_adapter_stats
Definition
rte_event_crypto_adapter.h:386
rte_event_crypto_adapter_stats::event_enq_fail_count
uint64_t event_enq_fail_count
Definition
rte_event_crypto_adapter.h:401
rte_event_crypto_adapter_stats::event_deq_count
uint64_t event_deq_count
Definition
rte_event_crypto_adapter.h:389
rte_event_crypto_adapter_stats::crypto_deq_count
uint64_t crypto_deq_count
Definition
rte_event_crypto_adapter.h:395
rte_event_crypto_adapter_stats::event_enq_retry_count
uint64_t event_enq_retry_count
Definition
rte_event_crypto_adapter.h:399
rte_event_crypto_adapter_stats::event_enq_count
uint64_t event_enq_count
Definition
rte_event_crypto_adapter.h:397
rte_event_crypto_adapter_stats::crypto_enq_count
uint64_t crypto_enq_count
Definition
rte_event_crypto_adapter.h:391
rte_event_crypto_adapter_stats::event_poll_count
uint64_t event_poll_count
Definition
rte_event_crypto_adapter.h:387
rte_event_crypto_adapter_stats::crypto_enq_fail
uint64_t crypto_enq_fail
Definition
rte_event_crypto_adapter.h:393
rte_event_crypto_adapter_vector_limits
Definition
rte_event_crypto_adapter.h:333
rte_event_crypto_adapter_vector_limits::min_timeout_ns
uint64_t min_timeout_ns
Definition
rte_event_crypto_adapter.h:346
rte_event_crypto_adapter_vector_limits::max_sz
uint16_t max_sz
Definition
rte_event_crypto_adapter.h:338
rte_event_crypto_adapter_vector_limits::min_sz
uint16_t min_sz
Definition
rte_event_crypto_adapter.h:334
rte_event_crypto_adapter_vector_limits::max_timeout_ns
uint64_t max_timeout_ns
Definition
rte_event_crypto_adapter.h:350
rte_event_crypto_adapter_vector_limits::log2_sz
uint8_t log2_sz
Definition
rte_event_crypto_adapter.h:342
rte_event_crypto_request
Definition
rte_event_crypto_adapter.h:204
rte_event_crypto_request::resv
uint8_t resv[8]
Definition
rte_event_crypto_adapter.h:205
rte_event_crypto_request::resv1
uint32_t resv1
Definition
rte_event_crypto_adapter.h:214
rte_event_crypto_request::cdev_id
uint16_t cdev_id
Definition
rte_event_crypto_adapter.h:210
rte_event_crypto_request::queue_pair_id
uint16_t queue_pair_id
Definition
rte_event_crypto_adapter.h:212
rte_event_port_conf
Definition
rte_eventdev.h:1178
rte_event
Definition
rte_eventdev.h:1676
rte_mempool
Definition
rte_mempool.h:230
rte_event_crypto_metadata
Definition
rte_event_crypto_adapter.h:228
rte_event_crypto_metadata::request_info
struct rte_event_crypto_request request_info
Definition
rte_event_crypto_adapter.h:229
rte_event_crypto_metadata::response_info
struct rte_event response_info
Definition
rte_event_crypto_adapter.h:234
lib
eventdev
rte_event_crypto_adapter.h
Generated by
1.17.0