DPDK  24.11.0-rc3
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. */
23 struct rte_pdcp_entity;
24 
25 /* PDCP pre-process function based on entity configuration. */
26 typedef 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. */
32 typedef 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 
80 typedef void (*rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args);
81 
94 typedef 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< */
120  struct rte_security_pdcp_xform pdcp_xfrm;
134  uint32_t sn;
136  bool is_slrb;
140  uint8_t dev_id;
159  struct rte_pdcp_t_reordering t_reordering;
160 };
161 /* >8 End of structure rte_pdcp_entity_conf. */
162 
177 __rte_experimental
178 struct rte_pdcp_entity *
180 
207 __rte_experimental
208 int
209 rte_pdcp_entity_release(struct rte_pdcp_entity *pdcp_entity,
210  struct rte_mbuf *out_mb[]);
211 
236 __rte_experimental
237 int
238 rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity,
239  struct rte_mbuf *out_mb[]);
240 
256 __rte_experimental
257 struct rte_mbuf *
258 rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity,
259  enum rte_pdcp_ctrl_pdu_type type);
260 
287 __rte_experimental
288 static 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
329 static 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
362 uint16_t
364  struct rte_mbuf *out_mb[]);
365 
370 #include <rte_pdcp_group.h>
371 
372 #ifdef __cplusplus
373 extern "C" {
374 #endif
375 
376 #ifdef __cplusplus
377 }
378 #endif
379 
380 #endif /* RTE_PDCP_H */
rte_pdcp_t_reordering_start_cb_t start
Definition: rte_pdcp.h:108
void(* rte_pdcp_t_reordering_stop_cb_t)(void *timer, void *args)
Definition: rte_pdcp.h:94
rte_pdcp_post_p_t post_process
Definition: rte_pdcp.h:52
uint32_t max_pkt_cache
Definition: rte_pdcp.h:64
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
struct rte_crypto_sym_xform * crypto_xfrm
Definition: rte_pdcp.h:122
#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_pdcp_ctrl_pdu_type
Definition: rte_pdcp_hdr.h:37
struct rte_mempool * sess_mpool
Definition: rte_pdcp.h:124
__rte_experimental uint16_t rte_pdcp_t_reordering_expiry_handle(const struct rte_pdcp_entity *entity, struct rte_mbuf *out_mb[])
void(* rte_pdcp_t_reordering_start_cb_t)(void *timer, void *args)
Definition: rte_pdcp.h:80
bool out_of_order_delivery
Definition: rte_pdcp.h:157
__rte_experimental int rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity, struct rte_mbuf *out_mb[])
struct rte_mempool * ctrl_pdu_pool
Definition: rte_pdcp.h:128
__rte_experimental int rte_pdcp_entity_release(struct rte_pdcp_entity *pdcp_entity, struct rte_mbuf *out_mb[])
rte_pdcp_pre_p_t pre_process
Definition: rte_pdcp.h:50
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
bool status_report_required
Definition: rte_pdcp.h:155
struct rte_mempool * cop_pool
Definition: rte_pdcp.h:126
rte_pdcp_t_reordering_stop_cb_t stop
Definition: rte_pdcp.h:110
__rte_experimental struct rte_mbuf * rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity, enum rte_pdcp_ctrl_pdu_type type)