DPDK 25.03.0-rc0
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/* Forward declarations. */
23struct rte_pdcp_entity;
24
25/* PDCP pre-process function based on entity configuration. */
26typedef uint16_t (*rte_pdcp_pre_p_t)(const struct rte_pdcp_entity *entity,
27 struct rte_mbuf *mb[],
28 struct rte_crypto_op *cop[],
29 uint16_t num, uint16_t *nb_err);
30
31/* PDCP post-process function based on entity configuration. */
32typedef uint16_t (*rte_pdcp_post_p_t)(const struct rte_pdcp_entity *entity,
33 struct rte_mbuf *in_mb[],
34 struct rte_mbuf *out_mb[],
35 uint16_t num, uint16_t *nb_err);
36
50 rte_pdcp_pre_p_t pre_process;
52 rte_pdcp_post_p_t post_process;
64 uint32_t max_pkt_cache;
65};
66
80typedef void (*rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args);
81
94typedef void (*rte_pdcp_t_reordering_stop_cb_t)(void *timer, void *args);
95
101/* Structure rte_pdcp_t_reordering 8< */
104 void *timer;
106 void *args;
111};
112/* >8 End of structure rte_pdcp_t_reordering. */
113
117/* Structure rte_pdcp_entity_conf 8< */
134 uint32_t sn;
140 uint8_t dev_id;
160};
161/* >8 End of structure rte_pdcp_entity_conf. */
162
177__rte_experimental
178struct rte_pdcp_entity *
180
207__rte_experimental
208int
210 struct rte_mbuf *out_mb[]);
211
236__rte_experimental
237int
239 struct rte_mbuf *out_mb[]);
240
256__rte_experimental
257struct rte_mbuf *
259 enum rte_pdcp_ctrl_pdu_type type);
260
287__rte_experimental
288static inline uint16_t
290 struct rte_mbuf *mb[], struct rte_crypto_op *cop[],
291 uint16_t num, uint16_t *nb_err)
292{
293 return entity->pre_process(entity, mb, cop, num, nb_err);
294}
295
328__rte_experimental
329static inline uint16_t
331 struct rte_mbuf *in_mb[],
332 struct rte_mbuf *out_mb[],
333 uint16_t num, uint16_t *nb_err)
334{
335 return entity->post_process(entity, in_mb, out_mb, num, nb_err);
336}
337
361__rte_experimental
362uint16_t
364 struct rte_mbuf *out_mb[]);
365
370#include <rte_pdcp_group.h>
371
372#ifdef __cplusplus
373extern "C" {
374#endif
375
376#ifdef __cplusplus
377}
378#endif
379
380#endif /* RTE_PDCP_H */
#define __rte_cache_aligned
Definition: rte_common.h:627
__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:289
__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:94
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:330
void(* rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args)
Definition: rte_pdcp.h:80
__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
Definition: rte_pdcp_hdr.h:37
bool out_of_order_delivery
Definition: rte_pdcp.h:157
struct rte_mempool * ctrl_pdu_pool
Definition: rte_pdcp.h:128
bool status_report_required
Definition: rte_pdcp.h:155
struct rte_mempool * sess_mpool
Definition: rte_pdcp.h:124
struct rte_pdcp_t_reordering t_reordering
Definition: rte_pdcp.h:159
struct rte_mempool * cop_pool
Definition: rte_pdcp.h:126
struct rte_crypto_sym_xform * crypto_xfrm
Definition: rte_pdcp.h:122
struct rte_security_pdcp_xform pdcp_xfrm
Definition: rte_pdcp.h:120
rte_pdcp_post_p_t post_process
Definition: rte_pdcp.h:52
uint32_t max_pkt_cache
Definition: rte_pdcp.h:64
rte_pdcp_pre_p_t pre_process
Definition: rte_pdcp.h:50
rte_pdcp_t_reordering_stop_cb_t stop
Definition: rte_pdcp.h:110
rte_pdcp_t_reordering_start_cb_t start
Definition: rte_pdcp.h:108