DPDK  20.05.0
rte_mbuf_dyn.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2019 6WIND S.A.
3  */
4 
5 #ifndef _RTE_MBUF_DYN_H_
6 #define _RTE_MBUF_DYN_H_
7 
69 #include <sys/types.h>
73 #define RTE_MBUF_DYN_NAMESIZE 64
74 
80  size_t size;
81  size_t align;
82  unsigned int flags;
83 };
84 
90  unsigned int flags;
91 };
92 
112 __rte_experimental
113 int rte_mbuf_dynfield_register(const struct rte_mbuf_dynfield *params);
114 
137 __rte_experimental
139  size_t offset);
140 
154 __rte_experimental
155 int rte_mbuf_dynfield_lookup(const char *name,
156  struct rte_mbuf_dynfield *params);
157 
177 __rte_experimental
178 int rte_mbuf_dynflag_register(const struct rte_mbuf_dynflag *params);
179 
202 __rte_experimental
203 int rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
204  unsigned int bitnum);
205 
219 __rte_experimental
220 int rte_mbuf_dynflag_lookup(const char *name,
221  struct rte_mbuf_dynflag *params);
222 
226 #define RTE_MBUF_DYNFIELD(m, offset, type) ((type)((uintptr_t)(m) + (offset)))
227 
234 __rte_experimental
235 void rte_mbuf_dyn_dump(FILE *out);
236 
237 /*
238  * Placeholder for dynamic fields and flags declarations.
239  * This is centralizing point to gather all field names
240  * and parameters together.
241  */
242 
243 /*
244  * The metadata dynamic field provides some extra packet information
245  * to interact with RTE Flow engine. The metadata in sent mbufs can be
246  * used to match on some Flows. The metadata in received mbufs can
247  * provide some feedback from the Flows. The metadata flag tells
248  * whether the field contains actual value to send, or received one.
249  */
250 #define RTE_MBUF_DYNFIELD_METADATA_NAME "rte_flow_dynfield_metadata"
251 #define RTE_MBUF_DYNFLAG_METADATA_NAME "rte_flow_dynflag_metadata"
252 
253 #endif
__rte_experimental int rte_mbuf_dynflag_lookup(const char *name, struct rte_mbuf_dynflag *params)
unsigned int flags
Definition: rte_mbuf_dyn.h:82
char name[RTE_MBUF_DYN_NAMESIZE]
Definition: rte_mbuf_dyn.h:89
char name[RTE_MBUF_DYN_NAMESIZE]
Definition: rte_mbuf_dyn.h:79
unsigned int flags
Definition: rte_mbuf_dyn.h:90
__rte_experimental int rte_mbuf_dynflag_register(const struct rte_mbuf_dynflag *params)
#define RTE_MBUF_DYN_NAMESIZE
Definition: rte_mbuf_dyn.h:73
__rte_experimental void rte_mbuf_dyn_dump(FILE *out)
__rte_experimental int rte_mbuf_dynfield_lookup(const char *name, struct rte_mbuf_dynfield *params)
__rte_experimental int rte_mbuf_dynfield_register(const struct rte_mbuf_dynfield *params)
__rte_experimental int rte_mbuf_dynfield_register_offset(const struct rte_mbuf_dynfield *params, size_t offset)
__rte_experimental int rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params, unsigned int bitnum)