DPDK  20.11.6
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 
18 #include <rte_mbuf.h>
19 #include <rte_mbuf_dyn.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct rte_reorder_buffer;
26 
27 typedef uint32_t rte_reorder_seqn_t;
28 extern int rte_reorder_seqn_dynfield_offset;
29 
39 __rte_experimental
40 static inline rte_reorder_seqn_t *
42 {
43  return RTE_MBUF_DYNFIELD(mbuf, rte_reorder_seqn_dynfield_offset,
44  rte_reorder_seqn_t *);
45 }
46 
66 struct rte_reorder_buffer *
67 rte_reorder_create(const char *name, unsigned socket_id, unsigned int size);
68 
85 struct rte_reorder_buffer *
86 rte_reorder_init(struct rte_reorder_buffer *b, unsigned int bufsize,
87  const char *name, unsigned int size);
88 
101 struct rte_reorder_buffer *
102 rte_reorder_find_existing(const char *name);
103 
110 void
111 rte_reorder_reset(struct rte_reorder_buffer *b);
112 
121 void
122 rte_reorder_free(struct rte_reorder_buffer *b);
123 
146 int
147 rte_reorder_insert(struct rte_reorder_buffer *b, struct rte_mbuf *mbuf);
148 
166 unsigned int
167 rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs,
168  unsigned max_mbufs);
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif /* _RTE_REORDER_H_ */
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
int rte_reorder_insert(struct rte_reorder_buffer *b, struct rte_mbuf *mbuf)
struct rte_reorder_buffer * rte_reorder_find_existing(const char *name)
void rte_reorder_free(struct rte_reorder_buffer *b)
#define RTE_MBUF_DYNFIELD(m, offset, type)
Definition: rte_mbuf_dyn.h:235
struct rte_reorder_buffer * rte_reorder_init(struct rte_reorder_buffer *b, unsigned int bufsize, const char *name, unsigned int size)
struct rte_reorder_buffer * rte_reorder_create(const char *name, unsigned socket_id, unsigned int size)
void rte_reorder_reset(struct rte_reorder_buffer *b)