rte_compressdev_pmd.h(3)

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

πŸ’– rte_compressdev_pmd.h β€” the comp PMD glow-up guide πŸ’–

okay so bestie, this is the manual page for rte_compressdev_pmd.h, which is literally the main character energy for RTE comp PMD APIs ✨. it's giving "driver devs only" vibes, so pay attention if that's your lane. iykyk πŸ’…


✨ SYNOPSIS ✨

first things first, here's how you pull it into your code, no cap:

#include <string.h>
#include <dev_driver.h>
#include 'rte_compressdev.h'
#include 'rte_compressdev_internal.h'

πŸŽ€ Data Structures πŸŽ€

  • struct rte_compressdev_global
  • struct rte_compressdev_ops

these are the structs you're gonna be living in, bestie. get comfy πŸ’–

🌸 Typedefs 🌸

all the function pointers a driver exports through the generic comp_dev_ops structure. each one is a whole mood:

  • typedef int(* compressdev_configure_t) (struct rte_compressdev *dev, struct rte_compressdev_config *config)
  • typedef int(* compressdev_start_t) (struct rte_compressdev *dev)
  • typedef void(* compressdev_stop_t) (struct rte_compressdev *dev)
  • typedef int(* compressdev_close_t) (struct rte_compressdev *dev)
  • typedef void(* compressdev_stats_get_t) (struct rte_compressdev *dev, struct rte_compressdev_stats *stats)
  • typedef void(* compressdev_stats_reset_t) (struct rte_compressdev *dev)
  • typedef void(* compressdev_info_get_t) (struct rte_compressdev *dev, struct rte_compressdev_info *dev_info)
  • typedef int(* compressdev_queue_pair_setup_t) (struct rte_compressdev *dev, uint16_t qp_id, uint32_t max_inflight_ops, int socket_id)
  • typedef int(* compressdev_queue_pair_release_t) (struct rte_compressdev *dev, uint16_t qp_id)
  • typedef int(* compressdev_stream_create_t) (struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **stream)
  • typedef int(* compressdev_stream_free_t) (struct rte_compressdev *dev, void *stream)
  • typedef int(* compressdev_private_xform_create_t) (struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **private_xform)
  • typedef int(* compressdev_private_xform_free_t) (struct rte_compressdev *dev, void *private_xform)

slay. each one does a specific lil job, and we're gonna break them down below πŸ‘‘

πŸ¦‹ Functions πŸ¦‹

  • struct rte_compressdev * rte_compressdev_pmd_get_named_dev (const char *name)

this is the one function you can call, and it's giving "find my device by name" energy. iconic.


🌈 Detailed Description 🌈

okay so this is the RTE comp PMD APIs β€” capital letters, very serious. but here's the tea:

⚠️ Note: These APIs are for comp PMDs only. user applications should not call them directly. like, don't even think about it, bestie. this is driver-internal territory, fr fr. πŸ™ˆ

Definition in file rte_compressdev_pmd.h. that's where you'll find it if you go looking.


πŸ’œ Typedef Documentation πŸ’œ

πŸŽ€ typedef int(* compressdev_configure_t) (struct rte_compressdev *dev, struct rte_compressdev_config *config) πŸŽ€

this is the "get your device configured" function. it's part of the whole family of functions a driver exports through the generic comp_dev_ops struct, which lives inside the rte_compressdev structure for each device. this specific one? function used to configure device. πŸ’…

Parameters:

  • dev β€” Compress device
  • config β€” Compress device configurations

Returns:

  • Returns 0 on success

Definition at line 80 of file rte_compressdev_pmd.h.


πŸ¦‹ typedef int(* compressdev_start_t) (struct rte_compressdev *dev) πŸ¦‹

function used to start a configured device. like pressing play on your fave playlist β€” but for compression hardware. πŸ”₯

Parameters:

  • dev β€” Compress device

Returns:

  • Returns 0 on success

Definition at line 91 of file rte_compressdev_pmd.h.


🌸 typedef void(* compressdev_stop_t) (struct rte_compressdev *dev) 🌸

function used to stop a configured device. the "okay we're done here" vibe. no return value, it just does the thing. ✨

Parameters:

  • dev β€” Compress device

Definition at line 99 of file rte_compressdev_pmd.h.


πŸ’– typedef int(* compressdev_close_t) (struct rte_compressdev *dev) πŸ’–

function used to close a configured device. like saying bye to your bestie after a hang β€” necessary but sad. 😭

Parameters:

  • dev β€” Compress device

Returns:

  • 0 on success.
  • EAGAIN if can't close as device is busy

Definition at line 110 of file rte_compressdev_pmd.h.


πŸ‘‘ typedef void(* compressdev_stats_get_t) (struct rte_compressdev *dev, struct rte_compressdev_stats *stats) πŸ‘‘

function used to get statistics of a device. you want the receipts? this is how you get the receipts. πŸ“Š

Parameters:

  • dev β€” Compress device
  • stats β€” Compress device stats to populate

Definition at line 121 of file rte_compressdev_pmd.h.


🌈 typedef void(* compressdev_stats_reset_t) (struct rte_compressdev *dev) 🌈

function used to reset statistics of a device. clean slate energy. fresh start. we love to see it. πŸ’«

Parameters:

  • dev β€” Compress device

Definition at line 131 of file rte_compressdev_pmd.h.


