logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                                   rte_pdcp.h(3)

Detailed Description

       RTE PDCP support.

       A framework for PDCP protocol processing.

       Definition in file rte_pdcp.h.

Function Documentation

__rte_experimentalstructrte_pdcp_entity*rte_pdcp_entity_establish(conststructrte_pdcp_entity_conf*conf)WarningEXPERIMENTAL: this API may change without prior notice.

       5.1.1 PDCP entity establishment

       Establish PDCP entity based on provided input configuration.

       Parametersconf Parameters to be used for initializing PDCP entity object.

       Returns

           • Valid handle if success

           • NULL in case of failure. rte_errno will be set to error code.

   __rte_experimentalintrte_pdcp_entity_release(structrte_pdcp_entity*pdcp_entity,structrte_mbuf*out_mb[])WarningEXPERIMENTAL: this API may change without prior notice.

       5.1.3 PDCP entity release

       Release PDCP entity.

       For UL/transmitting PDCP entity, all stored PDCP SDUs would be dropped. For DL/receiving PDCP entity, the
       stored PDCP SDUs would be returned in out_mb buffer. The buffer should be large enough to hold all cached
       packets in the entity.

       Entity release would result in freeing all memory  associated  with  the  PDCP  entity  as  well  as  any
       crypto/security sessions created.

       Parameterspdcp_entity Pointer to the PDCP entity to be released.
           out_mb The address of an array that can hold up to rte_pdcp_entity.max_pkt_cachepointerstorte_mbufstructures.Returns

           • 0: Success and no cached packets to return

           • >0: Success and the number of packets returned in out_mb

           • <0: Error code in case of failures

   __rte_experimentalintrte_pdcp_entity_suspend(structrte_pdcp_entity*pdcp_entity,structrte_mbuf*out_mb[])WarningEXPERIMENTAL: this API may change without prior notice.

       5.1.4 PDCP entity suspend

       Suspend PDCP entity.

       For DL/receiving PDCP entity, the stored PDCP SDUs would be returned in out_mb buffer. The buffer  should
       be large enough to hold all cached packets in the entity.

       For UL/transmitting PDCP entity, out_mb buffer would be unused.

       Parameterspdcp_entity Pointer to the PDCP entity to be suspended.
           out_mb The address of an array that can hold up to rte_pdcp_entity.max_pkt_cachepointerstorte_mbufstructures.Returns

           • 0: Success and no cached packets to return.

           • >0: Success and the number of packets returned in out_mb.

           • <0: Error code in case of failures.

   __rte_experimentalstructrte_mbuf*rte_pdcp_control_pdu_create(structrte_pdcp_entity*pdcp_entity,enumrte_pdcp_ctrl_pdu_typetype)WarningEXPERIMENTAL: this API may change without prior notice.

       Create control PDU packet of the  type  specified.  The  control  PDU  packet  would  be  allocated  from
       rte_pdcp_entity_conf.ctrl_pdu_poolbylibPDCP.Parameterspdcp_entity Pointer to the PDCP entity for which the control PDU need to be generated.
           type Type of control PDU to be generated.

       Returns

           • Control PDU generated, in case of success.

           • NULL in case of failure. rte_errno will be set to error code.

   static__rte_experimentaluint16_trte_pdcp_pkt_pre_process(conststructrte_pdcp_entity*entity,structrte_mbuf*mb[],structrte_crypto_op*cop[],uint16_tnum,uint16_t*nb_err)[inline],[static]WarningEXPERIMENTAL: this API may change without prior notice.

       For input mbufs and given PDCP entity pre-process the mbufs and prepare crypto ops that can  be  enqueued
       to  the  cryptodev associated with given session. Only error packets would be moved returned in the input
       buffer, mb, and it is the responsibility of the application to free the same.

       Parametersentity Pointer to the rte_pdcp_entityobjectthepacketsbelongto.mbTheaddressofanarrayofnumpointerstorte_mbufstructureswhichcontaintheinputpackets.Anyerrorpacketswouldbereturnedinthesamebuffer.copTheaddressofanarraythatcanholduptonumpointerstorte_crypto_opstructures.Cryptoopswouldbeallocatedbyrte_pdcp_pkt_pre_processAPI.numThemaximumnumberofpacketstoprocess.nb_errPointertoreturnthenumberoferrorpacketsreturnedinmb.Returns
           Count of crypto_ops prepared.

       Definition at line 289 of file rte_pdcp.h.

   static__rte_experimentaluint16_trte_pdcp_pkt_post_process(conststructrte_pdcp_entity*entity,structrte_mbuf*in_mb[],structrte_mbuf*out_mb[],uint16_tnum,uint16_t*nb_err)[inline],[static]WarningEXPERIMENTAL: this API may change without prior notice.

       For input mbufs and given PDCP entity, perform PDCP post-processing of the mbufs.

       Input  mbufs  are  the  ones  retrieved  from  rte_crypto_ops  dequeued  from  cryptodev  and  grouped by
       rte_pdcp_pkt_crypto_group().

       The post-processed packets would be returned in the out_mb buffer. The resultant mbufs would  be  grouped
       into  success packets and error packets. Error packets would be grouped in the end of the array and it is
       the responsibility of the application to handle the same.

       When in-order delivery is enabled, PDCP entity may buffer packets and would deliver packets only when all
       prior packets have been post-processed. That would result in returning more/less packets than enqueued.

       Parametersentity Pointer to the rte_pdcp_entityobjectthepacketsbelongto.in_mbTheaddressofanarrayofnumpointerstorte_mbufstructures.out_mbTheaddressofanarraythatcanholduptorte_pdcp_entity.max_pkt_cachepointerstorte_mbufstructurestooutputpacketsafterPDCPpost-processing.numThemaximumnumberofpacketstoprocess.nb_errThenumberoferrorpacketsreturnedinout_mbbuffer.Returns
           Count of packets returned in out_mb buffer.

       Definition at line 330 of file rte_pdcp.h.

   __rte_experimentaluint16_trte_pdcp_t_reordering_expiry_handle(conststructrte_pdcp_entity*entity,structrte_mbuf*out_mb[])WarningEXPERIMENTAL: this API may change without prior notice

       5.2.2.2 Actions when a t-Reordering expires

       When  t-Reordering  timer  expires,  PDCP  is  required  to  slide the reception window by updating state
       variables such as RX_REORD & RX_DELIV. PDCP would need to deliver some of the buffered packets  based  on
       the state variables and conditions described.

       The  expiry  handle need to be invoked by the application when t-Reordering timer expires. In addition to
       returning buffered packets, it may also restart timer based on the state variables.

       Parametersentity Pointer to the rte_pdcp_entityforwhichthetimerexpired.out_mbTheaddressofanarraythatcanholduptorte_pdcp_entity.max_pkt_cachepointerstorte_mbufstructures.Usedtoreturnbufferedpacketsthatareexpired.Returns
           Number of packets returned in out_mb buffer.

