DPDK 25.03.0-rc0
rte_reorder.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
3 */
4
5#ifndef _RTE_REORDER_H_
6#define _RTE_REORDER_H_
7
17#include <rte_compat.h>
18#include <rte_mbuf.h>
19#include <rte_mbuf_dyn.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct rte_reorder_buffer;
26
27typedef uint32_t rte_reorder_seqn_t;
28extern int rte_reorder_seqn_dynfield_offset;
29
39__rte_experimental
40static inline rte_reorder_seqn_t *
42{
43 return RTE_MBUF_DYNFIELD(mbuf, rte_reorder_seqn_dynfield_offset,
44 rte_reorder_seqn_t *);
45}
46
66struct rte_reorder_buffer *
67rte_reorder_create(const char *name, unsigned socket_id, unsigned int size);
68
86struct rte_reorder_buffer *
87rte_reorder_init(struct rte_reorder_buffer *b, unsigned int bufsize,
88 const char *name, unsigned int size);
89
102struct rte_reorder_buffer *
104
111void
112rte_reorder_reset(struct rte_reorder_buffer *b);
113
121void
122rte_reorder_free(struct rte_reorder_buffer *b);
123
146int
147rte_reorder_insert(struct rte_reorder_buffer *b, struct rte_mbuf *mbuf);
148
166unsigned int
167rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
168 unsigned max_mbufs);
169
191__rte_experimental
192unsigned int
193rte_reorder_drain_up_to_seqn(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
194 unsigned int max_mbufs, rte_reorder_seqn_t seqn);
195
211__rte_experimental
212unsigned int
213rte_reorder_min_seqn_set(struct rte_reorder_buffer *b, rte_reorder_seqn_t min_seqn);
214
228__rte_experimental
229unsigned int
231
232#ifdef __cplusplus
233}
234#endif
235
236#endif /* _RTE_REORDER_H_ */
#define RTE_MBUF_DYNFIELD(m, offset, type)
Definition: rte_mbuf_dyn.h:227
__rte_experimental unsigned int rte_reorder_drain_up_to_seqn(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs, unsigned int max_mbufs, rte_reorder_seqn_t seqn)
int rte_reorder_insert(struct rte_reorder_buffer *b, struct rte_mbuf *mbuf)
unsigned int rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs, unsigned max_mbufs)
static __rte_experimental rte_reorder_seqn_t * rte_reorder_seqn(struct rte_mbuf *mbuf)
Definition: rte_reorder.h:41
void rte_reorder_free(struct rte_reorder_buffer *b)
struct rte_reorder_buffer * rte_reorder_create(const char *name, unsigned socket_id, unsigned int size)
struct rte_reorder_buffer * rte_reorder_init(struct rte_reorder_buffer *b, unsigned int bufsize, const char *name, unsigned int size)
__rte_experimental unsigned int rte_reorder_memory_footprint_get(unsigned int size)
struct rte_reorder_buffer * rte_reorder_find_existing(const char *name)
__rte_experimental unsigned int rte_reorder_min_seqn_set(struct rte_reorder_buffer *b, rte_reorder_seqn_t min_seqn)
void rte_reorder_reset(struct rte_reorder_buffer *b)