1#ifndef NDNDPDK_PDUMP_SOURCE_H
2#define NDNDPDK_PDUMP_SOURCE_H
8#include "../vendor/pcg_basic.h"
10#include <urcu-pointer.h>
27__attribute__((nonnull))
void
47__attribute__((nonnull)) static __rte_always_inline
PdumpSource*
49 return rcu_dereference(ref->s);
56__attribute__((nonnull))
static __rte_always_inline
bool
57PdumpSourceRef_Process(
PdumpSourceRef* ref,
struct rte_mbuf** pkts, uint16_t count) {
80__attribute__((nonnull))
bool
96static __rte_always_inline
void
99 ctx->
source = PdumpSourceRef_Get(ref);
110static __rte_always_inline
bool
112 if (ctx->
source == NULL) {
120static __rte_always_inline
void
#define POISON(...)
Write junk to memory region to expose memory access bugs.
Definition common.h:104
#define NULLize(x)
Set x to NULL to expose memory access bugs.
Definition common.h:79
@ MaxBurstSize
Definition enum.h:7
@ NameMaxLength
Definition enum.h:10
@ PdumpMaxNames
Definition enum.h:7
PdumpSourceRef gPdumpEthPortSources[RTE_MAX_ETHPORTS]
Definition source.c:58
PdumpSource * PdumpSourceRef_Set(PdumpSourceRef *ref, PdumpSource *s)
Assign or clear PdumpSource in PdumpSourceRef.
Definition source.c:31
void PdumpSource_Process(PdumpSource *s, struct rte_mbuf **pkts, uint16_t count)
Submit packets for potential dumping.
Definition source.c:5
bool PdumpFaceSource_Filter(PdumpSource *s, struct rte_mbuf *pkt)
Perform name filtering to determine whether to capture a packet.
Definition source.c:51
bool(* PdumpSource_Filter)(PdumpSource *s, struct rte_mbuf *pkt)
Definition source.h:14
Packet dump for unmatched frames on an Ethernet port, contextual information.
Definition source.h:86
uint16_t count
Definition source.h:88
PdumpSource * source
Definition source.h:87
struct rte_mbuf * pkts[MaxBurstSize]
Definition source.h:89
Packet dump from a face on RX or TX direction.
Definition source.h:67
pcg32_random_t rng
Definition source.h:69
uint16_t nameL[PdumpMaxNames]
Definition source.h:71
uint32_t sample[PdumpMaxNames]
Definition source.h:70
uint8_t nameV[PdumpMaxNames *NameMaxLength]
Definition source.h:72
PdumpSource base
Definition source.h:68
RCU-protected pointer to PdumpSource.
Definition source.h:31
PdumpSource * s
Definition source.h:32
Packet dump source.
Definition source.h:17
PdumpSource_Filter filter
Definition source.h:20
uint32_t mbufType
Definition source.h:21
uint16_t mbufPort
Definition source.h:22
struct rte_mempool * directMp
Definition source.h:18
struct rte_ring * queue
Definition source.h:19
bool mbufCopy
Definition source.h:23