DPDK 25.03.0-rc0
rte_pdump.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016 Intel Corporation
3 */
4
5#ifndef _RTE_PDUMP_H_
6#define _RTE_PDUMP_H_
7
15#include <stdint.h>
16
17#include <rte_bpf.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define RTE_PDUMP_ALL_QUEUES UINT16_MAX
24
25enum {
26 RTE_PDUMP_FLAG_RX = 1, /* receive direction */
27 RTE_PDUMP_FLAG_TX = 2, /* transmit direction */
28 /* both receive and transmit directions */
29 RTE_PDUMP_FLAG_RXTX = (RTE_PDUMP_FLAG_RX|RTE_PDUMP_FLAG_TX),
30
31 RTE_PDUMP_FLAG_PCAPNG = 4, /* format for pcapng */
32};
33
42int
44
53int
55
79int
80rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
81 struct rte_ring *ring,
82 struct rte_mempool *mp,
83 void *filter);
84
109int
110rte_pdump_enable_bpf(uint16_t port_id, uint16_t queue,
111 uint32_t flags, uint32_t snaplen,
112 struct rte_ring *ring,
113 struct rte_mempool *mp,
114 const struct rte_bpf_prm *prm);
115
133int
134rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
135
160int
161rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
162 uint32_t flags,
163 struct rte_ring *ring,
164 struct rte_mempool *mp,
165 void *filter);
166
192int
193rte_pdump_enable_bpf_by_deviceid(const char *device_id, uint16_t queue,
194 uint32_t flags, uint32_t snaplen,
195 struct rte_ring *ring,
196 struct rte_mempool *mp,
197 const struct rte_bpf_prm *filter);
198
199
218int
219rte_pdump_disable_by_deviceid(char *device_id, uint16_t queue,
220 uint32_t flags);
221
222
228 RTE_ATOMIC(uint64_t) accepted;
229 RTE_ATOMIC(uint64_t) filtered;
230 RTE_ATOMIC(uint64_t) nombuf;
231 RTE_ATOMIC(uint64_t) ringfull;
233 uint64_t reserved[4];
234};
235
246int
247rte_pdump_stats(uint16_t port_id, struct rte_pdump_stats *stats);
248
249
250#ifdef __cplusplus
251}
252#endif
253
254#endif /* _RTE_PDUMP_H_ */
int rte_pdump_uninit(void)
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_init(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_by_deviceid(char *device_id, 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(uint16_t port, uint16_t queue, uint32_t flags)
int rte_pdump_stats(uint16_t port_id, struct rte_pdump_stats *stats)
uint64_t accepted
Definition: rte_pdump.h:228
uint64_t reserved[4]
Definition: rte_pdump.h:233
uint64_t filtered
Definition: rte_pdump.h:229
uint64_t nombuf
Definition: rte_pdump.h:230
uint64_t ringfull
Definition: rte_pdump.h:231