DPDK 25.03.0-rc0
rte_gso.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_GSO_H_
6#define _RTE_GSO_H_
7
13#include <stdint.h>
14#include <rte_mbuf.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/* Minimum GSO segment size for TCP based packets. */
21#define RTE_GSO_SEG_SIZE_MIN (sizeof(struct rte_ether_hdr) + \
22 sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_tcp_hdr) + 1)
23
24/* Minimum GSO segment size for UDP based packets. */
25#define RTE_GSO_UDP_SEG_SIZE_MIN (sizeof(struct rte_ether_hdr) + \
26 sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_udp_hdr) + 1)
27
28/* GSO flags for rte_gso_ctx. */
29#define RTE_GSO_FLAG_IPID_FIXED (1ULL << 0)
48 uint64_t flag;
52 uint32_t gso_types;
61 uint16_t gso_size;
66};
67
120int rte_gso_segment(struct rte_mbuf *pkt,
121 const struct rte_gso_ctx *ctx,
122 struct rte_mbuf **pkts_out,
123 uint16_t nb_pkts_out);
124#ifdef __cplusplus
125}
126#endif
127
128#endif /* _RTE_GSO_H_ */
int rte_gso_segment(struct rte_mbuf *pkt, const struct rte_gso_ctx *ctx, struct rte_mbuf **pkts_out, uint16_t nb_pkts_out)
uint32_t gso_types
Definition: rte_gso.h:52
uint64_t flag
Definition: rte_gso.h:48
struct rte_mempool * indirect_pool
Definition: rte_gso.h:42
struct rte_mempool * direct_pool
Definition: rte_gso.h:38
uint16_t gso_size
Definition: rte_gso.h:61