DPDK  17.11.10
rte_gso.h
Go to the documentation of this file.
1 /*-
2  * BSD LICENSE
3  *
4  * Copyright(c) 2017 Intel Corporation. All rights reserved.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * * Neither the name of Intel Corporation nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef _RTE_GSO_H_
35 #define _RTE_GSO_H_
36 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #include <stdint.h>
47 #include <rte_mbuf.h>
48 
49 /* Minimum GSO segment size. */
50 #define RTE_GSO_SEG_SIZE_MIN (sizeof(struct ether_hdr) + \
51  sizeof(struct ipv4_hdr) + sizeof(struct tcp_hdr) + 1)
52 
53 /* GSO flags for rte_gso_ctx. */
54 #define RTE_GSO_FLAG_IPID_FIXED (1ULL << 0)
55 
62 struct rte_gso_ctx {
73  uint64_t flag;
77  uint32_t gso_types;
86  uint16_t gso_size;
91 };
92 
140 int rte_gso_segment(struct rte_mbuf *pkt,
141  const struct rte_gso_ctx *ctx,
142  struct rte_mbuf **pkts_out,
143  uint16_t nb_pkts_out);
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #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)
uint64_t flag
Definition: rte_gso.h:73
struct rte_mempool * indirect_pool
Definition: rte_gso.h:67
struct rte_mempool * direct_pool
Definition: rte_gso.h:63
uint16_t gso_size
Definition: rte_gso.h:86
uint32_t gso_types
Definition: rte_gso.h:77