DPDK  19.11.4
Enumerations | Functions
rte_pdump.h File Reference
#include <stdint.h>
#include <rte_mempool.h>
#include <rte_ring.h>

Go to the source code of this file.

Enumerations

enum  { ,
  RTE_QDMA_MODE_HW, RTE_QDMA_MODE_VIRTUAL , RTE_MIN_ERRNO = __ELASTERROR, E_RTE_SECONDARY,
  E_RTE_NO_CONFIG, RTE_MAX_ERRNO , CFG_FLAG_GLOBAL_SECTION = 1, CFG_FLAG_EMPTY_VALUES = 2,
  IP_LAST_FRAG_IDX, IP_FIRST_FRAG_IDX, IP_MIN_FRAG_NUM, IP_MAX_FRAG_NUM = RTE_LIBRTE_IP_FRAG_MAX_FRAG ,
  RTE_RIB_GET_NXT_ALL, RTE_RIB_GET_NXT_COVER, RTE_RIB6_GET_NXT_ALL, RTE_RIB6_GET_NXT_COVER
}
 

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_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_disable_by_deviceid (char *device_id, uint16_t queue, uint32_t flags)
 

Detailed Description

RTE pdump

packet dump library to provide packet capturing support on dpdk.

Definition in file rte_pdump.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RTE_QDMA_MODE_HW 

Allocate a H/W queue per VQ i.e. Exclusive hardware queue for a VQ. This mode will have best performance.

RTE_QDMA_MODE_VIRTUAL 

A VQ shall not have an exclusive associated H/W queue. Rather a H/W Queue will be shared by multiple Virtual Queues. This mode will have intermediate data structures to support multi VQ to PQ mappings thus having some performance implications. Note: Even in this mode there is an option to allocate a H/W queue for a VQ. Please see 'RTE_QDMA_VQ_EXCLUSIVE_PQ' flag.

RTE_MIN_ERRNO 

Start numbering above std errno vals

E_RTE_SECONDARY 

Operation not allowed in secondary processes

E_RTE_NO_CONFIG 

Missing rte_config

RTE_MAX_ERRNO 

Max RTE error number

CFG_FLAG_GLOBAL_SECTION 

Indicates that the file supports key value entries before the first defined section. These entries can be accessed in the "GLOBAL" section.

CFG_FLAG_EMPTY_VALUES 

Indicates that file supports key value entries where the value can be zero length (e.g., "key=").

IP_LAST_FRAG_IDX 

index of last fragment

IP_FIRST_FRAG_IDX 

index of first fragment

IP_MIN_FRAG_NUM 

minimum number of fragments

IP_MAX_FRAG_NUM 

maximum number of fragments per packet

RTE_RIB_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

RTE_RIB6_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB6_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

Definition at line 25 of file rte_pdump.h.

Function Documentation

◆ rte_pdump_init()

int rte_pdump_init ( void  )

Initialize packet capturing handling

Register the IPC action for communication with target (primary) process.

Returns
0 on success, -1 on error

◆ rte_pdump_uninit()

int rte_pdump_uninit ( void  )

Un initialize packet capturing handling

Unregister the IPC action for communication with target (primary) process.

Returns
0 on success, -1 on error

◆ rte_pdump_enable()

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
portport on which packet capturing should be enabled.
queuequeue of a given port on which packet capturing should be enabled. users should pass on value UINT16_MAX to enable packet capturing on all queues of a given port.
flagsflags specifies RTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTX on which packet capturing should be enabled for a given port and queue.
ringring on which captured packets will be enqueued for user.
mpmempool on to which original packets will be mirrored or duplicated.
filterplace holder for packet filtering.
Returns
0 on success, -1 on error, rte_errno is set accordingly.

◆ rte_pdump_disable()

int rte_pdump_disable ( uint16_t  port,
uint16_t  queue,
uint32_t  flags 
)

Disables packet capturing on given port and queue.

Parameters
portport on which packet capturing should be disabled.
queuequeue of a given port on which packet capturing should be disabled. users should pass on value UINT16_MAX to disable packet capturing on all queues of a given port.
flagsflags specifies RTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTX on which packet capturing should be enabled for a given port and queue.
Returns
0 on success, -1 on error, rte_errno is set accordingly.

◆ rte_pdump_enable_by_deviceid()

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. device_id can be name or pci address of device.

Parameters
device_iddevice id on which packet capturing should be enabled.
queuequeue of a given device id on which packet capturing should be enabled. users should pass on value UINT16_MAX to enable packet capturing on all queues of a given device id.
flagsflags specifies RTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTX on which packet capturing should be enabled for a given port and queue.
ringring on which captured packets will be enqueued for user.
mpmempool on to which original packets will be mirrored or duplicated.
filterplace holder for packet filtering.
Returns
0 on success, -1 on error, rte_errno is set accordingly.

◆ rte_pdump_disable_by_deviceid()

int rte_pdump_disable_by_deviceid ( char *  device_id,
uint16_t  queue,
uint32_t  flags 
)

Disables packet capturing on given device_id and queue. device_id can be name or pci address of device.

Parameters
device_idpci address or name of the device on which packet capturing should be disabled.
queuequeue of a given device on which packet capturing should be disabled. users should pass on value UINT16_MAX to disable packet capturing on all queues of a given device id.
flagsflags specifies RTE_PDUMP_FLAG_RX/RTE_PDUMP_FLAG_TX/RTE_PDUMP_FLAG_RXTX on which packet capturing should be enabled for a given port and queue.
Returns
0 on success, -1 on error, rte_errno is set accordingly.