DPDK 23.11.0
Loading...
Searching...
No Matches
rte_pdcp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2023 Marvell.
3 */
4
5#ifndef RTE_PDCP_H
6#define RTE_PDCP_H
7
16#include <rte_compat.h>
17#include <rte_common.h>
18#include <rte_mempool.h>
19#include <rte_pdcp_hdr.h>
20#include <rte_security.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* Forward declarations. */
27struct rte_pdcp_entity;
28
29/* PDCP pre-process function based on entity configuration. */
30typedef uint16_t (*rte_pdcp_pre_p_t)(const struct rte_pdcp_entity *entity,
31 struct rte_mbuf *mb[],
32 struct rte_crypto_op *cop[],
33 uint16_t num, uint16_t *nb_err);
34
35/* PDCP post-process function based on entity configuration. */
36typedef uint16_t (*rte_pdcp_post_p_t)(const struct rte_pdcp_entity *entity,
37 struct rte_mbuf *in_mb[],
38 struct rte_mbuf *out_mb[],
39 uint16_t num, uint16_t *nb_err);
40
54 rte_pdcp_pre_p_t pre_process;
56 rte_pdcp_post_p_t post_process;
68 uint32_t max_pkt_cache;
70
84typedef void (*rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args);
85
98typedef void (*rte_pdcp_t_reordering_stop_cb_t)(void *timer, void *args);
99
105/* Structure rte_pdcp_t_reordering 8< */
116/* >8 End of structure rte_pdcp_t_reordering. */
117
121/* Structure rte_pdcp_entity_conf 8< */
165/* >8 End of structure rte_pdcp_entity_conf. */
166
181__rte_experimental
182struct rte_pdcp_entity *
184
211__rte_experimental
212int
214 struct rte_mbuf *out_mb[]);
215
240__rte_experimental
241int
243 struct rte_mbuf *out_mb[]);
244
260__rte_experimental
261struct rte_mbuf *
263 enum rte_pdcp_ctrl_pdu_type type);
264
291__rte_experimental
292static inline uint16_t
294 struct rte_mbuf *mb[], struct rte_crypto_op *cop[],
295 uint16_t num, uint16_t *nb_err)
296{
297 return entity->pre_process(entity, mb, cop, num, nb_err);
298}
299
332__rte_experimental
333static inline uint16_t
335 struct rte_mbuf *in_mb[],
336 struct rte_mbuf *out_mb[],
337 uint16_t num, uint16_t *nb_err)
338{
339 return entity->post_process(entity, in_mb, out_mb, num, nb_err);
340}
341
365__rte_experimental
366uint16_t
368 struct rte_mbuf *out_mb[]);
369
374#include <rte_pdcp_group.h>
375
376#ifdef __cplusplus
377}
378#endif
379
380#endif /* RTE_PDCP_H */
#define __rte_cache_aligned
Definition rte_common.h:524
__rte_experimental struct rte_pdcp_entity * rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf)
__rte_experimental int rte_pdcp_entity_release(struct rte_pdcp_entity *pdcp_entity, struct rte_mbuf *out_mb[])
static __rte_experimental uint16_t rte_pdcp_pkt_pre_process(const struct rte_pdcp_entity *entity, struct rte_mbuf *mb[], struct rte_crypto_op *cop[], uint16_t num, uint16_t *nb_err)
Definition rte_pdcp.h:293
__rte_experimental int rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity, struct rte_mbuf *out_mb[])
__rte_experimental struct rte_mbuf * rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity, enum rte_pdcp_ctrl_pdu_type type)
void(* rte_pdcp_t_reordering_stop_cb_t)(void *timer, void *args)
Definition rte_pdcp.h:98
static __rte_experimental uint16_t rte_pdcp_pkt_post_process(const struct rte_pdcp_entity *entity, struct rte_mbuf *in_mb[], struct rte_mbuf *out_mb[], uint16_t num, uint16_t *nb_err)
Definition rte_pdcp.h:334
void(* rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args)
Definition rte_pdcp.h:84
__rte_experimental uint16_t rte_pdcp_t_reordering_expiry_handle(const struct rte_pdcp_entity *entity, struct rte_mbuf *out_mb[])
rte_pdcp_ctrl_pdu_type
struct rte_mempool * ctrl_pdu_pool
Definition rte_pdcp.h:132
struct rte_mempool * sess_mpool
Definition rte_pdcp.h:128
struct rte_pdcp_t_reordering t_reordering
Definition rte_pdcp.h:163
struct rte_mempool * cop_pool
Definition rte_pdcp.h:130
struct rte_crypto_sym_xform * crypto_xfrm
Definition rte_pdcp.h:126
struct rte_security_pdcp_xform pdcp_xfrm
Definition rte_pdcp.h:124
rte_pdcp_post_p_t post_process
Definition rte_pdcp.h:56
uint32_t max_pkt_cache
Definition rte_pdcp.h:68
rte_pdcp_pre_p_t pre_process
Definition rte_pdcp.h:54
rte_pdcp_t_reordering_stop_cb_t stop
Definition rte_pdcp.h:114
rte_pdcp_t_reordering_start_cb_t start
Definition rte_pdcp.h:112