1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
12 * Segment an IPv4/TCP packet. This function doesn't check if the input
13 * packet has correct checksums, and doesn't update checksums for output
14 * GSO segments. Furthermore, it doesn't process IP fragment packets.
17 * The packet mbuf to segment.
19 * The max length of a GSO segment, measured in bytes.
21 * The increasing unit of IP ids.
23 * MBUF pool used for allocating direct buffers for output segments.
24 * @param indirect_pool
25 * MBUF pool used for allocating indirect buffers for output segments.
27 * Pointer array used to store the MBUF addresses of output GSO
28 * segments, when the function succeeds. If the memory space in
29 * pkts_out is insufficient, it fails and returns -EINVAL.
31 * The max number of items that 'pkts_out' can keep.
34 * - The number of GSO segments filled in pkts_out on success.
35 * - Return -ENOMEM if run out of memory in MBUF pools.
36 * - Return -EINVAL for invalid parameters.
38 int gso_tcp4_segment(struct rte_mbuf *pkt,
41 struct rte_mempool *direct_pool,
42 struct rte_mempool *indirect_pool,
43 struct rte_mbuf **pkts_out,
44 uint16_t nb_pkts_out);