DPDK  19.08.2
rte_gro.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
5 #ifndef _RTE_GRO_H_
6 #define _RTE_GRO_H_
7 
13 #include <stdint.h>
14 #include <rte_mbuf.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #define RTE_GRO_MAX_BURST_ITEM_NUM 128U
21 
24 #define RTE_GRO_TYPE_MAX_NUM 64
25 
26 #define RTE_GRO_TYPE_SUPPORT_NUM 2
27 
29 #define RTE_GRO_TCP_IPV4_INDEX 0
30 #define RTE_GRO_TCP_IPV4 (1ULL << RTE_GRO_TCP_IPV4_INDEX)
31 
32 #define RTE_GRO_IPV4_VXLAN_TCP_IPV4_INDEX 1
33 #define RTE_GRO_IPV4_VXLAN_TCP_IPV4 (1ULL << RTE_GRO_IPV4_VXLAN_TCP_IPV4_INDEX)
34 
40 struct rte_gro_param {
41  uint64_t gro_types;
43  uint16_t max_flow_num;
47  uint16_t socket_id;
52 };
53 
69 void *rte_gro_ctx_create(const struct rte_gro_param *param);
70 
80 void rte_gro_ctx_destroy(void *ctx);
81 
102 uint16_t rte_gro_reassemble_burst(struct rte_mbuf **pkts,
103  uint16_t nb_pkts,
104  const struct rte_gro_param *param);
105 
133 uint16_t rte_gro_reassemble(struct rte_mbuf **pkts,
134  uint16_t nb_pkts,
135  void *ctx);
136 
164 uint16_t rte_gro_timeout_flush(void *ctx,
165  uint64_t timeout_cycles,
166  uint64_t gro_types,
167  struct rte_mbuf **out,
168  uint16_t max_nb_out);
169 
183 uint64_t rte_gro_get_pkt_count(void *ctx);
184 
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif /* _RTE_GRO_H_ */
uint16_t rte_gro_timeout_flush(void *ctx, uint64_t timeout_cycles, uint64_t gro_types, struct rte_mbuf **out, uint16_t max_nb_out)
uint16_t max_flow_num
Definition: rte_gro.h:43
uint64_t gro_types
Definition: rte_gro.h:41
uint16_t max_item_per_flow
Definition: rte_gro.h:45
void * rte_gro_ctx_create(const struct rte_gro_param *param)
void rte_gro_ctx_destroy(void *ctx)
uint16_t rte_gro_reassemble(struct rte_mbuf **pkts, uint16_t nb_pkts, void *ctx)
uint16_t socket_id
Definition: rte_gro.h:47
uint64_t rte_gro_get_pkt_count(void *ctx)
uint16_t rte_gro_reassemble_burst(struct rte_mbuf **pkts, uint16_t nb_pkts, const struct rte_gro_param *param)