---
name: "rte_ipsec_ses_from_crypto"
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_ipsec_group.h"
---

# rte\_ipsec\_ses\_from\_crypto(3)

Part of [rte\_ipsec\_group.h(3)](/rte_ipsec_group.h/3.md).

## NAME

rte\_ipsec\_group.h

## SYNOPSIS

### Data Structures

struct **rte\_ipsec\_group**\

### Functions

static struct **rte\_ipsec\_session** \* **rte\_ipsec\_ses\_from\_crypto** (const struct **rte\_crypto\_op** \*cop)\
 static uint16\_t **rte\_ipsec\_pkt\_crypto\_group** (const struct **rte\_crypto\_op** \*cop\[\], struct **rte\_mbuf** \*mb\[\], struct **rte\_ipsec\_group** grp\[\], uint16\_t num)\

## Detailed Description

RTE IPsec support. It is not recommended to include this file directly, include \<**rte\_ipsec.h**\> instead. Contains helper functions to process completed crypto-ops and group related packets by sessions they belong to.

Definition in file **rte\_ipsec\_group.h**.

## Function Documentation

### static struct rte\_ipsec\_session \* rte\_ipsec\_ses\_from\_crypto (const struct rte\_crypto\_op \* cop)` [inline]`, ` [static]`

Take crypto-op as an input and extract pointer to related ipsec session.

**Parameters**

*cop* The address of an input **rte\_crypto\_op structure.**

**Returns**

**The pointer to the related rte\_ipsec\_session structure.**

**Definition at line 45 of file rte\_ipsec\_group.h.**

### static uint16\_t rte\_ipsec\_pkt\_crypto\_group (const struct rte\_crypto\_op \* cop\[\], struct rte\_mbuf \* mb\[\], struct rte\_ipsec\_group grp\[\], uint16\_t num)` [inline]`, ` [static]`

**Take as input completed crypto ops, extract related mbufs and group them by rte\_ipsec\_session they belong to. For mbuf which crypto-op wasn't completed successfully RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD\_FAILED will be raised in ol\_flags. Note that mbufs with undetermined SA (session-less) are not freed by the function, but are placed beyond mbufs for the last valid group. It is a user responsibility to handle them further.**

**Parameters**

*cop* **The address of an array of** *num* **pointers to the input rte\_crypto\_op structures.** \
 *mb* **The address of an array of** *num* **pointers to output rte\_mbuf structures.** \
 *grp* **The address of an array of** *num* **to output rte\_ipsec\_group structures.** \
 *num* **The maximum number of crypto-ops to process.**

**Returns**

**Number of filled elements in** *grp* **array.**

**Definition at line 82 of file rte\_ipsec\_group.h.**

## Author

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