tso.h 566 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _TSO_H
  3. #define _TSO_H
  4. #include <net/ip.h>
  5. #define TSO_HEADER_SIZE 256
  6. struct tso_t {
  7. int next_frag_idx;
  8. int size;
  9. void *data;
  10. u16 ip_id;
  11. u8 tlen; /* transport header len */
  12. bool ipv6;
  13. u32 tcp_seq;
  14. };
  15. int tso_count_descs(const struct sk_buff *skb);
  16. void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,
  17. int size, bool is_last);
  18. void tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size);
  19. int tso_start(struct sk_buff *skb, struct tso_t *tso);
  20. #endif /* _TSO_H */