---
name: "rte_pdcp_t_reordering_stop_cb_t"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_pdcp.h"
---

# rte\_pdcp\_t\_reordering\_stop\_cb\_t(3)

Part of [rte\_pdcp.h(3)](/rte_pdcp.h/3.md).

## 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>`\

### Data Structures

struct **rte\_pdcp\_entity**\
 struct **rte\_pdcp\_t\_reordering**\
 struct **rte\_pdcp\_entity\_conf**\

### Typedefs

**typedef** 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\[\])\

## Detailed Description

RTE PDCP support.

A framework for PDCP protocol processing.

Definition in file **rte\_pdcp.h**.

## Typedef Documentation

### typedef void(\* 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.

**See also**

struct rte\_pdcp\_timer

**rte\_pdcp\_entity\_establish()**

**Parameters**

*timer* Pointer to timer. \
 *args* Pointer to timer arguments.

Definition at line **80** of file **rte\_pdcp.h**.

### typedef void(\* 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.

**See also**

struct rte\_pdcp\_timer

**rte\_pdcp\_entity\_establish()**

**Parameters**

*timer* Pointer to timer. \
 *args* Pointer to timer arguments.

Definition at line **94** of file **rte\_pdcp.h**.

## Function Documentation

### \_\_rte\_experimental struct rte\_pdcp\_entity \* rte\_pdcp\_entity\_establish (const struct rte\_pdcp\_entity\_conf \* conf)

**Warning**

**EXPERIMENTAL:** this API may change without prior notice.

5\.1.1 PDCP entity establishment

Establish PDCP entity based on provided input configuration.

**Parameters**

*conf* 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\_experimental int rte\_pdcp\_entity\_release (struct rte\_pdcp\_entity \* pdcp\_entity, struct rte\_mbuf \* out\_mb\[\])

**Warning**

**EXPERIMENTAL:** 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.

**Parameters**

*pdcp\_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\_cache pointers to rte\_mbuf structures.**

**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\_experimental int rte\_pdcp\_entity\_suspend (struct rte\_pdcp\_entity \* pdcp\_entity, struct rte\_mbuf \* out\_mb\[\])

**Warning**

**EXPERIMENTAL: 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.**

**Parameters**

*pdcp\_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\_cache pointers to rte\_mbuf structures.**

**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\_experimental struct rte\_mbuf \* rte\_pdcp\_control\_pdu\_create (struct rte\_pdcp\_entity \* pdcp\_entity, enum rte\_pdcp\_ctrl\_pdu\_type type)

**Warning**

**EXPERIMENTAL: 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\_pool by lib PDCP.**

**Parameters**

*pdcp\_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\_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)` [inline]`, ` [static]`

**Warning**

**EXPERIMENTAL: 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.**

**Parameters**

*entity* **Pointer to the rte\_pdcp\_entity object the packets belong to.** \
 *mb* **The address of an array of** *num* **pointers to rte\_mbuf structures which contain the input packets. Any error packets would be returned in the same buffer.** \
 *cop* **The address of an array that can hold up to** *num* **pointers to rte\_crypto\_op structures. Crypto ops would be allocated by** `rte_pdcp_pkt_pre_process` **API.** \
 *num* **The maximum number of packets to process.** \
 *nb\_err* **Pointer to return the number of error packets returned in** *mb***.**

**Returns**

**Count of crypto\_ops prepared.**

**Definition at line 289 of file rte\_pdcp.h.**

### 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)` [inline]`, ` [static]`

**Warning**

**EXPERIMENTAL: 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.**

**Parameters**

*entity* **Pointer to the rte\_pdcp\_entity object the packets belong to.** \
 *in\_mb* **The address of an array of** *num* **pointers to rte\_mbuf structures.** \
 *out\_mb* **The address of an array that can hold up to rte\_pdcp\_entity.max\_pkt\_cache pointers to rte\_mbuf structures to output packets after PDCP post-processing.** \
 *num* **The maximum number of packets to process.** \
 *nb\_err* **The number of error packets returned in** *out\_mb* **buffer.**

**Returns**

**Count of packets returned in** *out\_mb* **buffer.**

**Definition at line 330 of file rte\_pdcp.h.**

### \_\_rte\_experimental uint16\_t rte\_pdcp\_t\_reordering\_expiry\_handle (const struct rte\_pdcp\_entity \* entity, struct rte\_mbuf \* out\_mb\[\])

**Warning**

**EXPERIMENTAL: 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.**

**Parameters**

*entity* **Pointer to the rte\_pdcp\_entity for which the timer expired.** \
 *out\_mb* **The address of an array that can hold up to rte\_pdcp\_entity.max\_pkt\_cache pointers to rte\_mbuf structures. Used to return buffered packets that are expired.**

**Returns**

**Number of packets returned in** *out\_mb* **buffer.**

## Author

**Generated automatically by Doxygen for DPDK from the source code.**
