blob: 62c98a9c60f15d7b4869f1ab523dfeb83fb18ba6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Ezequiel Garciae876f202014-05-19 13:59:52 -03002#ifndef _TSO_H
3#define _TSO_H
4
5#include <net/ip.h>
6
Eric Dumazet9c77b802020-06-17 20:53:22 -07007#define TSO_HEADER_SIZE 256
Antoine Ténartf9cbe9a2017-08-23 09:46:54 +02008
Ezequiel Garciae876f202014-05-19 13:59:52 -03009struct tso_t {
Eric Dumazet185c3e52020-06-17 20:53:23 -070010 int next_frag_idx;
11 int size;
12 void *data;
13 u16 ip_id;
Eric Dumazet761b3312020-06-17 20:53:25 -070014 u8 tlen; /* transport header len */
Eric Dumazet185c3e52020-06-17 20:53:23 -070015 bool ipv6;
16 u32 tcp_seq;
Ezequiel Garciae876f202014-05-19 13:59:52 -030017};
18
Eric Dumazet504b9122020-06-17 20:53:24 -070019int tso_count_descs(const struct sk_buff *skb);
20void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,
Ezequiel Garciae876f202014-05-19 13:59:52 -030021 int size, bool is_last);
Eric Dumazet504b9122020-06-17 20:53:24 -070022void tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size);
Eric Dumazet761b3312020-06-17 20:53:25 -070023int tso_start(struct sk_buff *skb, struct tso_t *tso);
Ezequiel Garciae876f202014-05-19 13:59:52 -030024
25#endif /* _TSO_H */