DPDK  23.07.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 <stdio.h>
70 #include <stdint.h>
71 
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 
80 #define RTE_MBUF_DYN_NAMESIZE 64
81 
87  size_t size;
88  size_t align;
89  unsigned int flags;
90 };
91 
97  unsigned int flags;
98 };
99 
119 int rte_mbuf_dynfield_register(const struct rte_mbuf_dynfield *params);
120 
144  size_t offset);
145 
159 int rte_mbuf_dynfield_lookup(const char *name,
160  struct rte_mbuf_dynfield *params);
161 
181 int rte_mbuf_dynflag_register(const struct rte_mbuf_dynflag *params);
182 
205 int rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
206  unsigned int bitnum);
207 
221 int rte_mbuf_dynflag_lookup(const char *name,
222  struct rte_mbuf_dynflag *params);
223 
227 #define RTE_MBUF_DYNFIELD(m, offset, type) ((type)((uintptr_t)(m) + (offset)))
228 
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 
262 #define RTE_MBUF_DYNFIELD_TIMESTAMP_NAME "rte_dynfield_timestamp"
263 typedef uint64_t rte_mbuf_timestamp_t;
264 
268 #define RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME "rte_dynflag_rx_timestamp"
269 
286 int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);
287 
301 #define RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME "rte_dynflag_tx_timestamp"
302 
319 int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag);
320 
327 #define RTE_MBUF_DYNFIELD_IP_REASSEMBLY_NAME "rte_dynfield_ip_reassembly"
328 #define RTE_MBUF_DYNFLAG_IP_REASSEMBLY_INCOMPLETE_NAME "rte_dynflag_ip_reassembly_incomplete"
329 
330 #ifdef __cplusplus
331 }
332 #endif
333 
334 #endif /* _RTE_MBUF_DYN_H_ */
int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag)
unsigned int flags
Definition: rte_mbuf_dyn.h:89
int rte_mbuf_dynflag_lookup(const char *name, struct rte_mbuf_dynflag *params)
int rte_mbuf_dynfield_register(const struct rte_mbuf_dynfield *params)
char name[RTE_MBUF_DYN_NAMESIZE]
Definition: rte_mbuf_dyn.h:86
unsigned int flags
Definition: rte_mbuf_dyn.h:97
int rte_mbuf_dynfield_register_offset(const struct rte_mbuf_dynfield *params, size_t offset)
void rte_mbuf_dyn_dump(FILE *out)
int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag)
#define RTE_MBUF_DYN_NAMESIZE
Definition: rte_mbuf_dyn.h:80
int rte_mbuf_dynfield_lookup(const char *name, struct rte_mbuf_dynfield *params)
int rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params, unsigned int bitnum)
int rte_mbuf_dynflag_register(const struct rte_mbuf_dynflag *params)