blob: 62c98a9c60f15d7b4869f1ab523dfeb83fb18ba6 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _TSO_H
3#define _TSO_H
4
5#include <net/ip.h>
6
Olivier Deprez157378f2022-04-04 15:47:50 +02007#define TSO_HEADER_SIZE 256
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00008
9struct tso_t {
Olivier Deprez157378f2022-04-04 15:47:50 +020010 int next_frag_idx;
11 int size;
12 void *data;
13 u16 ip_id;
14 u8 tlen; /* transport header len */
15 bool ipv6;
16 u32 tcp_seq;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000017};
18
Olivier Deprez157378f2022-04-04 15:47:50 +020019int tso_count_descs(const struct sk_buff *skb);
20void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000021 int size, bool is_last);
Olivier Deprez157378f2022-04-04 15:47:50 +020022void tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size);
23int tso_start(struct sk_buff *skb, struct tso_t *tso);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000024
25#endif /* _TSO_H */