18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _TSO_H 38c2ecf20Sopenharmony_ci#define _TSO_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <net/ip.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define TSO_HEADER_SIZE 256 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct tso_t { 108c2ecf20Sopenharmony_ci int next_frag_idx; 118c2ecf20Sopenharmony_ci int size; 128c2ecf20Sopenharmony_ci void *data; 138c2ecf20Sopenharmony_ci u16 ip_id; 148c2ecf20Sopenharmony_ci u8 tlen; /* transport header len */ 158c2ecf20Sopenharmony_ci bool ipv6; 168c2ecf20Sopenharmony_ci u32 tcp_seq; 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciint tso_count_descs(const struct sk_buff *skb); 208c2ecf20Sopenharmony_civoid tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso, 218c2ecf20Sopenharmony_ci int size, bool is_last); 228c2ecf20Sopenharmony_civoid tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size); 238c2ecf20Sopenharmony_ciint tso_start(struct sk_buff *skb, struct tso_t *tso); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#endif /* _TSO_H */ 26