| 71 | } |
| 72 | |
| 73 | static int |
| 74 | pdcp_dl_establish(struct rte_pdcp_entity *entity, const struct rte_pdcp_entity_conf *conf, |
| 75 | const struct entity_layout *layout) |
| 76 | { |
| 77 | const uint32_t window_size = pdcp_window_size_get(conf->pdcp_xfrm.sn_size); |
| 78 | struct entity_priv_dl_part *dl = entity_dl_part_get(entity); |
| 79 | void *memory; |
| 80 | int ret; |
| 81 | |
| 82 | entity->max_pkt_cache = RTE_MAX(entity->max_pkt_cache, window_size); |
| 83 | dl->t_reorder.handle = conf->t_reordering; |
| 84 | |
| 85 | memory = RTE_PTR_ADD(entity, layout->reorder_buf_offset); |
| 86 | ret = pdcp_reorder_create(&dl->reorder, window_size, memory, layout->reorder_buf_size); |
| 87 | if (ret) |
| 88 | return ret; |
| 89 | |
| 90 | memory = RTE_PTR_ADD(entity, layout->bitmap_offset); |
| 91 | ret = pdcp_cnt_bitmap_create(dl, window_size, memory, layout->bitmap_size); |
| 92 | if (ret) |
| 93 | return ret; |
| 94 | |
| 95 | return 0; |
| 96 | } |
| 97 | |
| 98 | struct rte_pdcp_entity * |
| 99 | rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf) |
no test coverage detected