DPDK 21.11.9
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#include <rte_mempool.h>
17#include <rte_ring.h>
18#include <rte_bpf.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#define RTE_PDUMP_ALL_QUEUES UINT16_MAX
25
26enum {
27 RTE_PDUMP_FLAG_RX = 1, /* receive direction */
28 RTE_PDUMP_FLAG_TX = 2, /* transmit direction */
29 /* both receive and transmit directions */
30 RTE_PDUMP_FLAG_RXTX = (RTE_PDUMP_FLAG_RX|RTE_PDUMP_FLAG_TX),
31
32 RTE_PDUMP_FLAG_PCAPNG = 4, /* format for pcapng */
33};
34
43int
45
54int
56
80int
81rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
82 struct rte_ring *ring,
83 struct rte_mempool *mp,
84 void *filter);
85
113__rte_experimental
114int
115rte_pdump_enable_bpf(uint16_t port_id, uint16_t queue,
116 uint32_t flags, uint32_t snaplen,
117 struct rte_ring *ring,
118 struct rte_mempool *mp,
119 const struct rte_bpf_prm *prm);
120
138int
139rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
140
165int
166rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
167 uint32_t flags,
168 struct rte_ring *ring,
169 struct rte_mempool *mp,
170 void *filter);
171
200__rte_experimental
201int
202rte_pdump_enable_bpf_by_deviceid(const char *device_id, uint16_t queue,
203 uint32_t flags, uint32_t snaplen,
204 struct rte_ring *ring,
205 struct rte_mempool *mp,
206 const struct rte_bpf_prm *filter);
207
208
227int
228rte_pdump_disable_by_deviceid(char *device_id, uint16_t queue,
229 uint32_t flags);
230
231
237 uint64_t accepted;
238 uint64_t filtered;
239 uint64_t nombuf;
240 uint64_t ringfull;
242 uint64_t reserved[4];
243};
244
258__rte_experimental
259int
260rte_pdump_stats(uint16_t port_id, struct rte_pdump_stats *stats);
261
262
263#ifdef __cplusplus
264}
265#endif
266
267#endif /* _RTE_PDUMP_H_ */
int rte_pdump_uninit(void)
__rte_experimental int rte_pdump_stats(uint16_t port_id, struct rte_pdump_stats *stats)
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)
__rte_experimental 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)
__rte_experimental 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)
uint64_t accepted
Definition: rte_pdump.h:237
uint64_t reserved[4]
Definition: rte_pdump.h:242
uint64_t filtered
Definition: rte_pdump.h:238
uint64_t nombuf
Definition: rte_pdump.h:239
uint64_t ringfull
Definition: rte_pdump.h:240