rte_comp_op(3)
๐ rte_comp_op ๐ โ a Library Functions Manual situation (yes, section 3, that's the (3) bestie) ๐
okay so. this is the man page for rte_comp_op, and it is literally the struct that makes compression ops happen. it lives in DPDK. it's giving "small struct, big responsibilities." let's go ๐
๐ NAME ๐
rte_comp_op โ the compression operation struct. that's the whole name. short, iconic, does exactly what it says on the tin. ๐
โจ SYNOPSIS โจ
first you gotta let the compiler know what's up:
#include <rte_comp.h>
๐งบ Data Fields ๐งบ
here's everything chilling inside this bad boy, in order, no cap:
struct rte_mempool * mempool
rte_iova_t iova_addr
struct rte_mbuf * m_src
struct rte_mbuf * m_dst
enum rte_comp_flush_flag flush_flag
uint64_t input_chksum
uint64_t output_chksum
uint32_t consumed
uint32_t produced
uint64_t debug_status
uint8_t status
๐ธ Detailed Description ๐ธ
Compression Operation. periodt.
this structure contains data relating to performing a compression operation on the referenced mbuf data buffers. so like, it's the little envelope that carries your "please squish this" / "please un-squish this" request through the system. ๐
comp ops are enqueued and dequeued in comp PMDs using the rte_compressdev_enqueue_burst() / rte_compressdev_dequeue_burst() APIs. iykyk.
Definition at line 382 of file rte_comp.h.
๐ Field Documentation ๐
okay, field by field, we're going in. strap in bestie, there's a lot and every single one matters. โจ
๐ซง void* private_xform
stateless private PMD data derived from an rte_comp_xform. a handle returned by rte_compressdev_private_xform_create() must be attached to operations of op_type RTE_COMP_STATELESS.
Definition at line 385 of file rte_comp.h.
๐ void* stream
private PMD data derived initially from an rte_comp_xform, which holds state and history data and evolves as operations are processed. rte_compressdev_stream_create() must be called on a device for all STATEFUL data streams, and the resulting stream attached to the one or more operations associated with the data stream. all operations in a stream must be sent to the same device. no side-eye switching devices mid-stream, she said what she said. ๐ซ
Definition at line 390 of file rte_comp.h.
๐ struct rte_mempool* mempool
pool from which operation is allocated. that's where your op comes from, that's its home. ๐ก
Definition at line 401 of file rte_comp.h.
๐ rte_iova_t iova_addr
IOVA address of this operation.
IO address of the buffer.
Definition at line 403 of file rte_comp.h.
๐ฅ struct rte_mbuf* m_src
source mbuf. the total size of the input buffer(s) can be retrieved using rte_pktmbuf_pkt_len(m_src). the max data size which can fit in a single mbuf is limited by the uint16_t rte_mbuf.data_len to 64k-1. if the input data is bigger than this it can be passed to the PMD in a chain of mbufs โ but only if the PMD's capabilities indicate it supports this. check the receipts first, bestie. ๐งพ
Definition at line 405 of file rte_comp.h.
๐ค struct rte_mbuf* m_dst
destination mbuf. the total size of the output buffer(s) can be retrieved using rte_pktmbuf_pkt_len(m_dst). the max data size which can fit in a single mbuf is limited by the uint16_t rte_mbuf.data_len to 64k-1. if the output data is expected to be bigger than this a chain of mbufs can be passed to the PMD if the PMD's capabilities indicate it supports this.
Note ๐ข โ if incompressible data is passed to an engine for compression usingRTE_COMP_ALGO_DEFLATE, it's possible for the output data to be larger than the uncompressed data, due to the inclusion of the DEFLATE header blocks. the size ofm_dstshould accommodate this, elseOUT_OF_SPACEerrors can be expected in this case. so budget generously or cry later, your call ๐
Definition at line 413 of file rte_comp.h.
๐ฏ uint32_t offset
starting point for compression or decompression, specified as number of bytes from start of packet in source buffer. this offset starts from the first segment of the buffer, in case the m_src is a chain of mbufs. starting point for checksum generation in compress direction.
starting point for writing output data, specified as number of bytes from start of packet in dest buffer. this offset starts from the first segment of the buffer, in case the m_dst is a chain of mbufs. starting point for checksum generation in decompress direction.
Definition at line 430 of file rte_comp.h.
๐ uint32_t length
the length, in bytes, of the data in source buffer to be compressed or decompressed. also the length of the data over which the checksum should be generated in compress direction.
Definition at line 438 of file rte_comp.h.
๐ uint8_t* digest
output buffer to store hash output, if enabled in xform. buffer would contain valid value only after an op with flush flag = RTE_COMP_FLUSH_FULL/FLUSH_FINAL is processed successfully. so don't come for the digest before the flush comes through. ๐
length of buffer should be contiguous and large enough to accommodate digest produced by specific hash algo.
Definition at line 457 of file rte_comp.h.
๐ฝ enum rte_comp_flush_flag flush_flag
defines flush characteristics for the output data. only applicable in compress direction. ๐
Definition at line 469 of file rte_comp.h.
๐งฎ uint64_t input_chksum
an input checksum can be provided to generate a cumulative checksum across sequential blocks in a STATELESS stream. checksum type is as specified in xform chksum_type.
Definition at line 473 of file rte_comp.h.
โ๏ธ uint64_t output_chksum
if a checksum is generated it will be written in here. checksum type is as specified in xform chksum_type.
Definition at line 478 of file rte_comp.h.
๐ฝ๏ธ uint32_t consumed
the number of bytes from the source buffer which were compressed/decompressed. she ate. ๐
Definition at line 482 of file rte_comp.h.
๐ uint32_t produced
the number of bytes written to the destination buffer which were compressed/decompressed.
Definition at line 486 of file rte_comp.h.
๐ฉบ uint64_t debug_status
status of the operation is returned in the status param. this field allows the PMD to pass back extra pmd-specific debug information. value is not defined on the API. so don't go reading meaning into it, the API did not promise you anything there. ๐ซฃ
Definition at line 490 of file rte_comp.h.
โ
uint8_t status
operation status โ use values from enum rte_comp_status. this is reset to RTE_COMP_OP_STATUS_NOT_PROCESSED on allocation from mempool and will be set to RTE_COMP_OP_STATUS_SUCCESS after operation is successfully processed by a PMD.
Definition at line 496 of file rte_comp.h.
๐๏ธ Author ๐๏ธ
generated automatically by Doxygen for DPDK from the source code. not a human, just vibes and tooling. ๐คโจ
and that's the whole page bestie, no crumbs left. this little diva was brought to you by DPDK, Version 25.11.3, and yes the man page itself carries the rte_comp_op(3) signature on the way out. every field, every line number, every warning โ all accounted for. slay, compress, repeat. ๐๐ฆ๐
๐ฆ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 ยท BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms