MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_pdcp_control_pdu_create

Function rte_pdcp_control_pdu_create

dpdk/lib/pdcp/rte_pdcp.c:247–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247struct rte_mbuf *
248rte_pdcp_control_pdu_create(struct rte_pdcp_entity *pdcp_entity,
249 enum rte_pdcp_ctrl_pdu_type type)
250{
251 struct entity_priv_dl_part *dl;
252 struct entity_priv *en_priv;
253 struct rte_mbuf *m;
254 int ret;
255
256 if (pdcp_entity == NULL) {
257 rte_errno = EINVAL;
258 return NULL;
259 }
260
261 en_priv = entity_priv_get(pdcp_entity);
262 dl = entity_dl_part_get(pdcp_entity);
263
264 m = rte_pktmbuf_alloc(en_priv->ctrl_pdu_pool);
265 if (m == NULL) {
266 rte_errno = ENOMEM;
267 return NULL;
268 }
269
270 switch (type) {
271 case RTE_PDCP_CTRL_PDU_TYPE_STATUS_REPORT:
272 ret = pdcp_ctrl_pdu_status_gen(en_priv, dl, m);
273 break;
274 default:
275 ret = -ENOTSUP;
276 }
277
278 if (ret) {
279 rte_pktmbuf_free(m);
280 rte_errno = -ret;
281 return NULL;
282 }
283
284 return m;
285}
286
287uint16_t
288rte_pdcp_t_reordering_expiry_handle(const struct rte_pdcp_entity *entity, struct rte_mbuf *out_mb[])

Callers 1

test_status_report_genFunction · 0.85

Calls 5

entity_priv_getFunction · 0.85
entity_dl_part_getFunction · 0.85
rte_pktmbuf_allocFunction · 0.85
pdcp_ctrl_pdu_status_genFunction · 0.85
rte_pktmbuf_freeFunction · 0.85

Tested by 1

test_status_report_genFunction · 0.68