CDEV_SCHED_MODE_FAILOVER(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

πŸ’… CDEV_SCHED_MODE_COUNT(3) ✨

okay so before we even start β€” this page's manual name is rte_crypto...scheduler.h, section 3 of the Library Functions Manual, and yes the file we're stanning is rte_cryptodev_scheduler.h. Buckle up bestie, there's a whole scheduler device in here and it's honestly iconic 🫢


🌸 NAME 🌸

rte_cryptodev_scheduler.h β€” that's the header, that's the vibe, that's the whole main character πŸ’–


✨ 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 🌈

<h2>RTE Cryptodev Scheduler Device</h2>

okay so picture this: the RTE Cryptodev Scheduler Device lets you aggregate multiple worker Cryptodevs into a single logical crypto device β€” like a group chat but for crypto devices, and honestly the teamwork is giving 🫢. Then it schedules the crypto operations out to those workers based on the mode of the specified mode of operation that's specified and supported (yes, that's how it's worded, and yes we love a recursive sentence πŸ’€).

This implementation supports 3 modes of operation: round robin, packet-size based, and fail-over. periodt.

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. eight. that's the limit bestie ✨

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. lowkey a whole RTE_MAX_LCORE minus one 🧚

Definition at line 33 of file rte_cryptodev_scheduler.h.

#define SCHEDULER_MODE_NAME_ROUND_ROBIN round-robin

Round-robin scheduling mode string β€” the name string, not a vibe, an actual 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, and yes it's spelled packet-size-distr, no cap 🌸

Definition at line 38 of file rte_cryptodev_scheduler.h.

#define SCHEDULER_MODE_NAME_FAIL_OVER fail-over

Fail-over scheduling mode string. hyphenated and hydrated ✨

Definition at line 40 of file rte_cryptodev_scheduler.h.

#define SCHEDULER_MODE_NAME_MULTI_CORE multi-core

multi-core scheduling mode string β€” note the lowercase multi-core, that's literally how it's written πŸ”₯

Definition at line 42 of file rte_cryptodev_scheduler.h.

#define RTE_CRYPTODEV_SCHEDULER_PARAM_THRES 'threshold'

Threshold option structure. it's 'threshold' with the single quotes, keep them, they're part of the fit πŸŽ€

Definition at line 79 of file rte_cryptodev_scheduler.h.

πŸ¦‹ ENUMERATION TYPE DOCUMENTATION πŸ¦‹

enum rte_cryptodev_scheduler_mode

Crypto scheduler PMD operation modes β€” the whole menu, bestie πŸ“

Enumerator

  • CDEV_SCHED_MODE_USERDEFINED β€” User defined mode, aka you bring your own, main character energy πŸ‘‘
  • 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 (lowercase again, she's consistent πŸ’…)
  • CDEV_SCHED_MODE_COUNT β€” number of modes. that's this page's whole title, we made it πŸŽ‰
Definition at line 47 of file rte_cryptodev_scheduler.h.

enum rte_cryptodev_schedule_option_type

Crypto scheduler option types β€” no enumerators listed here, that's just how the docs are, don't come for me πŸ™ˆ

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. yes queen, inject your own logic πŸ’…

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 β€” welcome to the group chat, you're in 🫢

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.
ngl that -ENOMEM is the "chat is full" error and we've all been there 😭

int rte_cryptodev_scheduler_worker_detach (uint8_t scheduler_id, uint8_t worker_id)

Detach a crypto device from the scheduler. it's not you it's the topology ✨

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. pick your fighter πŸ’…

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. vibe check, but for schedulers πŸ”

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 β€” the toggle of destiny πŸŽ€

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. is she ordered or is she chaos πŸ¦‹

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. roll call πŸ“£

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. very specific, very mode, very demure ✨

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.

okay so head's up bestie: the summary line here literally says "Set" even though this is the _get function. that's just what the docs say, I'm not the one who wrote it πŸ’€ copying it faithfully, no notes πŸ™ˆ

Parameters

  • scheduler_id β€” The target scheduler device ID
  • option_type β€” The option type enumerate
  • option β€” If successful, the function will write back the current
and yep, that parameter description trails off at "the current" in the original. we respect the cliffhanger 😭

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. so like, a robot wrote it, and I just gave it a personality 🫢


and that's the whole page bestie!! brought to you by DPDK, Version 26.03.0 β€” the rte_crypto...scheduler.h(3) manual page, section 3 of the Library Functions Manual. go forth and schedule your cryptodevs, you absolute icon πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from