Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ezequiel Garcia | e876f20 | 2014-05-19 13:59:52 -0300 | [diff] [blame] | 2 | #ifndef _TSO_H |
| 3 | #define _TSO_H |
| 4 | |
| 5 | #include <net/ip.h> |
| 6 | |
Eric Dumazet | 9c77b80 | 2020-06-17 20:53:22 -0700 | [diff] [blame] | 7 | #define TSO_HEADER_SIZE 256 |
Antoine Ténart | f9cbe9a | 2017-08-23 09:46:54 +0200 | [diff] [blame] | 8 | |
Ezequiel Garcia | e876f20 | 2014-05-19 13:59:52 -0300 | [diff] [blame] | 9 | struct tso_t { |
Eric Dumazet | 185c3e5 | 2020-06-17 20:53:23 -0700 | [diff] [blame] | 10 | int next_frag_idx; |
| 11 | int size; |
| 12 | void *data; |
| 13 | u16 ip_id; |
Eric Dumazet | 761b331 | 2020-06-17 20:53:25 -0700 | [diff] [blame] | 14 | u8 tlen; /* transport header len */ |
Eric Dumazet | 185c3e5 | 2020-06-17 20:53:23 -0700 | [diff] [blame] | 15 | bool ipv6; |
| 16 | u32 tcp_seq; |
Ezequiel Garcia | e876f20 | 2014-05-19 13:59:52 -0300 | [diff] [blame] | 17 | }; |
| 18 | |
Eric Dumazet | 504b912 | 2020-06-17 20:53:24 -0700 | [diff] [blame] | 19 | int tso_count_descs(const struct sk_buff *skb); |
| 20 | void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso, |
Ezequiel Garcia | e876f20 | 2014-05-19 13:59:52 -0300 | [diff] [blame] | 21 | int size, bool is_last); |
Eric Dumazet | 504b912 | 2020-06-17 20:53:24 -0700 | [diff] [blame] | 22 | void tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size); |
Eric Dumazet | 761b331 | 2020-06-17 20:53:25 -0700 | [diff] [blame] | 23 | int tso_start(struct sk_buff *skb, struct tso_t *tso); |
Ezequiel Garcia | e876f20 | 2014-05-19 13:59:52 -0300 | [diff] [blame] | 24 | |
| 25 | #endif /* _TSO_H */ |