rte_pdump.h(3)
π rte_pdump.h β Library Functions Manual π
okay bestie, pull up a chair, we're doing the RTE pdump header today and honestly? it's giving main character energy. this is rte_pdump.h(3), no cap. π¦
β¨ NAME β¨
rte_pdump.h β literally just the header file, that's the whole name, we keep it simple here π
πΈ SYNOPSIS πΈ
#include <stdint.h>
#include <rte_bpf.h>
π Data Structures
struct rte_pdump_stats
π Functions
int rte_pdump_init (void)
int rte_pdump_uninit (void)
int rte_pdump_enable (uint16_t port, uint16_t queue, uint32_t flags,
struct rte_ring *ring, struct rte_mempool *mp, void *filter)
int rte_pdump_enable_bpf (uint16_t port_id, uint16_t queue, uint32_t
flags, uint32_t snaplen, struct rte_ring *ring, struct rte_mempool
*mp, const struct rte_bpf_prm *prm)
int rte_pdump_disable (uint16_t port, uint16_t queue, uint32_t flags)
int rte_pdump_enable_by_deviceid (char *device_id, uint16_t queue,
uint32_t flags, struct rte_ring *ring, struct rte_mempool *mp, void
*filter)
int rte_pdump_enable_bpf_by_deviceid (const char *device_id, uint16_t
queue, uint32_t flags, uint32_t snaplen, struct rte_ring *ring,
struct rte_mempool *mp, const struct rte_bpf_prm *filter)
int rte_pdump_disable_by_deviceid (char *device_id, uint16_t queue,
uint32_t flags)
int rte_pdump_stats (uint16_t port_id, struct rte_pdump_stats *stats)
π Detailed Description π
okay so. RTE pdump. it's the packet dump library and its whole job is providing packet capturing support on dpdk. that's it. that's the vibe. π
Definition in file rte_pdump.h.
π Function Documentation π
β int rte_pdump_init (void )
Initialize packet capturing handling, bestie. β¨
what it actually does: registers the IPC action so you can communicate with the target (primary) process. iykyk. π«Ά
Returns
0on success,-1on error
β int rte_pdump_uninit (void )
Un initialize packet capturing handling.
the way that it unregisters the IPC action used for communication with the target (primary) process. cleanup era π
Returns
0on success,-1on error
π₯ int rte_pdump_enable (uint16_t port, uint16_t queue, uint32_t flags, struct rte_ring * ring, struct rte_mempool * mp, void * filter)
Enables packet capturing on given port and queue. π₯
Parameters
portβ the port you want packet capturing enabled on.queueβ the queue of a given port where packet capturing should be enabled. bestie you should pass the valueUINT16_MAXif you wanna enable packet capturing on all the queues of a given port.flagsβ flags specifiesRTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTX, i.e. which direction packet capturing should be enabled for on a given port and queue.ringβ the ring where captured packets get enqueued for the user.mpβ the mempool onto which original packets will be mirrored or duplicated.filterβ Unused, should beNULL. don't be quirky with it π
Returns
0on success,-1on error, andrte_errnois set accordingly.
π₯ int rte_pdump_enable_bpf (uint16_t port_id, uint16_t queue, uint32_t flags, uint32_t snaplen, struct rte_ring * ring, struct rte_mempool * mp, const struct rte_bpf_prm * prm)
Enables packet capturing on given port and queue with filtering. the glow-up version, we stan π§
Parameters
port_idβ The Ethernet port on which packet capturing should be enabled.queueβ The queue on the Ethernet port which packet capturing should be enabled. PassUINT16_MAXto enable packet capturing on all queues of a given port.flagsβ Pdump library flags that specify direction and packet format.snaplenβ The upper limit on bytes to copy. PassingUINT32_MAXmeans capture all the possible data.ringβ The ring on which captured packets will be enqueued for user.mpβ The mempool on to which original packets will be mirrored or duplicated.prmβ Use BPF program to run to filter packes (can beNULL)
Returns
0on success,-1on error, andrte_errnois set accordingly.
π int rte_pdump_disable (uint16_t port, uint16_t queue, uint32_t flags)
Disables packet capturing on given port and queue. the sad part of the story π
Parameters
portβ port on which packet capturing should be disabled.queueβ queue of a given port on which packet capturing should be disabled. users should pass on valueUINT16_MAXto disable packet capturing on all queues of a given port.flagsβ flags specifiesRTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTXon which packet capturing should be enabled for a given port and queue.
Returns
0on success,-1on error, andrte_errnois set accordingly.
π¦ int rte_pdump_enable_by_deviceid (char * device_id, uint16_t queue, uint32_t flags, struct rte_ring * ring, struct rte_mempool * mp, void * filter)
Enables packet capturing on given device id and queue. heads up: device_id can be a name or a pci address of the device. versatile icon π
Parameters
device_idβ device id on which packet capturing should be enabled.queueβ queue of a given device id on which packet capturing should be enabled. users should pass on valueUINT16_MAXto enable packet capturing on all queues of a given device id.flagsβ flags specifiesRTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTXon which packet capturing should be enabled for a given port and queue.ringβ ring on which captured packets will be enqueued for user.mpβ mempool on to which original packets will be mirrored or duplicated.filterβ unused, should beNULL
Returns
0on success,-1on error, andrte_errnois set accordingly.
π¦ int rte_pdump_enable_bpf_by_deviceid (const char * device_id, uint16_t queue, uint32_t flags, uint32_t snaplen, struct rte_ring * ring, struct rte_mempool * mp, const struct rte_bpf_prm * filter)
Enables packet capturing on given device id and queue with filtering. and reminder bestie: device_id can be a name or pci address of device. β¨
Parameters
device_idβ device id on which packet capturing should be enabled.queueβ The queue on the Ethernet port which packet capturing should be enabled. PassUINT16_MAXto enable packet capturing on all queues of a given port.flagsβ Pdump library flags that specify direction and packet format.snaplenβ The upper limit on bytes to copy. PassingUINT32_MAXmeans capture all the possible data.ringβ The ring on which captured packets will be enqueued for user.mpβ The mempool on to which original packets will be mirrored or duplicated.filterβ Use BPF program to run to filter packes (can beNULL)
Returns
0on success,-1on error, andrte_errnois set accordingly.
π int rte_pdump_disable_by_deviceid (char * device_id, uint16_t queue, uint32_t flags)
Disables packet capturing on given device_id and queue. and yeah, device_id can be a name or pci address of device. π
Parameters
device_idβ pci address or name of the device on which packet capturing should be disabled.queueβ queue of a given device on which packet capturing should be disabled. users should pass on valueUINT16_MAXto disable packet capturing on all queues of a given device id.flagsβ flags specifiesRTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTXon which packet capturing should be enabled for a given port and queue.
Returns
0on success,-1on error, andrte_errnois set accordingly.
π int rte_pdump_stats (uint16_t port_id, struct rte_pdump_stats * stats)
Retrieve the packet capture statistics for a queue. numbers era, we love data π
Parameters
port_idβ The port identifier of the Ethernet device.statsβ A pointer to structure of typerte_pdump_statsto be filled in.
Returns
- Zero if successful.
-1on error andrte_errnois set.
πΈ Author πΈ
Generated automatically by Doxygen for DPDK from the source code. (not a human author, just a robot doing its lil thing π€β¨)
aaaand that's the whole page bestie, you ate that π«Ά go capture some packets responsibly β mwah π
DPDK, Version 25.11.3 β rte_pdump.h(3), signing off π
πΈ
π¦ 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