rte_compressdev_pmd.h(3)
π 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_globalstruct 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 deviceconfigβ Compress device configurations
Returns:
- Returns
0on 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
0on 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:
0on success.EAGAINif 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 devicestatsβ 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 devicedev_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 deviceqp_idβ Queue pair identifiermax_inflight_opsβ Max inflight ops which qp must accommodatesocket_idβ Socket identifier
Returns:
- Returns
0on 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 deviceqp_idβ Queue pair identifier
Returns:
0on success.EAGAINif 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 devicexformβ xform datastreamβ ptr where handle of pmd's private stream data should be stored
Returns:
- Returns
0if private stream structure has been created successfully. - Returns
-EINVALif input parameters are invalid. - Returns
-ENOTSUPif comp device does not support STATEFUL operations. - Returns
-ENOTSUPif comp device does not support the comp transform. - Returns
-ENOMEMif 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 devicestreamβ handle of pmd's private stream data
Returns:
0if successful<0in error cases- Returns
-EINVALif input parameters are invalid. - Returns
-ENOTSUPif comp device does not support STATEFUL operations. - Returns
-EBUSYif 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 devicexformβ xform dataprivate_xformβ ptr where handle of pmd's private_xform data should be stored
Returns:
- if successful returns
0and valid private_xform handle <0in error cases- Returns
-EINVALif input parameters are invalid. - Returns
-ENOTSUPif comp device does not support the comp transform. - Returns
-ENOMEMif 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 deviceprivate_xformβ handle of pmd's private_xform data
Returns:
0if successful<0in error cases- Returns
-EINVALif input parameters are invalid. - Returns
-EBUSYif 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_compressdevstructure 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
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms