1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2023 Marvell. 3 */ 4 5 #ifndef PDCP_PROCESS_H 6 #define PDCP_PROCESS_H 7 8 #include <rte_mbuf_dyn.h> 9 #include <rte_pdcp.h> 10 11 #include <pdcp_entity.h> 12 #include <pdcp_cnt.h> 13 14 typedef uint32_t rte_pdcp_dynfield_t; 15 16 extern int rte_pdcp_dynfield_offset; 17 18 static inline rte_pdcp_dynfield_t * 19 pdcp_dynfield(struct rte_mbuf *mbuf) 20 { 21 return RTE_MBUF_DYNFIELD(mbuf, rte_pdcp_dynfield_offset, rte_pdcp_dynfield_t *); 22 } 23 24 int 25 pdcp_process_func_set(struct rte_pdcp_entity *entity, const struct rte_pdcp_entity_conf *conf); 26 27 static inline void 28 pdcp_rx_deliv_set(const struct rte_pdcp_entity *entity, uint32_t rx_deliv) 29 { 30 struct entity_priv_dl_part *dl = entity_dl_part_get(entity); 31 struct entity_priv *en_priv = entity_priv_get(entity); 32 33 pdcp_cnt_bitmap_range_clear(dl->bitmap, en_priv->state.rx_deliv, rx_deliv); 34 en_priv->state.rx_deliv = rx_deliv; 35 } 36 37 #endif /* PDCP_PROCESS_H */ 38