πŸŽ€ typedef void(* compressdev_info_get_t) (struct rte_compressdev *dev, struct rte_compressdev_info *dev_info) πŸŽ€

function used to get specific information of a device. it's giving "tell me everything about yourself" β€” but in a totally non-creepy, driver-appropriate way. 😌

Parameters:

  • dev β€” Compress device
  • dev_info β€” Compress device information to populate

Definition at line 142 of file rte_compressdev_pmd.h.


πŸ’… typedef int(* compressdev_queue_pair_setup_t) (struct rte_compressdev *dev, uint16_t qp_id, uint32_t max_inflight_ops, int socket_id) πŸ’…

setup a queue pair for a device. you're making a new queue pair and giving it a whole identity. main character energy for each qp. πŸ’…

Parameters:

  • dev β€” Compress device
  • qp_id β€” Queue pair identifier
  • max_inflight_ops β€” Max inflight ops which qp must accommodate
  • socket_id β€” Socket identifier

Returns:

  • Returns 0 on success.

Definition at line 159 of file rte_compressdev_pmd.h.


🧚 typedef int(* compressdev_queue_pair_release_t) (struct rte_compressdev *dev, uint16_t qp_id) 🧚

release memory resources allocated by given queue pair. letting go of what no longer serves you. very mindful, very demure. πŸƒ

Parameters:

  • dev β€” Compress device
  • qp_id β€” Queue pair identifier

Returns:

  • 0 on success.
  • EAGAIN if can't close as device is busy

Definition at line 173 of file rte_compressdev_pmd.h.


πŸ¦‹ typedef int(* compressdev_stream_create_t) (struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **stream) πŸ¦‹

create driver private stream data. this is where the pmd stashes its own stream handle. very exclusive, very private. 🀫

Parameters:

  • dev β€” Compressdev device
  • xform β€” xform data
  • stream β€” ptr where handle of pmd's private stream data should be stored

Returns:

  • Returns 0 if private stream structure has been created successfully.
  • Returns -EINVAL if input parameters are invalid.
  • Returns -ENOTSUP if comp device does not support STATEFUL operations.
  • Returns -ENOTSUP if comp device does not support the comp transform.
  • Returns -ENOMEM if the private stream could not be allocated.

Definition at line 192 of file rte_compressdev_pmd.h.


🌸 typedef int(* compressdev_stream_free_t) (struct rte_compressdev *dev, void *stream) 🌸

free driver private stream data. the cleanup era. we love a responsible driver. 🧹

Parameters:

  • dev β€” Compressdev device
  • stream β€” handle of pmd's private stream data

Returns:

  • 0 if successful
  • <0 in error cases
  • Returns -EINVAL if input parameters are invalid.
  • Returns -ENOTSUP if comp device does not support STATEFUL operations.
  • Returns -EBUSY if can't free stream as there are inflight operations

Definition at line 209 of file rte_compressdev_pmd.h.


⭐ typedef int(* compressdev_private_xform_create_t) (struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **private_xform) ⭐

create driver private_xform data. another private stash moment β€” this time for transforms. your driver's personal little xform vault. πŸ”

Parameters:

  • dev β€” Compressdev device
  • xform β€” xform data
  • private_xform β€” ptr where handle of pmd's private_xform data should be stored

Returns:

  • if successful returns 0 and valid private_xform handle
  • <0 in error cases
  • Returns -EINVAL if input parameters are invalid.
  • Returns -ENOTSUP if comp device does not support the comp transform.
  • Returns -ENOMEM if the private_xform could not be allocated.

Definition at line 229 of file rte_compressdev_pmd.h.


πŸ“ typedef int(* compressdev_private_xform_free_t) (struct rte_compressdev *dev, void *private_xform) πŸ“

free driver private_xform data. closing the vault, returning the key. very satisfying. ✨

Parameters:

  • dev β€” Compressdev device
  • private_xform β€” handle of pmd's private_xform data

Returns:

  • 0 if successful
  • <0 in error cases
  • Returns -EINVAL if input parameters are invalid.
  • Returns -EBUSY if can't free private_xform due to inflight operations

Definition at line 245 of file rte_compressdev_pmd.h.


πŸ”₯ Function Documentation πŸ”₯

πŸ‘‘ struct rte_compressdev * rte_compressdev_pmd_get_named_dev (const char *name) πŸ‘‘

get the rte_compressdev structure device pointer for the named device. you give it a name, it gives you the device pointer. match made in heaven. πŸ’–

Parameters:

  • name β€” Compress device name

Returns:

  • The rte_compressdev structure pointer for the given device identifier.

Definition at line ?!? of file rte_compressdev_pmd.h. (the original doesn't specify a line number for this one, bestie β€” it's just vibing without a location. πŸ™ˆ)


πŸ’€ Author πŸ’€

Generated automatically by Doxygen for DPDK from the source code. not me being auto-generated and still serving looks. πŸ’…βœ¨


that's the whole page, bestie. every single detail, every flag, every return value β€” all present and accounted for. you're welcome. 🫢

this iconic manual page is brought to you by DPDK Version 26.03.0, dated whenever this version dropped. stay compressing, stay slaying, and remember: these APIs are for PMDs only, so don't @ me if you're a user app trying to call them directly. periodt. πŸ’–πŸ”₯🌈

πŸ“¦ where this page comes from