---
name: "rte_cryptodev_scheduler_ordering_set"
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_cryptodev_scheduler.h"
---

# rte\_cryptodev\_scheduler\_ordering\_set(3)

Part of [rte\_cryptodev\_scheduler.h(3)](/rte_cryptodev_scheduler.h/3.md).

## NAME

rte\_cryptodev\_scheduler.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include 'rte_cryptodev_scheduler_operations.h'`\

### Data Structures

struct **rte\_cryptodev\_scheduler**\

### Macros

\#define **RTE\_CRYPTODEV\_SCHEDULER\_MAX\_NB\_WORKERS**   (8)\
 \#define **RTE\_CRYPTODEV\_SCHEDULER\_MAX\_NB\_WORKER\_CORES**   (RTE\_MAX\_LCORE - 1)\
 \#define **SCHEDULER\_MODE\_NAME\_ROUND\_ROBIN**   round-robin\
 \#define **SCHEDULER\_MODE\_NAME\_PKT\_SIZE\_DISTR**   packet-size-distr\
 \#define **SCHEDULER\_MODE\_NAME\_FAIL\_OVER**   fail-over\
 \#define **SCHEDULER\_MODE\_NAME\_MULTI\_CORE**   multi-core\
 \#define **RTE\_CRYPTODEV\_SCHEDULER\_PARAM\_THRES**   'threshold'\

### Enumerations

enum **rte\_cryptodev\_scheduler\_mode** {  }\
 enum **rte\_cryptodev\_schedule\_option\_type** \

### Functions

int **rte\_cryptodev\_scheduler\_load\_user\_scheduler** (uint8\_t scheduler\_id, struct **rte\_cryptodev\_scheduler** \*scheduler)\
 int **rte\_cryptodev\_scheduler\_worker\_attach** (uint8\_t scheduler\_id, uint8\_t worker\_id)\
 int **rte\_cryptodev\_scheduler\_worker\_detach** (uint8\_t scheduler\_id, uint8\_t worker\_id)\
 int **rte\_cryptodev\_scheduler\_mode\_set** (uint8\_t scheduler\_id, enum **rte\_cryptodev\_scheduler\_mode** mode)\
 enum **rte\_cryptodev\_scheduler\_mode** **rte\_cryptodev\_scheduler\_mode\_get** (uint8\_t scheduler\_id)\
 int **rte\_cryptodev\_scheduler\_ordering\_set** (uint8\_t scheduler\_id, uint32\_t enable\_reorder)\
 int **rte\_cryptodev\_scheduler\_ordering\_get** (uint8\_t scheduler\_id)\
 int **rte\_cryptodev\_scheduler\_workers\_get** (uint8\_t scheduler\_id, uint8\_t \*workers)\
 int **rte\_cryptodev\_scheduler\_option\_set** (uint8\_t scheduler\_id, enum **rte\_cryptodev\_schedule\_option\_type** option\_type, void \*option)\
 int **rte\_cryptodev\_scheduler\_option\_get** (uint8\_t scheduler\_id, enum **rte\_cryptodev\_schedule\_option\_type** option\_type, void \*option)\

### Variables

struct **rte\_cryptodev\_scheduler** \* **crypto\_scheduler\_roundrobin**\
 struct **rte\_cryptodev\_scheduler** \* **crypto\_scheduler\_pkt\_size\_based\_distr**\
 struct **rte\_cryptodev\_scheduler** \* **crypto\_scheduler\_failover**\
 struct **rte\_cryptodev\_scheduler** \* **crypto\_scheduler\_multicore**\

## Detailed Description

RTE Cryptodev Scheduler Device

The RTE Cryptodev Scheduler Device allows the aggregation of multiple worker Cryptodevs into a single logical crypto device, and the scheduling the crypto operations to the workers based on the mode of the specified mode of operation specified and supported. This implementation supports 3 modes of operation: round robin, packet-size based, and fail-over.

Definition in file **rte\_cryptodev\_scheduler.h**.

## Macro Definition Documentation

### #define RTE\_CRYPTODEV\_SCHEDULER\_MAX\_NB\_WORKERS (8)

Maximum number of bonding devices per device

Definition at line **29** of file **rte\_cryptodev\_scheduler.h**.

### #define RTE\_CRYPTODEV\_SCHEDULER\_MAX\_NB\_WORKER\_CORES (RTE\_MAX\_LCORE - 1)

Maximum number of multi-core worker cores

Definition at line **33** of file **rte\_cryptodev\_scheduler.h**.

### #define SCHEDULER\_MODE\_NAME\_ROUND\_ROBIN round-robin

Round-robin scheduling mode string

Definition at line **36** of file **rte\_cryptodev\_scheduler.h**.

### #define SCHEDULER\_MODE\_NAME\_PKT\_SIZE\_DISTR packet-size-distr

Packet-size based distribution scheduling mode string

Definition at line **38** of file **rte\_cryptodev\_scheduler.h**.

### #define SCHEDULER\_MODE\_NAME\_FAIL\_OVER fail-over

Fail-over scheduling mode string

Definition at line **40** of file **rte\_cryptodev\_scheduler.h**.

### #define SCHEDULER\_MODE\_NAME\_MULTI\_CORE multi-core

multi-core scheduling mode string

Definition at line **42** of file **rte\_cryptodev\_scheduler.h**.

### #define RTE\_CRYPTODEV\_SCHEDULER\_PARAM\_THRES 'threshold'

Threshold option structure

Definition at line **79** of file **rte\_cryptodev\_scheduler.h**.

## Enumeration Type Documentation

### enum rte\_cryptodev\_scheduler\_mode

Crypto scheduler PMD operation modes

**Enumerator**

- *CDEV\_SCHED\_MODE\_USERDEFINED*

  *User defined mode*

- *CDEV\_SCHED\_MODE\_ROUNDROBIN*

  *Round-robin mode*

- *CDEV\_SCHED\_MODE\_PKT\_SIZE\_DISTR*

  *Packet-size based distribution mode*

- *CDEV\_SCHED\_MODE\_FAILOVER*

  *Fail-over mode*

- *CDEV\_SCHED\_MODE\_MULTICORE*

  *multi-core mode*

- *CDEV\_SCHED\_MODE\_COUNT*

  *number of modes*

*Definition at line* **47** *of file* **rte\_cryptodev\_scheduler.h***.*

### enum rte\_cryptodev\_schedule\_option\_type

*Crypto scheduler option types*

*Definition at line* **69** *of file* **rte\_cryptodev\_scheduler.h***.*

## Function Documentation

### int rte\_cryptodev\_scheduler\_load\_user\_scheduler (uint8\_t scheduler\_id, struct rte\_cryptodev\_scheduler \* scheduler)

*Load a user defined scheduler*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *scheduler Pointer to the user defined scheduler*

**Returns**

- •

  *0 if the scheduler is successfully loaded*

- •

  *-ENOTSUP if the operation is not supported.*

- •

  *-EBUSY if device is started.*

- •

  *-EINVAL if input values are invalid.*

### int rte\_cryptodev\_scheduler\_worker\_attach (uint8\_t scheduler\_id, uint8\_t worker\_id)

*Attach a crypto device to the scheduler*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *worker\_id Crypto device ID to be attached*

**Returns**

- •

  *0 if the worker is attached.*

- •

  *-ENOTSUP if the operation is not supported.*

- •

  *-EBUSY if device is started.*

- •

  *-ENOMEM if the scheduler's worker list is full.*

### int rte\_cryptodev\_scheduler\_worker\_detach (uint8\_t scheduler\_id, uint8\_t worker\_id)

*Detach a crypto device from the scheduler*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *worker\_id Crypto device ID to be detached*

**Returns**

- •

  *0 if the worker is detached.*

- •

  *-ENOTSUP if the operation is not supported.*

- •

  *-EBUSY if device is started.*

### int rte\_cryptodev\_scheduler\_mode\_set (uint8\_t scheduler\_id, enum rte\_cryptodev\_scheduler\_mode mode)

*Set the scheduling mode*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *mode The scheduling mode*

**Returns**

- •

  *0 if the mode is set.*

- •

  *-ENOTSUP if the operation is not supported.*

- •

  *-EBUSY if device is started.*

### enum rte\_cryptodev\_scheduler\_mode rte\_cryptodev\_scheduler\_mode\_get (uint8\_t scheduler\_id)

*Get the current scheduling mode*

**Parameters**

*scheduler\_id The target scheduler device ID*

**Returns**

*mode*

- •

  *non-negative enumerate value: the scheduling mode*

- •

  *-ENOTSUP if the operation is not supported.*

### int rte\_cryptodev\_scheduler\_ordering\_set (uint8\_t scheduler\_id, uint32\_t enable\_reorder)

*Set the crypto ops reordering feature on/off*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *enable\_reorder Set the crypto op reordering feature*

- •

  *0: disable reordering*

- •

  *1: enable reordering*

**Returns**

- •

  *0 if the ordering is set.*

- •

  *-ENOTSUP if the operation is not supported.*

- •

  *-EBUSY if device is started.*

### int rte\_cryptodev\_scheduler\_ordering\_get (uint8\_t scheduler\_id)

*Get the current crypto ops reordering feature*

**Parameters**

*scheduler\_id The target scheduler device ID*

**Returns**

- •

  *0 if reordering is disabled*

- •

  *1 if reordering is enabled*

- •

  *-ENOTSUP if the operation is not supported.*

### int rte\_cryptodev\_scheduler\_workers\_get (uint8\_t scheduler\_id, uint8\_t \* workers)

*Get the attached workers' count and/or ID*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *workers If successful, the function will write back all workers' device IDs to it. This parameter will either be an uint8\_t array of RTE\_CRYPTODEV\_SCHEDULER\_MAX\_NB\_WORKERS elements or NULL.*

**Returns**

- •

  *non-negative number: the number of workers attached*

- •

  *-ENOTSUP if the operation is not supported.*

### int rte\_cryptodev\_scheduler\_option\_set (uint8\_t scheduler\_id, enum rte\_cryptodev\_schedule\_option\_type option\_type, void \* option)

*Set the mode specific option*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *option\_type The option type enumerate* \
 *option The specific mode's option structure*

**Returns**

- •

  *0 if successful*

- •

  *negative integer if otherwise.*

### int rte\_cryptodev\_scheduler\_option\_get (uint8\_t scheduler\_id, enum rte\_cryptodev\_schedule\_option\_type option\_type, void \* option)

*Set the mode specific option*

**Parameters**

*scheduler\_id The target scheduler device ID* \
 *option\_type The option type enumerate* \
 *option If successful, the function will write back the current*

**Returns**

- •

  *0 if successful*

- •

  *negative integer if otherwise.*

## Variable Documentation

### struct rte\_cryptodev\_scheduler\* crypto\_scheduler\_roundrobin` [extern]`

*Round-robin mode scheduler*

### struct rte\_cryptodev\_scheduler\* crypto\_scheduler\_pkt\_size\_based\_distr` [extern]`

*Packet-size based distribution mode scheduler*

### struct rte\_cryptodev\_scheduler\* crypto\_scheduler\_failover` [extern]`

*Fail-over mode scheduler*

### struct rte\_cryptodev\_scheduler\* crypto\_scheduler\_multicore` [extern]`

*multi-core mode scheduler*

## Author

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