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 using RTE_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 of m_dst should accommodate this, else OUT_OF_SPACE errors 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