DPDK 22.11.7
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_compat.h>
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
112__rte_experimental
113int
114rte_pdump_enable_bpf(uint16_t port_id, uint16_t queue,
115 uint32_t flags, uint32_t snaplen,
116 struct rte_ring *ring,
117 struct rte_mempool *mp,
118 const struct rte_bpf_prm *prm);
119
137int
138rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
139
164int
165rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
166 uint32_t flags,
167 struct rte_ring *ring,
168 struct rte_mempool *mp,
169 void *filter);
170
199__rte_experimental
200int
201rte_pdump_enable_bpf_by_deviceid(const char *device_id, uint16_t queue,
202 uint32_t flags, uint32_t snaplen,
203 struct rte_ring *ring,
204 struct rte_mempool *mp,
205 const struct rte_bpf_prm *filter);
206
207
226int
227rte_pdump_disable_by_deviceid(char *device_id, uint16_t queue,
228 uint32_t flags);
229
230
236 uint64_t accepted;
237 uint64_t filtered;
238 uint64_t nombuf;
239 uint64_t ringfull;
241 uint64_t reserved[4];
242};
243
257__rte_experimental
258int
259rte_pdump_stats(uint16_t port_id, struct rte_pdump_stats *stats);
260
261
262#ifdef __cplusplus
263}
264#endif
265
266#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:236
uint64_t reserved[4]
Definition: rte_pdump.h:241
uint64_t filtered
Definition: rte_pdump.h:237
uint64_t nombuf
Definition: rte_pdump.h:238
uint64_t ringfull
Definition: rte_pdump.h:239