Name

       rte_pdcp.h

Synopsis

       #include <rte_compat.h>
       #include <rte_common.h>
       #include <rte_mempool.h>
       #include <rte_pdcp_hdr.h>
       #include <rte_security.h>
       #include <rte_pdcp_group.h>

   DataStructures
       struct rte_pdcp_entity
       struct rte_pdcp_t_reordering
       struct rte_pdcp_entity_confTypedefstypedef void(* rte_pdcp_t_reordering_start_cb_t) (void *timer, void *args)
       typedef void(* rte_pdcp_t_reordering_stop_cb_t) (void *timer, void *args)

   Functions
       __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[])
       __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)
       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)
       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)
       __rte_experimental uint16_t rte_pdcp_t_reordering_expiry_handle (const struct rte_pdcp_entity *entity,
           struct rte_mbuf *out_mb[])

Typedef Documentation

typedefvoid(*rte_pdcp_t_reordering_start_cb_t)(void*timer,void*args)
       Callback function type for t-Reordering timer start, set during PDCP entity establish. This callback is
       invoked by PDCP library, during t-Reordering timer start event. Only one t-Reordering per receiving PDCP
       entity would be running at a given time.

       Seealso
           struct rte_pdcp_timer

           rte_pdcp_entity_establish()Parameterstimer Pointer to timer.
           args Pointer to timer arguments.

       Definition at line 80 of file rte_pdcp.h.

   typedefvoid(*rte_pdcp_t_reordering_stop_cb_t)(void*timer,void*args)
       Callback function type for t-Reordering timer stop, set during PDCP entity establish. This callback will
       be invoked by PDCP library, during t-Reordering timer stop event.

       Seealso
           struct rte_pdcp_timer

           rte_pdcp_entity_establish()Parameterstimer Pointer to timer.
           args Pointer to timer arguments.

       Definition at line 94 of file rte_pdcp.h.

See Also